Skip to content

Commit

Permalink
feat(eth-multisig-v4): update contract deploy script to use eip1559
Browse files Browse the repository at this point in the history
  • Loading branch information
venkateshv1266 committed Aug 14, 2024
1 parent e9c9080 commit 1eb1cc2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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);
Expand All @@ -107,7 +110,7 @@ async function main() {
);
const walletFactory = await WalletFactory.deploy(
walletSimple.address,
gasParams
eip1559GasParams
);
await walletFactory.deployed();
output.walletFactory = walletFactory.address;
Expand All @@ -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);
Expand All @@ -127,7 +130,7 @@ async function main() {
);
const forwarderFactory = await ForwarderFactory.deploy(
forwarder.address,
gasParams

);
await forwarderFactory.deployed();
output.forwarderFactory = forwarderFactory.address;
Expand Down

0 comments on commit 1eb1cc2

Please sign in to comment.