diff --git a/integration-tests/actor-tests/lib/actor.ts b/integration-tests/actor-tests/lib/actor.ts index 7e2995b566526..8515635fae5bb 100644 --- a/integration-tests/actor-tests/lib/actor.ts +++ b/integration-tests/actor-tests/lib/actor.ts @@ -1,6 +1,7 @@ import { performance } from 'perf_hooks' import { Mutex } from 'async-mutex' +import { sleep } from '@eth-optimism/core-utils' import { sanitizeForMetrics, @@ -11,7 +12,6 @@ import { failedBenchRunsTotal, } from './metrics' import { ActorLogger, WorkerLogger } from './logger' -import { sleep } from '../../test/shared/utils' // eslint-disable-next-line @typescript-eslint/no-empty-function const asyncNoop = async () => {} diff --git a/integration-tests/test/replica.spec.ts b/integration-tests/test/replica.spec.ts index 549aa89a0ee22..fc4279ce43af7 100644 --- a/integration-tests/test/replica.spec.ts +++ b/integration-tests/test/replica.spec.ts @@ -1,11 +1,13 @@ +/* Imports: External */ import { TransactionReceipt } from '@ethersproject/abstract-provider' +import { sleep } from '@eth-optimism/core-utils' +/* Imports: Internal */ import { expect } from './shared/setup' import { OptimismEnv } from './shared/env' import { defaultTransactionFactory, gasPriceForL2, - sleep, envConfig, } from './shared/utils' diff --git a/integration-tests/test/rpc.spec.ts b/integration-tests/test/rpc.spec.ts index 5f7c4c7ae6cde..25ae55ec13fc4 100644 --- a/integration-tests/test/rpc.spec.ts +++ b/integration-tests/test/rpc.spec.ts @@ -1,4 +1,5 @@ -import { expectApprox, injectL2Context } from '@eth-optimism/core-utils' +/* Imports: External */ +import { expectApprox, injectL2Context, sleep } from '@eth-optimism/core-utils' import { Wallet, BigNumber, Contract, ContractFactory, constants } from 'ethers' import { serialize } from '@ethersproject/transactions' import { ethers } from 'hardhat' @@ -7,8 +8,8 @@ import { TransactionRequest, } from '@ethersproject/providers' +/* Imports: Internal */ import { - sleep, l2Provider, defaultTransactionFactory, fundUser, diff --git a/integration-tests/test/shared/env.ts b/integration-tests/test/shared/env.ts index ac27185e7016a..c3edfab6352f6 100644 --- a/integration-tests/test/shared/env.ts +++ b/integration-tests/test/shared/env.ts @@ -2,7 +2,7 @@ import { Contract, utils, Wallet, providers } from 'ethers' import { TransactionResponse } from '@ethersproject/providers' import { getContractFactory, predeploys } from '@eth-optimism/contracts' -import { Watcher } from '@eth-optimism/core-utils' +import { Watcher, sleep } from '@eth-optimism/core-utils' import { getMessagesAndProofsForL2Transaction } from '@eth-optimism/message-relayer' import { CrossChainMessenger } from '@eth-optimism/sdk' @@ -20,7 +20,6 @@ import { getOvmEth, getL1Bridge, getL2Bridge, - sleep, envConfig, DEFAULT_TEST_GAS_L1, } from './utils' diff --git a/integration-tests/test/shared/stress-test-helpers.ts b/integration-tests/test/shared/stress-test-helpers.ts index 836060640a933..39f767dd42c96 100644 --- a/integration-tests/test/shared/stress-test-helpers.ts +++ b/integration-tests/test/shared/stress-test-helpers.ts @@ -1,10 +1,11 @@ /* Imports: External */ import { ethers } from 'ethers' +import { sleep } from '@eth-optimism/core-utils' /* Imports: Internal */ import { OptimismEnv } from './env' import { Direction } from './watcher-utils' -import { gasPriceForL1, gasPriceForL2, sleep } from './utils' +import { gasPriceForL1, gasPriceForL2 } from './utils' interface TransactionParams { contract: ethers.Contract diff --git a/integration-tests/test/shared/utils.ts b/integration-tests/test/shared/utils.ts index a52d40ff5bce2..3adba5af8a326 100644 --- a/integration-tests/test/shared/utils.ts +++ b/integration-tests/test/shared/utils.ts @@ -237,8 +237,6 @@ export const hardhatTest = (name, fn) => 'Skipping test on non-Hardhat environment.' ) -export const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)) - const abiCoder = new utils.AbiCoder() export const encodeSolidityRevertMessage = (_reason: string): string => { return '0x08c379a0' + remove0x(abiCoder.encode(['string'], [_reason])) diff --git a/integration-tests/test/verifier.spec.ts b/integration-tests/test/verifier.spec.ts index 86715127f64c8..7c5512731ae02 100644 --- a/integration-tests/test/verifier.spec.ts +++ b/integration-tests/test/verifier.spec.ts @@ -1,11 +1,13 @@ +/* Imports: External */ import { TransactionReceipt } from '@ethersproject/abstract-provider' +import { sleep } from '@eth-optimism/core-utils' +/* Imports: Internal */ import { expect } from './shared/setup' import { OptimismEnv } from './shared/env' import { defaultTransactionFactory, gasPriceForL2, - sleep, envConfig, } from './shared/utils'