File tree Expand file tree Collapse file tree
mock-contract-deployer/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,6 +130,25 @@ const main = async () => {
130130
131131 if ( process . env . SKIP_DEPLOYMENTS ) {
132132 console . log ( "Skipping Deployments..." ) ;
133+
134+ // Remove EIP-7702 code delegations from anvil accounts 0-9
135+ // This resets them to regular EOAs for testing on forked mainnet.
136+ // Most anvil accounts are delegated via 7702 to sweeper accounts; this loop removes them.
137+ for ( let i = 0 ; i < 10 ; i ++ ) {
138+ const account = mnemonicToAccount (
139+ "test test test test test test test test test test test junk" ,
140+ { addressIndex : i } ,
141+ ) ;
142+ await anvilClient . setCode ( {
143+ address : account . address ,
144+ bytecode : "0x" ,
145+ } ) ;
146+ await anvilClient . setBalance ( {
147+ address : account . address ,
148+ value : parseEther ( "10000" ) ,
149+ } ) ;
150+ }
151+
133152 // set nonces to match onchain nonces
134153 const promises : any = [ ] ;
135154
Original file line number Diff line number Diff line change 55 "start" : " tsx src/wait-anvil.ts && tsx src/index.ts"
66 },
77 "dependencies" : {
8- "@pimlico/mock-paymaster" : " ^0.0.6 " ,
8+ "@pimlico/mock-paymaster" : " ^0.0.7 " ,
99 "prool" : " ^0.0.25" ,
1010 "zod-validation-error" : " ^5.0.0"
1111 },
You can’t perform that action at this time.
0 commit comments