@@ -113,6 +113,18 @@ async function deployUpgrade(rocketStorageAddress) {
113113 const deployedContracts = { } ;
114114 const contractPlan = { } ;
115115
116+ const deployTxs = [ ]
117+
118+ // Construct ABI for rocketMegapool
119+ const rocketMegapoolAbi = [ ]
120+ . concat ( artifacts . require ( 'RocketMegapoolDelegate' ) . abi )
121+ . concat ( artifacts . require ( 'RocketMegapoolDelegateBase' ) . abi )
122+ . concat ( artifacts . require ( 'RocketMegapoolProxy' ) . abi )
123+ . filter ( i => i . type !== 'fallback' && i . type !== 'receive' ) ;
124+
125+ rocketMegapoolAbi . push ( { stateMutability : 'payable' , type : 'fallback' } ) ;
126+ rocketMegapoolAbi . push ( { stateMutability : 'payable' , type : 'receive' } ) ;
127+
116128 async function deployNetworkContract ( name ) {
117129 const plan = contractPlan [ name ] ;
118130 if ( ! plan ) {
@@ -146,6 +158,8 @@ async function deployUpgrade(rocketStorageAddress) {
146158 address : address ,
147159 instance : instance ,
148160 } ;
161+
162+ deployTxs . push ( rsTx ) ;
149163 }
150164
151165 // Setup contract plan
@@ -192,6 +206,9 @@ async function deployUpgrade(rocketStorageAddress) {
192206 // Deploy upgrade
193207 await deployNetworkContract ( 'RocketUpgradeOneDotFour' ) ;
194208
209+ // Wait for all contract to be deployed
210+ await Promise . all ( deployTxs . map ( deployTx => deployTx . wait ( ) ) )
211+
195212 // Set
196213 const upgradeContract = deployedContracts [ 'RocketUpgradeOneDotFour' ] . instance ;
197214 const setAddressesA = [
@@ -271,6 +288,7 @@ async function deployUpgrade(rocketStorageAddress) {
271288 compressABI ( networkContracts . rocketMegapoolPenalties . abi ) ,
272289 compressABI ( networkContracts . rocketNetworkSnapshotsTime . abi ) ,
273290 compressABI ( networkContracts . rocketDAOProtocolSettingsProposals . abi ) ,
291+ compressABI ( rocketMegapoolAbi ) ,
274292 ] ;
275293 await upgradeContract . connect ( signer ) . setA ( setAddressesA , setAbisA ) ;
276294 await upgradeContract . connect ( signer ) . setB ( setAddressesB , setAbisB ) ;
@@ -383,6 +401,7 @@ async function verify() {
383401 const status = await verifier . getVerificationStatus ( verificationResults [ contract ] ) ;
384402 console . log ( ` - ${ contract } : ${ status . result } ` ) ;
385403 }
404+ await new Promise ( resolve => setTimeout ( resolve , 500 ) ) ;
386405 }
387406
388407 console . log ( ) ;
0 commit comments