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/test/basic-l1-l2-communication.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'chai'
import { expect } from './shared/setup'

/* Imports: External */
import { Contract, ContractFactory } from 'ethers'
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/test/bridged-tokens.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { expect } from './shared/setup'

import { BigNumber, Contract, ContractFactory, utils, Wallet } from 'ethers'
import { ethers } from 'hardhat'
import * as L2Artifact from '@eth-optimism/contracts/artifacts/contracts/standards/L2StandardERC20.sol/L2StandardERC20.json'
import { expect } from 'chai'

import { OptimismEnv } from './shared/env'
import { isLiveNetwork, isMainnet } from './shared/utils'
Expand Down
6 changes: 2 additions & 4 deletions integration-tests/test/contracts.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from './shared/setup'

import { BigNumber, Contract, ContractFactory, utils, Wallet } from 'ethers'
import { ethers } from 'hardhat'
import { solidity } from 'ethereum-waffle'
import chai, { expect } from 'chai'
import { UniswapV3Deployer } from 'uniswap-v3-deploy-plugin/dist/deployer/UniswapV3Deployer'

import { OptimismEnv } from './shared/env'
Expand All @@ -10,8 +10,6 @@ import { FeeAmount, TICK_SPACINGS } from '@uniswap/v3-sdk'
import { abi as NFTABI } from '@uniswap/v3-periphery/artifacts/contracts/NonfungiblePositionManager.sol/NonfungiblePositionManager.json'
import { abi as RouterABI } from '@uniswap/v3-periphery/artifacts/contracts/SwapRouter.sol/SwapRouter.json'

chai.use(solidity)

// Below methods taken from the Uniswap test suite, see
// https://github.com/Uniswap/v3-periphery/blob/main/test/shared/ticks.ts
const getMinTick = (tickSpacing: number) =>
Expand Down
4 changes: 1 addition & 3 deletions integration-tests/test/fee-payment.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import chai, { expect } from 'chai'
import chaiAsPromised from 'chai-as-promised'
chai.use(chaiAsPromised)
import { expect } from './shared/setup'

/* Imports: External */
import { BigNumber, utils } from 'ethers'
Expand Down
6 changes: 2 additions & 4 deletions integration-tests/test/native-eth-ovm-calls.spec.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { expect } from './shared/setup'

import { BigNumber, Contract, ContractFactory, Wallet } from 'ethers'
import { ethers } from 'hardhat'
import chai, { expect } from 'chai'
import {
fundUser,
encodeSolidityRevertMessage,
gasPriceForL2,
} from './shared/utils'
import { OptimismEnv } from './shared/env'
import { solidity } from 'ethereum-waffle'

chai.use(solidity)

describe('Native ETH value integration tests', () => {
let env: OptimismEnv
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/test/native-eth.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'chai'
import { expect } from './shared/setup'

/* Imports: External */
import { Wallet, utils, BigNumber } from 'ethers'
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/test/ovmcontext.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'chai'
import { expect } from './shared/setup'

/* Imports: External */
import { ethers } from 'hardhat'
Expand Down
4 changes: 1 addition & 3 deletions integration-tests/test/predeploys.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import chai, { expect } from 'chai'
import { solidity } from 'ethereum-waffle'
chai.use(solidity)
import { expect } from './shared/setup'

/* Imports: Internal */
import { ethers } from 'ethers'
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/test/queue-ingestion.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'chai'
import { expect } from './shared/setup'

/* Imports: Internal */
import { providers } from 'ethers'
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/test/replica.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect } from './shared/setup'
import { OptimismEnv } from './shared/env'
import {
defaultTransactionFactory,
gasPriceForL2,
sleep,
isLiveNetwork,
} from './shared/utils'
import { expect } from 'chai'
import { TransactionReceipt } from '@ethersproject/abstract-provider'

describe('Replica Tests', () => {
Expand Down
8 changes: 2 additions & 6 deletions integration-tests/test/rpc.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { expect } from './shared/setup'

import { expectApprox, injectL2Context } from '@eth-optimism/core-utils'
import { Wallet, BigNumber, Contract, ContractFactory } from 'ethers'
import { serialize } from '@ethersproject/transactions'
import { ethers } from 'hardhat'
import chai, { expect } from 'chai'
import {
sleep,
l2Provider,
Expand All @@ -12,18 +13,13 @@ import {
isLiveNetwork,
gasPriceForL2,
} from './shared/utils'
import chaiAsPromised from 'chai-as-promised'
import { OptimismEnv } from './shared/env'
import {
TransactionReceipt,
TransactionRequest,
} from '@ethersproject/providers'
import { solidity } from 'ethereum-waffle'
import simpleStorageJson from '../artifacts/contracts/SimpleStorage.sol/SimpleStorage.json'

chai.use(chaiAsPromised)
chai.use(solidity)

describe('Basic RPC tests', () => {
let env: OptimismEnv
let wallet: Wallet
Expand Down
10 changes: 10 additions & 0 deletions integration-tests/test/shared/setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* External Imports */
import chai = require('chai')
import chaiAsPromised from 'chai-as-promised'
import { solidity } from 'ethereum-waffle'

chai.use(solidity)
chai.use(chaiAsPromised)
const expect = chai.expect

export { expect }
2 changes: 1 addition & 1 deletion integration-tests/test/stress-tests.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'chai'
import { expect } from './shared/setup'

/* Imports: External */
import { Contract, ContractFactory, Wallet, utils } from 'ethers'
Expand Down
6 changes: 2 additions & 4 deletions integration-tests/test/whitelist.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import { expect } from './shared/setup'

/* Imports: External */
import { ContractFactory } from 'ethers'
import { ethers } from 'hardhat'
import chai, { expect } from 'chai'
import { solidity } from 'ethereum-waffle'
import { predeploys } from '@eth-optimism/contracts'

/* Imports: Internal */
import { OptimismEnv } from './shared/env'
import { l2Provider } from './shared/utils'

chai.use(solidity)

describe('Whitelist', async () => {
const initialAmount = 1000
const tokenName = 'OVM Test'
Expand Down