Skip to content

Commit

Permalink
redeployment
Browse files Browse the repository at this point in the history
  • Loading branch information
aalavandhan committed Nov 2, 2021
1 parent 99f7579 commit c5862a6
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 555 deletions.
15 changes: 10 additions & 5 deletions helpers/contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ const deployContract = async (ethers, contractName, signer, args, txParams) => {
// console.log('Deploying', contractName);
const Factory = await getCompiledContractFactory(ethers, contractName);
const contract = await Factory.connect(signer).deploy(...args, txParams);
await contract.deployTransaction.wait();
// console.log('Deployed');
if (waitBlocks > 0) {
await contract.deployTransaction.wait(waitBlocks);
}
return contract;
};

Expand Down Expand Up @@ -88,8 +89,9 @@ const deployProxyContract = async (
initializerDef,
txParams,
);
await contract.deployTransaction.wait();
// console.log('Deployed');
if (waitBlocks > 0) {
await contract.deployTransaction.wait(waitBlocks);
}

const defaultProxyAdmin = ProxyAdminFactory.connect(signer).attach(
await getAdminAddress(signer.provider, contract.address),
Expand All @@ -99,7 +101,10 @@ const deployProxyContract = async (
newProxyAdmin.address,
txParams,
);
await refChangeTx.wait();

if (waitBlocks > 0) {
await refChangeTx.wait(waitBlocks);
}

return contract;
};
Expand Down
Loading

0 comments on commit c5862a6

Please sign in to comment.