From 0889b2cc97fe644cfc442671bd038d2a0fa773c9 Mon Sep 17 00:00:00 2001 From: 0xturboblitz Date: Wed, 17 Jan 2024 13:57:48 +0100 Subject: [PATCH] better deploy script --- contracts/scripts/deploy.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contracts/scripts/deploy.ts b/contracts/scripts/deploy.ts index 8a565b4a5..6c5f5d9e2 100644 --- a/contracts/scripts/deploy.ts +++ b/contracts/scripts/deploy.ts @@ -13,9 +13,12 @@ async function main() { const Formatter = await ethers.getContractFactory("Formatter"); const formatter = await Formatter.deploy(); await formatter.waitForDeployment(); - await formatter.addCountryCodes(Object.entries(countryCodes)); - console.log(`Formatter deployed to ${formatter.target}`); + + const tx = await formatter.addCountryCodes(Object.entries(countryCodes)); + await tx.wait(); + console.log(`Country codes added`); + const ProofOfPassport = await ethers.getContractFactory("ProofOfPassport"); const proofOfPassport = await ProofOfPassport.deploy(verifier.target, formatter.target);