From 491cc6c2d58ae96bffd9e9efa9f6363704afb11b Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Tue, 3 Sep 2024 16:56:56 +0000 Subject: [PATCH 1/2] Wait for receipt --- yarn-project/ethereum/src/deploy_l1_contracts.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yarn-project/ethereum/src/deploy_l1_contracts.ts b/yarn-project/ethereum/src/deploy_l1_contracts.ts index f09c1963d70d..a14f3f1798d1 100644 --- a/yarn-project/ethereum/src/deploy_l1_contracts.ts +++ b/yarn-project/ethereum/src/deploy_l1_contracts.ts @@ -236,6 +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); + + // @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 }); txHashes.push(mintTxHash); logger.info(`Funding fee juice portal contract with fee juice in ${mintTxHash}`); From 9f65e3cc96cfbdeb51a48bab61601d2f1d88dc20 Mon Sep 17 00:00:00 2001 From: PhilWindle <60546371+PhilWindle@users.noreply.github.com> Date: Wed, 4 Sep 2024 13:26:58 +0100 Subject: [PATCH 2/2] Update yarn-project/ethereum/src/deploy_l1_contracts.ts Don't wait for the same transaction twice Co-authored-by: Santiago Palladino --- yarn-project/ethereum/src/deploy_l1_contracts.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/yarn-project/ethereum/src/deploy_l1_contracts.ts b/yarn-project/ethereum/src/deploy_l1_contracts.ts index a14f3f1798d1..ac0e11a03bea 100644 --- a/yarn-project/ethereum/src/deploy_l1_contracts.ts +++ b/yarn-project/ethereum/src/deploy_l1_contracts.ts @@ -240,7 +240,6 @@ export const deployL1Contracts = async ( // @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 }); - txHashes.push(mintTxHash); logger.info(`Funding fee juice portal contract with fee juice in ${mintTxHash}`); if ((await feeJuicePortal.read.registry([])) === zeroAddress) {