From 8b7b2d2b8f13b0b8ebda1cd7e14ef2e9c18e0bac Mon Sep 17 00:00:00 2001 From: PhilWindle <60546371+PhilWindle@users.noreply.github.com> Date: Thu, 5 Sep 2024 18:06:01 +0100 Subject: [PATCH] fix: Wait for receipt (#8358) This PR helps with deploying the contracts to Sepolia --------- Co-authored-by: Santiago Palladino --- yarn-project/ethereum/src/deploy_l1_contracts.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yarn-project/ethereum/src/deploy_l1_contracts.ts b/yarn-project/ethereum/src/deploy_l1_contracts.ts index f09c1963d70..ac0e11a03be 100644 --- a/yarn-project/ethereum/src/deploy_l1_contracts.ts +++ b/yarn-project/ethereum/src/deploy_l1_contracts.ts @@ -236,7 +236,10 @@ export const deployL1Contracts = async ( // fund the portal contract with Fee Juice const FEE_JUICE_INITIAL_MINT = 20000000000; const mintTxHash = await feeJuice.write.mint([feeJuicePortalAddress.toString(), FEE_JUICE_INITIAL_MINT], {} as any); - txHashes.push(mintTxHash); + + // @note This is used to ensure we fully wait for the transaction when running against a real chain + // otherwise we execute subsequent transactions too soon + await publicClient.waitForTransactionReceipt({ hash: mintTxHash }); logger.info(`Funding fee juice portal contract with fee juice in ${mintTxHash}`); if ((await feeJuicePortal.read.registry([])) === zeroAddress) {