From b989ae81bd401e254fe108a1cfc8f7cfbdf6f836 Mon Sep 17 00:00:00 2001 From: josojo Date: Wed, 7 Feb 2024 15:57:30 +0100 Subject: [PATCH] wait for tx to be mined --- src/scripts/prepareSequencerAfterFork.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/prepareSequencerAfterFork.js b/src/scripts/prepareSequencerAfterFork.js index 962597d4..3825ce82 100644 --- a/src/scripts/prepareSequencerAfterFork.js +++ b/src/scripts/prepareSequencerAfterFork.js @@ -11,7 +11,7 @@ const ChildConfig = { }; async function main() { - const childConfig = ChildConfig.secondChild; + const childConfig = ChildConfig.firstChild; /* * Check deploy parameters * Check that every necessary parameter is fullfilled @@ -63,11 +63,13 @@ async function main() { )).connect(deployer); const tx1 = await forkonomicTokenChild.approve(zkevmChildAddress, ethers.constants.MaxUint256); + await tx1.wait(); console.log('Approved zkevm to spend forkonomic tokens'); console.log('by the following tx: ', tx1.hash); const splitAmount = await forkonomicToken.balanceOf(deployer.address); const tx2 = await forkonomicTokenChild.splitTokensIntoChildTokens(splitAmount, { gasLimit: 1000000 }); + await tx2.wait(); console.log('Splitting tokens into their child tokens'); console.log('by the following tx: ', tx2.hash); }