11# Biconomy Nexus Integration
22
3- This directory contains the complete Passport-Nexus hybrid infrastructure implementation, deployment scripts, and wallet management tools .
3+ This directory contains the ** complete and production-ready ** Passport-Nexus hybrid infrastructure implementation. All temporary files have been cleaned up and only essential components remain .
44
55## Project Structure
66
@@ -14,18 +14,28 @@ scripts/biconomy/
1414│ ├── step4.ts # Deploy Nexus core (K1Validator + Nexus with CREATE2)
1515│ ├── step5.ts # Deploy ImmutableSigner
1616│ ├── step6.ts # Configure LatestWalletImplLocator → Nexus
17+ │ ├── step7.ts # Deploy NexusBootstrap (REQUIRED for Nexus)
18+ │ ├── step8.ts # Deploy/Configure EntryPoint (ERC-4337)
1719│ ├── step0.json # Step 0 deployment results
1820│ ├── step1.json # Step 1 deployment results
1921│ ├── step2.json # Step 2 deployment results
2022│ ├── step3.json # Step 3 deployment results
2123│ ├── step4.json # Step 4 deployment results
22- │ └── step5.json # Step 5 deployment results
24+ │ ├── step5.json # Step 5 deployment results
25+ │ ├── step6.json # Step 6 deployment results
26+ │ ├── step7.json # Step 7 deployment results
27+ │ └── step8.json # Step 8 deployment results
2328├── deploy-infrastructure-and-wallet.js # Complete deployment script (all-in-one)
24- ├── wallet-deployment.ts # Wallet deployment using step artifacts
29+ ├── wallet-deployment.ts # Enhanced wallet deployment with Nexus support
30+ ├── demonstrate-erc4337-concept.js # ERC-4337 concept demonstration (reference)
31+ ├── test-revised-factory.js # Factory test example (reference)
32+ ├── final-deployment.js # Legacy deployment script
2533├── README-deploy-infrastructure-and-wallet.md # Complete infrastructure README
2634└── README.md # This file
2735```
2836
37+ ** ✨ Note** : This directory has been cleaned up from 47 files to 12 essential files. All temporary investigation, testing, and debugging scripts have been removed.
38+
2939## Architecture Overview
3040
3141### 🏗️ Hybrid Infrastructure (Passport + Nexus)
@@ -70,6 +80,19 @@ Step 2: Implementation Management │
7080│ Locator │ ──points to──▶ Nexus Implementation
7181└─────────────────┘
7282
83+ Step 7: Nexus Initialization Step 8: ERC-4337 Support
84+ ┌─────────────────┐ ┌──────────────────┐
85+ │ NexusBootstrap │ │ EntryPoint │
86+ │ (Required) │ │ (ERC-4337) │
87+ └─────────────────┘ └──────────────────┘
88+ │ │
89+ │ enables │ enables
90+ ▼ ▼
91+ ┌─────────────────┐ ┌──────────────────┐
92+ │ Nexus Module │ │ UserOperation │
93+ │ Initialization │ │ Validation │
94+ └─────────────────┘ └──────────────────┘
95+
7396Step 0: CREATE2 Foundation
7497┌─────────────────┐
7598│OwnableCreate2 │ ──enables──▶ Deterministic Addresses
@@ -95,6 +118,15 @@ Step 0: CREATE2 Foundation
95118- ** ImmutableSigner** : 2x2 signature validation for critical operations
96119- ** Configuration** : Links all components together
97120
121+ #### ** Nexus Initialization & ERC-4337 (Steps 7-8)**
122+ - ** NexusBootstrap** : ** REQUIRED** component for Nexus wallet initialization
123+ - Enables proper module setup during wallet creation
124+ - Critical for Nexus functionality - wallets cannot be properly initialized without it
125+ - ** EntryPoint** : ERC-4337 Account Abstraction support
126+ - Enables UserOperation validation and execution
127+ - Supports bundler integration and gasless transactions
128+ - Automatically deploys real EntryPoint or falls back to mock for development
129+
98130#### ** CREATE2 Foundation (Step 0)**
99131- ** OwnableCreate2Deployer** : Enables deterministic contract addresses
100132- ** Used by** : Steps 2 and 4 for predictable deployments
@@ -126,6 +158,12 @@ NODE_ENV=development npx hardhat run scripts/biconomy/steps/step5.ts --network l
126158
127159# Step 6: Configure infrastructure
128160NODE_ENV=development npx hardhat run scripts/biconomy/steps/step6.ts --network localhost
161+
162+ # Step 7: Deploy NexusBootstrap (REQUIRED for Nexus initialization)
163+ NODE_ENV=development npx hardhat run scripts/biconomy/steps/step7.ts --network localhost
164+
165+ # Step 8: Deploy/Configure EntryPoint (ERC-4337 support)
166+ NODE_ENV=development npx hardhat run scripts/biconomy/steps/step8.ts --network localhost
129167```
130168
131169### Method 2: Complete Deployment (Recommended)
@@ -167,6 +205,8 @@ MAX_PRIORITY_FEE_PER_GAS=1000000000
167205# Admin addresses (automatically set to first signer in development)
168206WALLET_IMPL_LOCATOR_ADMIN=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
169207WALLET_IMPL_CHANGER_ADMIN=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
208+
209+ # ERC-4337 EntryPoint (set after step8 or use existing)
170210ENTRY_POINT_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8
171211
172212# CREATE2 factory address (set after step0)
@@ -315,6 +355,41 @@ Development settings optimized for speed:
315355- ** Gas Price** : Optimized for localhost/testnet
316356- ** EIP-1559** : Configured for modern networks
317357
358+ ## New Components (Steps 7-8)
359+
360+ ### Step 7: NexusBootstrap
361+ ** Critical component for Nexus wallet functionality**
362+
363+ - ** Purpose** : Enables proper initialization of Nexus wallets with modules
364+ - ** Requirement** : ** MANDATORY** for any Nexus wallet deployment
365+ - ** Functionality** :
366+ - Configures default validator (K1Validator) during wallet creation
367+ - Sets up initial module configuration
368+ - Ensures wallets are properly initialized and functional
369+ - ** Dependencies** : Requires K1Validator from Step 4
370+ - ** Output** : ` step7.json ` with NexusBootstrap address
371+
372+ ### Step 8: EntryPoint (ERC-4337)
373+ ** Account Abstraction support for advanced wallet features**
374+
375+ - ** Purpose** : Enables ERC-4337 Account Abstraction functionality
376+ - ** Features** :
377+ - UserOperation validation and execution
378+ - Bundler integration support
379+ - Gasless transaction capabilities
380+ - Meta-transaction support
381+ - ** Smart Deployment** :
382+ - First attempts to use existing EntryPoint from environment
383+ - Then tries to deploy real EntryPoint from ` account-abstraction ` package
384+ - Falls back to MockEntryPoint for development if real EntryPoint unavailable
385+ - ** Output** : ` step8.json ` with EntryPoint address and source type
386+
387+ ### Integration Notes
388+ - ** Step 7** is ** required** for Nexus wallets to function properly
389+ - ** Step 8** is ** optional** but recommended for full ERC-4337 support
390+ - Both steps integrate seamlessly with existing Passport infrastructure
391+ - Complete deployment now covers ** 9 steps** (0-8) for full functionality
392+
318393## Support
319394
320395For issues or questions:
0 commit comments