From faba89537addcfb36111b228d7cbfae33d1c16c0 Mon Sep 17 00:00:00 2001 From: liuhaoyang Date: Fri, 8 Sep 2023 14:22:13 +0800 Subject: [PATCH] add sleep in script --- .../contracts/deploy/011-AddressDictator.deploy.ts | 4 +++- packages/contracts/tasks/fraud-proof-tasks.ts | 14 +++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/contracts/deploy/011-AddressDictator.deploy.ts b/packages/contracts/deploy/011-AddressDictator.deploy.ts index cdbaa516b..14fef9702 100644 --- a/packages/contracts/deploy/011-AddressDictator.deploy.ts +++ b/packages/contracts/deploy/011-AddressDictator.deploy.ts @@ -1,6 +1,6 @@ /* Imports: External */ import { DeployFunction } from 'hardhat-deploy/dist/types' -import { hexStringEquals } from '@mantleio/core-utils' +import { hexStringEquals, sleep } from '@mantleio/core-utils' /* Imports: Internal */ import { @@ -75,6 +75,8 @@ const deployFn: DeployFunction = async (hre) => { return !hexStringEquals(existingAddresses[name], address) }) + await sleep(10000) + await deployAndVerifyAndThen({ hre, name: names.unmanaged.AddressDictator, diff --git a/packages/contracts/tasks/fraud-proof-tasks.ts b/packages/contracts/tasks/fraud-proof-tasks.ts index d596ad3a1..2e33dde73 100644 --- a/packages/contracts/tasks/fraud-proof-tasks.ts +++ b/packages/contracts/tasks/fraud-proof-tasks.ts @@ -1,6 +1,6 @@ import { task } from 'hardhat/config' import { ethers } from 'ethers' -import { hexStringEquals } from '@mantleio/core-utils' +import {hexStringEquals, sleep} from '@mantleio/core-utils' // @ts-ignore import { getContractFactory } from '../src' @@ -112,6 +112,7 @@ task('rollupStake') } await mantle.connect(deployer).transfer(stakerWallet.address, mantleAmount) + await sleep(10000) console.log( 'balance: ', stakerWallet.address, @@ -122,22 +123,29 @@ task('rollupStake') 'ETH Balance:', stakerWallet.address, ' ', - await stakerWallet.getBalance() + (await stakerWallet.getBalance()).toString() ) + await sleep(10000) await mantle .connect(stakerWallet) .approve(taskArgs.rollup, ethers.utils.parseEther(taskArgs.amount)) + + await sleep(10000); console.log( 'ETH Balance:', stakerWallet.address, ' ', - await stakerWallet.getBalance() + (await stakerWallet.getBalance()).toString() ) + await sleep(10000) + console.log('stake', stakerWallet.address, operators[i]) await rollup .connect(stakerWallet) .stake(ethers.utils.parseEther(taskArgs.amount), operators[i]) + + await sleep(10000) } })