Skip to content

Commit

Permalink
Merge pull request #139 from BitGo/WIN-1131-update-prod-config-for-co…
Browse files Browse the repository at this point in the history
…ntract-deployment

chore(eth-multisig-v4): update contract deployment script
  • Loading branch information
gianchandania authored Mar 1, 2024
2 parents eef8773 + 2416725 commit 70920c2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ async function main() {
};

const feeData = await ethers.provider.getFeeData();
const eip1559GasParams = {
maxFeePerGas: feeData.maxFeePerGas,
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas
const gasParams = {
gasPrice: feeData.gasPrice
};

const [deployer] = await ethers.getSigners();
Expand Down Expand Up @@ -69,7 +68,7 @@ async function main() {
const WalletSimple = await ethers.getContractFactory(
walletImplementationContractName
);
const walletSimple = await WalletSimple.deploy(eip1559GasParams);
const walletSimple = await WalletSimple.deploy(gasParams);
await walletSimple.deployed();
output.walletImplementation = walletSimple.address;
console.log('WalletSimple deployed at ' + walletSimple.address);
Expand All @@ -79,7 +78,7 @@ async function main() {
);
const walletFactory = await WalletFactory.deploy(
walletSimple.address,
eip1559GasParams
gasParams
);
await walletFactory.deployed();
output.walletFactory = walletFactory.address;
Expand All @@ -89,15 +88,18 @@ 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('ForwarderV4');
const forwarder = await Forwarder.deploy();
const forwarder = await Forwarder.deploy(gasParams);
await forwarder.deployed();
output.forwarderImplementation = forwarder.address;
console.log('ForwarderV4 deployed at ' + forwarder.address);

const ForwarderFactory = await ethers.getContractFactory(
'ForwarderFactoryV4'
);
const forwarderFactory = await ForwarderFactory.deploy(forwarder.address);
const forwarderFactory = await ForwarderFactory.deploy(
forwarder.address,
gasParams
);
await forwarderFactory.deployed();
output.forwarderFactory = forwarderFactory.address;
console.log('ForwarderFactoryV4 deployed at ' + forwarderFactory.address);
Expand Down

0 comments on commit 70920c2

Please sign in to comment.