@@ -39,10 +39,12 @@ async function main() {
3939 deployForwarderContracts = false ;
4040 const [ deployer ] = await ethers . getSigners ( ) ;
4141 const txCount = await deployer . getTransactionCount ( ) ;
42+
4243 if ( txCount === 1 || txCount === 3 ) {
4344 throw Error ( 'Cannot deploy contracts, please update the script' ) ;
4445 }
4546 console . log ( 'txCount: ' + txCount ) ;
47+ const GWEI = BigNumber . from ( '1000000000' ) ; // 1
4648 if ( txCount === 0 ) {
4749 deployWalletContracts = true ;
4850 deployForwarderContracts = true ;
@@ -145,7 +147,6 @@ async function main() {
145147 console . log (
146148 'Setting World gasLimit,maxFeePerGas, maxPriorityFeePerGas...'
147149 ) ;
148- const GWEI = BigNumber . from ( '1000000000' ) ; // 1
149150 eip1559GasParams . gasLimit = 3000000 ;
150151 eip1559GasParams . maxFeePerGas = GWEI . mul ( 5 ) ;
151152 eip1559GasParams . maxPriorityFeePerGas = GWEI . mul ( 2 ) ;
@@ -156,6 +157,24 @@ async function main() {
156157 break ;
157158 //Monad
158159 case 10143 : // TODO: WIN-5225: add chain id once mainnet is release
160+ const feeData = await ethers . provider . getFeeData ( ) ; // dynamically gets suggested fees
161+ const baseFee =
162+ feeData . lastBaseFeePerGas || BigNumber . from ( '30000000000' ) ; // fallback if null
163+
164+ eip1559GasParams . gasLimit = 3000000 ;
165+ eip1559GasParams . maxPriorityFeePerGas = GWEI . mul ( 1 ) ;
166+ eip1559GasParams . maxFeePerGas = baseFee . add (
167+ eip1559GasParams . maxPriorityFeePerGas
168+ ) ;
169+ walletImplementationContractName = 'WalletSimple' ;
170+ forwarderContractName = 'ForwarderV4' ;
171+ forwarderFactoryContractName = 'ForwarderFactoryV4' ;
172+ contractPath = `contracts/${ walletImplementationContractName } .sol:${ walletImplementationContractName } ` ;
173+ const estimatedTxCost = ethers . utils . formatEther (
174+ eip1559GasParams . maxFeePerGas . mul ( eip1559GasParams . gasLimit )
175+ ) ; // wei
176+ console . log ( '💸 Estimated Max Deployment Cost:' , estimatedTxCost , 'ETH' ) ;
177+ break ;
159178 //Flare
160179 case 14 :
161180 case 114 :
@@ -334,7 +353,13 @@ async function verifyContract(
334353 if ( contract ) {
335354 verifyContractArgs . contract = contract ;
336355 }
337-
356+ console . log ( '\n=== Verifying Contract ===' ) ;
357+ console . log ( 'Contract Name: ' , contractName ) ;
358+ console . log ( 'Contract Address: ' , contractAddress ) ;
359+ console . log ( 'Constructor Arguments:' , constructorArguments ) ;
360+ if ( contract ) {
361+ console . log ( 'Full Contract Path: ' , contract ) ;
362+ }
338363 await hre . run ( 'verify:verify' , verifyContractArgs ) ;
339364 } catch ( e ) {
340365 // @ts -ignore
0 commit comments