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
9f970f0c
Unverified
Commit
9f970f0c
authored
Dec 21, 2021
by
smartcontracts
Committed by
GitHub
Dec 21, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1907 from barrasso/integration-test-setup
Create a setup script for the integration tests
parents
5ea0af0b
a2ffd3a7
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 @
9f970f0c
import
{
expect
}
from
'
chai
'
import
{
expect
}
from
'
./shared/setup
'
/* Imports: External */
import
{
Contract
,
ContractFactory
}
from
'
ethers
'
...
...
integration-tests/test/bridged-tokens.ts
View file @
9f970f0c
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
'
...
...
integration-tests/test/contracts.spec.ts
View file @
9f970f0c
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
'
...
...
@@ -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
)
=>
...
...
integration-tests/test/fee-payment.spec.ts
View file @
9f970f0c
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
'
...
...
integration-tests/test/native-eth-ovm-calls.spec.ts
View file @
9f970f0c
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
...
...
integration-tests/test/native-eth.spec.ts
View file @
9f970f0c
import
{
expect
}
from
'
chai
'
import
{
expect
}
from
'
./shared/setup
'
/* Imports: External */
import
{
Wallet
,
utils
,
BigNumber
}
from
'
ethers
'
...
...
integration-tests/test/ovmcontext.spec.ts
View file @
9f970f0c
import
{
expect
}
from
'
chai
'
import
{
expect
}
from
'
./shared/setup
'
/* Imports: External */
import
{
ethers
}
from
'
hardhat
'
...
...
integration-tests/test/predeploys.spec.ts
View file @
9f970f0c
import
chai
,
{
expect
}
from
'
chai
'
import
{
solidity
}
from
'
ethereum-waffle
'
chai
.
use
(
solidity
)
import
{
expect
}
from
'
./shared/setup
'
/* Imports: Internal */
import
{
ethers
}
from
'
ethers
'
...
...
integration-tests/test/queue-ingestion.spec.ts
View file @
9f970f0c
import
{
expect
}
from
'
chai
'
import
{
expect
}
from
'
./shared/setup
'
/* Imports: Internal */
import
{
providers
}
from
'
ethers
'
...
...
integration-tests/test/replica.spec.ts
View file @
9f970f0c
import
{
expect
}
from
'
./shared/setup
'
import
{
OptimismEnv
}
from
'
./shared/env
'
import
{
defaultTransactionFactory
,
...
...
@@ -5,7 +6,6 @@ import {
sleep
,
isLiveNetwork
,
}
from
'
./shared/utils
'
import
{
expect
}
from
'
chai
'
import
{
TransactionReceipt
}
from
'
@ethersproject/abstract-provider
'
describe
(
'
Replica Tests
'
,
()
=>
{
...
...
integration-tests/test/rpc.spec.ts
View file @
9f970f0c
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
,
...
...
@@ -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
...
...
integration-tests/test/shared/setup.ts
0 → 100644
View file @
9f970f0c
/* 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 @
9f970f0c
import
{
expect
}
from
'
chai
'
import
{
expect
}
from
'
./shared/setup
'
/* Imports: External */
import
{
Contract
,
ContractFactory
,
Wallet
,
utils
}
from
'
ethers
'
...
...
integration-tests/test/whitelist.spec.ts
View file @
9f970f0c
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
'
...
...
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