From 84c8566c29b71a79261d67618e614e754e502cb2 Mon Sep 17 00:00:00 2001 From: Yash Goyal Date: Fri, 17 May 2024 00:00:13 +0530 Subject: [PATCH] added delay in the deployment scripts for the transactions --- packages/hardhat/deploy/08_maci.ts | 3 ++- packages/hardhat/deploy/09_vk_registry.ts | 3 ++- packages/hardhat/deploy/10_configure.ts | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/hardhat/deploy/08_maci.ts b/packages/hardhat/deploy/08_maci.ts index 06e16fb..1087b73 100644 --- a/packages/hardhat/deploy/08_maci.ts +++ b/packages/hardhat/deploy/08_maci.ts @@ -49,7 +49,8 @@ const deployContracts: DeployFunction = async function (hre: HardhatRuntimeEnvir console.log(`The MACI contract is deployed at ${await maci.getAddress()}`); - await gatekeeper.setMaciInstance(await maci.getAddress()); + const tx = await gatekeeper.setMaciInstance(await maci.getAddress()); + await tx.wait(1); }; export default deployContracts; diff --git a/packages/hardhat/deploy/09_vk_registry.ts b/packages/hardhat/deploy/09_vk_registry.ts index 3c57f07..50554b9 100644 --- a/packages/hardhat/deploy/09_vk_registry.ts +++ b/packages/hardhat/deploy/09_vk_registry.ts @@ -49,7 +49,7 @@ const deployContracts: DeployFunction = async function (hre: HardhatRuntimeEnvir const tallyVkNonQvParam = tallyVkNonQv!.asContractParam() as IVerifyingKeyStruct; const processVkNonQvParam = processVkNonQv!.asContractParam() as IVerifyingKeyStruct; - await vkRegistry.setVerifyingKeysBatch( + const tx = await vkRegistry.setVerifyingKeysBatch( stateTreeDepth, intStateTreeDepth, messageTreeDepth, @@ -59,6 +59,7 @@ const deployContracts: DeployFunction = async function (hre: HardhatRuntimeEnvir [processVkParam, processVkNonQvParam], [tallyVkParam, tallyVkNonQvParam], ); + await tx.wait(1); }; export default deployContracts; diff --git a/packages/hardhat/deploy/10_configure.ts b/packages/hardhat/deploy/10_configure.ts index 876afc0..58d5290 100644 --- a/packages/hardhat/deploy/10_configure.ts +++ b/packages/hardhat/deploy/10_configure.ts @@ -33,7 +33,7 @@ const deployContracts: DeployFunction = async function (hre: HardhatRuntimeEnvir const filePath = "./coordinatorKeyPair.json"; const coordinatorKeypair = fetchOrCreateKeyPair(filePath); - await maci.setConfig( + const tx = await maci.setConfig( { intStateTreeDepth: 1, messageTreeSubDepth: 1, @@ -44,6 +44,7 @@ const deployContracts: DeployFunction = async function (hre: HardhatRuntimeEnvir await verifier.getAddress(), await vkRegistry.getAddress(), ); + await tx.wait(1); }; export default deployContracts;