Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration-tests/actor-tests/lib/actor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { performance } from 'perf_hooks'

import { Mutex } from 'async-mutex'
import { sleep } from '@eth-optimism/core-utils'

import {
sanitizeForMetrics,
Expand All @@ -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 () => {}
Expand Down
4 changes: 3 additions & 1 deletion integration-tests/test/replica.spec.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
5 changes: 3 additions & 2 deletions integration-tests/test/rpc.spec.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -7,8 +8,8 @@ import {
TransactionRequest,
} from '@ethersproject/providers'

/* Imports: Internal */
import {
sleep,
l2Provider,
defaultTransactionFactory,
fundUser,
Expand Down
3 changes: 1 addition & 2 deletions integration-tests/test/shared/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -20,7 +20,6 @@ import {
getOvmEth,
getL1Bridge,
getL2Bridge,
sleep,
envConfig,
DEFAULT_TEST_GAS_L1,
} from './utils'
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/test/shared/stress-test-helpers.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/test/shared/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand Down
4 changes: 3 additions & 1 deletion integration-tests/test/verifier.spec.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand Down