Skip to content

Commit c5862a6

Browse files
committed
redeployment
1 parent 99f7579 commit c5862a6

File tree

5 files changed

+53
-555
lines changed

5 files changed

+53
-555
lines changed

helpers/contracts.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ const deployContract = async (ethers, contractName, signer, args, txParams) => {
5858
// console.log('Deploying', contractName);
5959
const Factory = await getCompiledContractFactory(ethers, contractName);
6060
const contract = await Factory.connect(signer).deploy(...args, txParams);
61-
await contract.deployTransaction.wait();
62-
// console.log('Deployed');
61+
if (waitBlocks > 0) {
62+
await contract.deployTransaction.wait(waitBlocks);
63+
}
6364
return contract;
6465
};
6566

@@ -88,8 +89,9 @@ const deployProxyContract = async (
8889
initializerDef,
8990
txParams,
9091
);
91-
await contract.deployTransaction.wait();
92-
// console.log('Deployed');
92+
if (waitBlocks > 0) {
93+
await contract.deployTransaction.wait(waitBlocks);
94+
}
9395

9496
const defaultProxyAdmin = ProxyAdminFactory.connect(signer).attach(
9597
await getAdminAddress(signer.provider, contract.address),
@@ -99,7 +101,10 @@ const deployProxyContract = async (
99101
newProxyAdmin.address,
100102
txParams,
101103
);
102-
await refChangeTx.wait();
104+
105+
if (waitBlocks > 0) {
106+
await refChangeTx.wait(waitBlocks);
107+
}
103108

104109
return contract;
105110
};

0 commit comments

Comments
 (0)