@@ -143,21 +143,18 @@ async function deployWalletWithNexusFactory(infrastructure, deployer, network) {
143143 console . log ( `[${ network } ] 📋 EntryPoint: ${ infrastructure . entryPoint } ` ) ;
144144 console . log ( `[${ network } ] 📋 K1Validator: ${ infrastructure . k1ValidatorModule } ` ) ;
145145
146- // Create initData for NexusAccountFactory: [entryPoint, validator, owner]
147- const initData = hre . ethers . utils . defaultAbiCoder . encode (
148- [ 'address' , 'address' , 'address' ] ,
149- [ infrastructure . entryPoint , infrastructure . k1ValidatorModule , deployer . address ]
150- ) ;
146+ // Using simplified signature: just pass the mainModule (Nexus implementation)
147+ const mainModule = infrastructure . nexus ;
151148
152149 // Generate deployment salt
153150 const salt = hre . ethers . utils . formatBytes32String ( `nexus-${ Date . now ( ) } ` ) ;
154151
155- console . log ( `[${ network } ] 📋 InitData: [entryPoint, validator, owner] ` ) ;
152+ console . log ( `[${ network } ] 📋 MainModule (Nexus Implementation): ${ mainModule } ` ) ;
156153 console . log ( `[${ network } ] 📋 Owner: ${ deployer . address } ` ) ;
157154 console . log ( `[${ network } ] 📋 Salt: ${ salt } ` ) ;
158155
159156 // Predict wallet address (CFA compatibility)
160- const predictedAddress = await factory . computeAccountAddress ( initData , salt ) ;
157+ const predictedAddress = await factory . computeAccountAddress ( mainModule , salt ) ;
161158 console . log ( `[${ network } ] 🔮 Predicted address: ${ predictedAddress } ` ) ;
162159
163160 // Check if wallet already exists
@@ -170,7 +167,7 @@ async function deployWalletWithNexusFactory(infrastructure, deployer, network) {
170167 // Deploy wallet
171168 console . log ( `[${ network } ] 🔨 Deploying Nexus wallet...` ) ;
172169
173- const deployTx = await factory . createAccount ( initData , salt , {
170+ const deployTx = await factory . createAccount ( mainModule , salt , {
174171 gasLimit : 10000000 ,
175172 maxFeePerGas : hre . ethers . utils . parseUnits ( '20' , 'gwei' ) ,
176173 maxPriorityFeePerGas : hre . ethers . utils . parseUnits ( '2' , 'gwei' )
@@ -202,7 +199,8 @@ async function deployWalletWithNexusFactory(infrastructure, deployer, network) {
202199 const codeSize = Math . floor ( deployedCode . length / 2 ) ;
203200 console . log ( `[${ network } ] 📏 Deployed code size: ${ codeSize } bytes` ) ;
204201
205- if ( codeSize < 100 ) {
202+ // WalletProxy.yul has 53 bytes, which is correct for a minimal proxy
203+ if ( codeSize < 50 ) {
206204 throw new Error ( `Wallet deployment failed - code too small (${ codeSize } bytes)` ) ;
207205 }
208206
0 commit comments