From d6e5e952c6576fe87cf9f7dd378579976546db37 Mon Sep 17 00:00:00 2001 From: Welkin Date: Wed, 30 Aug 2023 15:29:44 +0800 Subject: [PATCH] deploy 20 token script --- packages/contracts-bedrock/scripts/deploy20-verify.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/contracts-bedrock/scripts/deploy20-verify.ts b/packages/contracts-bedrock/scripts/deploy20-verify.ts index abff335cc5..6cb65063ab 100644 --- a/packages/contracts-bedrock/scripts/deploy20-verify.ts +++ b/packages/contracts-bedrock/scripts/deploy20-verify.ts @@ -13,6 +13,12 @@ async function main() { } +function sleep(timeout: number): Promise { + return new Promise((resolve) => { + setTimeout(resolve, timeout); + }); +} + async function oneToken(anotherToken,name,symbol) { const factoryContract = await hre.ethers.getContractAt("OptimismMintableERC20Factory", '0x4200000000000000000000000000000000000012'); const tx = await factoryContract.createOptimismMintableERC20(anotherToken,name,symbol) @@ -23,6 +29,8 @@ async function oneToken(anotherToken,name,symbol) { const tokenAddress = await getTokenAddress(factoryContract); // Await the Promise to get the value console.log("Token address:", tokenAddress); + // sleep for waiting trace data indexing finished + await sleep(180000); try { await hre.run("opbnb-verify", { contractName: "OptimismMintableERC20",