Skip to content

Commit

Permalink
deploy 20 token script
Browse files Browse the repository at this point in the history
  • Loading branch information
Welkin committed Aug 30, 2023
1 parent 949dfbf commit d6e5e95
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/contracts-bedrock/scripts/deploy20-verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ async function main() {

}

function sleep(timeout: number): Promise<void> {
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)
Expand All @@ -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",
Expand Down

0 comments on commit d6e5e95

Please sign in to comment.