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
d5226e85
Commit
d5226e85
authored
Nov 09, 2021
by
Annie Ke
Committed by
Mark Tyneway
Nov 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip: surgery predeploy tests
parent
3a87ac26
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
227 additions
and
32 deletions
+227
-32
package.json
packages/regenesis-surgery/package.json
+3
-2
predeploy.spec.ts
packages/regenesis-surgery/test/predeploy.spec.ts
+217
-26
setup.ts
packages/regenesis-surgery/test/setup.ts
+5
-0
uniswap.spec.ts
packages/regenesis-surgery/test/uniswap.spec.ts
+1
-3
yarn.lock
yarn.lock
+1
-1
No files found.
packages/regenesis-surgery/package.json
View file @
d5226e85
...
...
@@ -39,13 +39,14 @@
"eslint-plugin-prettier"
:
"^3.4.0"
,
"eslint-plugin-react"
:
"^7.24.0"
,
"eslint-plugin-unicorn"
:
"^32.0.1"
,
"ethereum-waffle"
:
"^3.4.0"
,
"ethereumjs-util"
:
"^7.1.3"
,
"ethers"
:
"^5.4.5"
,
"lint-staged"
:
"11.0.0"
,
"mocha"
:
"^9.1.2"
,
"node-fetch"
:
"2.6.5"
,
"solc"
:
"0.8.7-fixed"
,
"ts-
node"
:
"^10
.0.0"
,
"ts-
mocha"
:
"^8
.0.0"
"ts-
mocha"
:
"^8
.0.0"
,
"ts-
node"
:
"^10
.0.0"
}
}
packages/regenesis-surgery/test/predeploy.spec.ts
View file @
d5226e85
This diff is collapsed.
Click to expand it.
packages/regenesis-surgery/test/setup.ts
View file @
d5226e85
...
...
@@ -5,6 +5,7 @@ import chaiAsPromised from 'chai-as-promised'
import
*
as
dotenv
from
'
dotenv
'
import
{
getenv
,
remove0x
}
from
'
@eth-optimism/core-utils
'
import
{
providers
,
BigNumber
}
from
'
ethers
'
import
{
solidity
}
from
'
ethereum-waffle
'
import
{
SurgeryDataSources
,
Account
,
AccountType
}
from
'
../scripts/types
'
import
{
loadSurgeryData
}
from
'
../scripts/data
'
import
{
classify
}
from
'
../scripts/classifiers
'
...
...
@@ -12,6 +13,7 @@ import { GenesisJsonProvider } from './provider'
// Chai plugins go here.
chai
.
use
(
chaiAsPromised
)
chai
.
use
(
solidity
)
const
should
=
chai
.
should
()
const
expect
=
chai
.
expect
...
...
@@ -19,6 +21,9 @@ const expect = chai.expect
dotenv
.
config
()
export
const
NUM_ACCOUNTS_DIVISOR
=
4096
export
const
ERC20_ABI
=
[
'
function balanceOf(address owner) view returns (uint256)
'
,
]
interface
TestEnvConfig
{
preL2ProviderUrl
:
string
|
null
...
...
packages/regenesis-surgery/test/uniswap.spec.ts
View file @
d5226e85
...
...
@@ -2,11 +2,9 @@ import { ethers } from 'ethers'
import
{
abi
as
UNISWAP_POOL_ABI
}
from
'
@uniswap/v3-core/artifacts/contracts/UniswapV3Pool.sol/UniswapV3Pool.json
'
import
{
UNISWAP_V3_NFPM_ADDRESS
}
from
'
../scripts/constants
'
import
{
getUniswapV3Factory
,
replaceWETH
}
from
'
../scripts/utils
'
import
{
expect
,
env
}
from
'
./setup
'
import
{
expect
,
env
,
ERC20_ABI
}
from
'
./setup
'
import
{
AccountType
}
from
'
../scripts/types
'
const
ERC20_ABI
=
[
'
function balanceOf(address owner) view returns (uint256)
'
]
describe
(
'
uniswap contracts
'
,
()
=>
{
before
(
async
()
=>
{
await
env
.
init
()
...
...
yarn.lock
View file @
d5226e85
...
...
@@ -6861,7 +6861,7 @@ ethereum-cryptography@^0.1.2, ethereum-cryptography@^0.1.3:
secp256k1 "^4.0.1"
setimmediate "^1.0.5"
ethereum-waffle@^3.3.0:
ethereum-waffle@^3.3.0
, ethereum-waffle@^3.4.0
:
version "3.4.0"
resolved "https://registry.yarnpkg.com/ethereum-waffle/-/ethereum-waffle-3.4.0.tgz#990b3c6c26db9c2dd943bf26750a496f60c04720"
integrity sha512-ADBqZCkoSA5Isk486ntKJVjFEawIiC+3HxNqpJqONvh3YXBTNiRfXvJtGuAFLXPG91QaqkGqILEHANAo7j/olQ==
...
...
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