Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
f43ee05c
Commit
f43ee05c
authored
Dec 09, 2021
by
Mark Barrasso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create a setup script for the integration tests
parent
158743bc
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
28 additions
and
31 deletions
+28
-31
basic-l1-l2-communication.spec.ts
integration-tests/test/basic-l1-l2-communication.spec.ts
+1
-1
bridged-tokens.ts
integration-tests/test/bridged-tokens.ts
+2
-1
contracts.spec.ts
integration-tests/test/contracts.spec.ts
+2
-4
fee-payment.spec.ts
integration-tests/test/fee-payment.spec.ts
+1
-3
native-eth-ovm-calls.spec.ts
integration-tests/test/native-eth-ovm-calls.spec.ts
+2
-4
native-eth.spec.ts
integration-tests/test/native-eth.spec.ts
+1
-1
ovmcontext.spec.ts
integration-tests/test/ovmcontext.spec.ts
+1
-1
predeploys.spec.ts
integration-tests/test/predeploys.spec.ts
+1
-3
queue-ingestion.spec.ts
integration-tests/test/queue-ingestion.spec.ts
+1
-1
replica.spec.ts
integration-tests/test/replica.spec.ts
+1
-1
rpc.spec.ts
integration-tests/test/rpc.spec.ts
+2
-6
setup.ts
integration-tests/test/shared/setup.ts
+10
-0
stress-tests.spec.ts
integration-tests/test/stress-tests.spec.ts
+1
-1
whitelist.spec.ts
integration-tests/test/whitelist.spec.ts
+2
-4
No files found.
integration-tests/test/basic-l1-l2-communication.spec.ts
View file @
f43ee05c
import
{
expect
}
from
'
chai
'
import
{
expect
}
from
'
./shared/setup
'
/* Imports: External */
/* Imports: External */
import
{
Contract
,
ContractFactory
}
from
'
ethers
'
import
{
Contract
,
ContractFactory
}
from
'
ethers
'
...
...
integration-tests/test/bridged-tokens.ts
View file @
f43ee05c
import
{
expect
}
from
'
./shared/setup
'
import
{
BigNumber
,
Contract
,
ContractFactory
,
utils
,
Wallet
}
from
'
ethers
'
import
{
BigNumber
,
Contract
,
ContractFactory
,
utils
,
Wallet
}
from
'
ethers
'
import
{
ethers
}
from
'
hardhat
'
import
{
ethers
}
from
'
hardhat
'
import
*
as
L2Artifact
from
'
@eth-optimism/contracts/artifacts/contracts/standards/L2StandardERC20.sol/L2StandardERC20.json
'
import
*
as
L2Artifact
from
'
@eth-optimism/contracts/artifacts/contracts/standards/L2StandardERC20.sol/L2StandardERC20.json
'
import
{
expect
}
from
'
chai
'
import
{
OptimismEnv
}
from
'
./shared/env
'
import
{
OptimismEnv
}
from
'
./shared/env
'
import
{
isLiveNetwork
,
isMainnet
}
from
'
./shared/utils
'
import
{
isLiveNetwork
,
isMainnet
}
from
'
./shared/utils
'
...
...
integration-tests/test/contracts.spec.ts
View file @
f43ee05c
import
{
expect
}
from
'
./shared/setup
'
import
{
BigNumber
,
Contract
,
ContractFactory
,
utils
,
Wallet
}
from
'
ethers
'
import
{
BigNumber
,
Contract
,
ContractFactory
,
utils
,
Wallet
}
from
'
ethers
'
import
{
ethers
}
from
'
hardhat
'
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
{
UniswapV3Deployer
}
from
'
uniswap-v3-deploy-plugin/dist/deployer/UniswapV3Deployer
'
import
{
OptimismEnv
}
from
'
./shared/env
'
import
{
OptimismEnv
}
from
'
./shared/env
'
...
@@ -10,8 +10,6 @@ import { FeeAmount, TICK_SPACINGS } from '@uniswap/v3-sdk'
...
@@ -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
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
'
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
// Below methods taken from the Uniswap test suite, see
// https://github.com/Uniswap/v3-periphery/blob/main/test/shared/ticks.ts
// https://github.com/Uniswap/v3-periphery/blob/main/test/shared/ticks.ts
const
getMinTick
=
(
tickSpacing
:
number
)
=>
const
getMinTick
=
(
tickSpacing
:
number
)
=>
...
...
integration-tests/test/fee-payment.spec.ts
View file @
f43ee05c
import
chai
,
{
expect
}
from
'
chai
'
import
{
expect
}
from
'
./shared/setup
'
import
chaiAsPromised
from
'
chai-as-promised
'
chai
.
use
(
chaiAsPromised
)
/* Imports: External */
/* Imports: External */
import
{
BigNumber
,
utils
}
from
'
ethers
'
import
{
BigNumber
,
utils
}
from
'
ethers
'
...
...
integration-tests/test/native-eth-ovm-calls.spec.ts
View file @
f43ee05c
import
{
expect
}
from
'
./shared/setup
'
import
{
BigNumber
,
Contract
,
ContractFactory
,
Wallet
}
from
'
ethers
'
import
{
BigNumber
,
Contract
,
ContractFactory
,
Wallet
}
from
'
ethers
'
import
{
ethers
}
from
'
hardhat
'
import
{
ethers
}
from
'
hardhat
'
import
chai
,
{
expect
}
from
'
chai
'
import
{
import
{
fundUser
,
fundUser
,
encodeSolidityRevertMessage
,
encodeSolidityRevertMessage
,
gasPriceForL2
,
gasPriceForL2
,
}
from
'
./shared/utils
'
}
from
'
./shared/utils
'
import
{
OptimismEnv
}
from
'
./shared/env
'
import
{
OptimismEnv
}
from
'
./shared/env
'
import
{
solidity
}
from
'
ethereum-waffle
'
chai
.
use
(
solidity
)
describe
(
'
Native ETH value integration tests
'
,
()
=>
{
describe
(
'
Native ETH value integration tests
'
,
()
=>
{
let
env
:
OptimismEnv
let
env
:
OptimismEnv
...
...
integration-tests/test/native-eth.spec.ts
View file @
f43ee05c
import
{
expect
}
from
'
chai
'
import
{
expect
}
from
'
./shared/setup
'
/* Imports: External */
/* Imports: External */
import
{
Wallet
,
utils
,
BigNumber
}
from
'
ethers
'
import
{
Wallet
,
utils
,
BigNumber
}
from
'
ethers
'
...
...
integration-tests/test/ovmcontext.spec.ts
View file @
f43ee05c
import
{
expect
}
from
'
chai
'
import
{
expect
}
from
'
./shared/setup
'
/* Imports: External */
/* Imports: External */
import
{
ethers
}
from
'
hardhat
'
import
{
ethers
}
from
'
hardhat
'
...
...
integration-tests/test/predeploys.spec.ts
View file @
f43ee05c
import
chai
,
{
expect
}
from
'
chai
'
import
{
expect
}
from
'
./shared/setup
'
import
{
solidity
}
from
'
ethereum-waffle
'
chai
.
use
(
solidity
)
/* Imports: Internal */
/* Imports: Internal */
import
{
ethers
}
from
'
ethers
'
import
{
ethers
}
from
'
ethers
'
...
...
integration-tests/test/queue-ingestion.spec.ts
View file @
f43ee05c
import
{
expect
}
from
'
chai
'
import
{
expect
}
from
'
./shared/setup
'
/* Imports: Internal */
/* Imports: Internal */
import
{
providers
}
from
'
ethers
'
import
{
providers
}
from
'
ethers
'
...
...
integration-tests/test/replica.spec.ts
View file @
f43ee05c
import
{
expect
}
from
'
./shared/setup
'
import
{
OptimismEnv
}
from
'
./shared/env
'
import
{
OptimismEnv
}
from
'
./shared/env
'
import
{
import
{
defaultTransactionFactory
,
defaultTransactionFactory
,
...
@@ -5,7 +6,6 @@ import {
...
@@ -5,7 +6,6 @@ import {
sleep
,
sleep
,
isLiveNetwork
,
isLiveNetwork
,
}
from
'
./shared/utils
'
}
from
'
./shared/utils
'
import
{
expect
}
from
'
chai
'
import
{
TransactionReceipt
}
from
'
@ethersproject/abstract-provider
'
import
{
TransactionReceipt
}
from
'
@ethersproject/abstract-provider
'
describe
(
'
Replica Tests
'
,
()
=>
{
describe
(
'
Replica Tests
'
,
()
=>
{
...
...
integration-tests/test/rpc.spec.ts
View file @
f43ee05c
import
{
expect
}
from
'
./shared/setup
'
import
{
expectApprox
,
injectL2Context
}
from
'
@eth-optimism/core-utils
'
import
{
expectApprox
,
injectL2Context
}
from
'
@eth-optimism/core-utils
'
import
{
Wallet
,
BigNumber
,
Contract
,
ContractFactory
}
from
'
ethers
'
import
{
Wallet
,
BigNumber
,
Contract
,
ContractFactory
}
from
'
ethers
'
import
{
serialize
}
from
'
@ethersproject/transactions
'
import
{
serialize
}
from
'
@ethersproject/transactions
'
import
{
ethers
}
from
'
hardhat
'
import
{
ethers
}
from
'
hardhat
'
import
chai
,
{
expect
}
from
'
chai
'
import
{
import
{
sleep
,
sleep
,
l2Provider
,
l2Provider
,
...
@@ -12,18 +13,13 @@ import {
...
@@ -12,18 +13,13 @@ import {
isLiveNetwork
,
isLiveNetwork
,
gasPriceForL2
,
gasPriceForL2
,
}
from
'
./shared/utils
'
}
from
'
./shared/utils
'
import
chaiAsPromised
from
'
chai-as-promised
'
import
{
OptimismEnv
}
from
'
./shared/env
'
import
{
OptimismEnv
}
from
'
./shared/env
'
import
{
import
{
TransactionReceipt
,
TransactionReceipt
,
TransactionRequest
,
TransactionRequest
,
}
from
'
@ethersproject/providers
'
}
from
'
@ethersproject/providers
'
import
{
solidity
}
from
'
ethereum-waffle
'
import
simpleStorageJson
from
'
../artifacts/contracts/SimpleStorage.sol/SimpleStorage.json
'
import
simpleStorageJson
from
'
../artifacts/contracts/SimpleStorage.sol/SimpleStorage.json
'
chai
.
use
(
chaiAsPromised
)
chai
.
use
(
solidity
)
describe
(
'
Basic RPC tests
'
,
()
=>
{
describe
(
'
Basic RPC tests
'
,
()
=>
{
let
env
:
OptimismEnv
let
env
:
OptimismEnv
let
wallet
:
Wallet
let
wallet
:
Wallet
...
...
integration-tests/test/shared/setup.ts
0 → 100644
View file @
f43ee05c
/* 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
}
integration-tests/test/stress-tests.spec.ts
View file @
f43ee05c
import
{
expect
}
from
'
chai
'
import
{
expect
}
from
'
./shared/setup
'
/* Imports: External */
/* Imports: External */
import
{
Contract
,
ContractFactory
,
Wallet
,
utils
}
from
'
ethers
'
import
{
Contract
,
ContractFactory
,
Wallet
,
utils
}
from
'
ethers
'
...
...
integration-tests/test/whitelist.spec.ts
View file @
f43ee05c
import
{
expect
}
from
'
./shared/setup
'
/* Imports: External */
/* Imports: External */
import
{
ContractFactory
}
from
'
ethers
'
import
{
ContractFactory
}
from
'
ethers
'
import
{
ethers
}
from
'
hardhat
'
import
{
ethers
}
from
'
hardhat
'
import
chai
,
{
expect
}
from
'
chai
'
import
{
solidity
}
from
'
ethereum-waffle
'
import
{
predeploys
}
from
'
@eth-optimism/contracts
'
import
{
predeploys
}
from
'
@eth-optimism/contracts
'
/* Imports: Internal */
/* Imports: Internal */
import
{
OptimismEnv
}
from
'
./shared/env
'
import
{
OptimismEnv
}
from
'
./shared/env
'
import
{
l2Provider
}
from
'
./shared/utils
'
import
{
l2Provider
}
from
'
./shared/utils
'
chai
.
use
(
solidity
)
describe
(
'
Whitelist
'
,
async
()
=>
{
describe
(
'
Whitelist
'
,
async
()
=>
{
const
initialAmount
=
1000
const
initialAmount
=
1000
const
tokenName
=
'
OVM Test
'
const
tokenName
=
'
OVM Test
'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment