From 1eb1cc28a582a87500e29d6fc2e9709a3bce6646 Mon Sep 17 00:00:00 2001 From: Venkatesh V Date: Wed, 14 Aug 2024 19:10:58 +0530 Subject: [PATCH] feat(eth-multisig-v4): update contract deploy script to use eip1559 --- scripts/deploy.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/deploy.ts b/scripts/deploy.ts index 5693c8f..287053d 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -15,6 +15,10 @@ async function main() { const gasParams = { gasPrice: feeData.gasPrice }; + const eip1559GasParams = { + maxFeePerGas: feeData.maxFeePerGas, + maxPriorityFeePerGas: feeData.maxPriorityFeePerGas + }; const [deployer] = await ethers.getSigners(); @@ -93,11 +97,10 @@ async function main() { console.log( 'Deployed wallet contract called: ' + walletImplementationContractName ); - const WalletSimple = await ethers.getContractFactory( walletImplementationContractName ); - const walletSimple = await WalletSimple.deploy(gasParams); + const walletSimple = await WalletSimple.deploy(eip1559GasParams); await walletSimple.deployed(); output.walletImplementation = walletSimple.address; console.log('WalletSimple deployed at ' + walletSimple.address); @@ -107,7 +110,7 @@ async function main() { ); const walletFactory = await WalletFactory.deploy( walletSimple.address, - gasParams + eip1559GasParams ); await walletFactory.deployed(); output.walletFactory = walletFactory.address; @@ -117,7 +120,7 @@ async function main() { // ForwarderV4 and ForwarderFactoryV4. // If we have to deploy contracts for the older coins like eth, avax, polygon, we need to deploy Forwarder and ForwarderFactory const Forwarder = await ethers.getContractFactory(forwarderContractName); - const forwarder = await Forwarder.deploy(gasParams); + const forwarder = await Forwarder.deploy(); await forwarder.deployed(); output.forwarderImplementation = forwarder.address; console.log(`${forwarderContractName} deployed at ` + forwarder.address); @@ -127,7 +130,7 @@ async function main() { ); const forwarderFactory = await ForwarderFactory.deploy( forwarder.address, - gasParams + ); await forwarderFactory.deployed(); output.forwarderFactory = forwarderFactory.address;