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
09e8dedb
Unverified
Commit
09e8dedb
authored
Dec 06, 2021
by
Mark Tyneway
Committed by
GitHub
Dec 06, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1879 from ethereum-optimism/feat/forkmode
feat: hardhat fork mode
parents
dd3e79a3
50e2f6ff
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
9 deletions
+55
-9
rich-suits-drive.md
.changeset/rich-suits-drive.md
+5
-0
unlucky-drinks-laugh.md
.changeset/unlucky-drinks-laugh.md
+5
-0
docker-compose.yml
ops/docker-compose.yml
+2
-0
hardhat.config.js
ops/docker/hardhat/hardhat.config.js
+22
-2
package.json
ops/docker/hardhat/package.json
+1
-1
l1_chain.env
ops/envs/l1_chain.env
+2
-0
yarn.lock
yarn.lock
+18
-6
No files found.
.changeset/rich-suits-drive.md
0 → 100644
View file @
09e8dedb
---
'
@eth-optimism/hardhat-node'
:
patch
---
Add fork mode config to ethereumoptimism/hardhat docker image
.changeset/unlucky-drinks-laugh.md
0 → 100644
View file @
09e8dedb
---
'
@eth-optimism/hardhat-node'
:
patch
---
Update to hardhat@2.7.0
ops/docker-compose.yml
View file @
09e8dedb
...
...
@@ -7,6 +7,8 @@ services:
build
:
context
:
./docker/hardhat
dockerfile
:
Dockerfile
env_file
:
-
./envs/l1_chain.env
ports
:
# expose the service to the host for integration testing
-
${L1CHAIN_HTTP_PORT:-9545}:8545
...
...
ops/docker/hardhat/hardhat.config.js
View file @
09e8dedb
module
.
exports
=
{
const
isForkModeEnabled
=
!!
process
.
env
.
FORK_URL
const
forkUrl
=
process
.
env
.
FORK_URL
const
forkStartingBlock
=
parseInt
(
process
.
env
.
FORK_STARTING_BLOCK
)
||
undefined
const
gasPrice
=
parseInt
(
process
.
env
.
GAS_PRICE
)
||
0
const
config
=
{
networks
:
{
hardhat
:
{
gasPrice
:
0
,
gasPrice
,
initialBaseFeePerGas
:
0
},
},
analytics
:
{
enabled
:
false
},
}
if
(
isForkModeEnabled
)
{
console
.
log
(
`Running hardhat in a fork mode! URL:
${
forkUrl
}
`
)
if
(
forkStartingBlock
)
{
console
.
log
(
`Starting block:
${
forkStartingBlock
}
`
)
}
config
.
networks
.
hardhat
.
forking
=
{
url
:
forkUrl
,
blockNumber
:
forkStartingBlock
,
}
}
else
{
console
.
log
(
'
Running with a fresh state...
'
)
}
module
.
exports
=
config
ops/docker/hardhat/package.json
View file @
09e8dedb
...
...
@@ -6,6 +6,6 @@
},
"license"
:
"MIT"
,
"dependencies"
:
{
"hardhat"
:
"^2.
6.5
"
"hardhat"
:
"^2.
7.0
"
}
}
ops/envs/l1_chain.env
0 → 100644
View file @
09e8dedb
FORK_URL=
FORK_STARTING_BLOCK=
yarn.lock
View file @
09e8dedb
...
...
@@ -2639,6 +2639,13 @@
dependencies:
antlr4ts "^0.5.0-alpha.4"
"@solidity-parser/parser@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.0.tgz#d51f074efb0acce0e953ec48133561ed710cebc0"
integrity sha512-cX0JJRcmPtNUJpzD2K7FdA7qQsTOk1UZnFx2k7qAg9ZRvuaH5NBe5IEdBMXGlmf2+FmjhqbygJ26H8l2SV7aKQ==
dependencies:
antlr4ts "^0.5.0-alpha.4"
"@szmarczak/http-timer@^1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421"
...
...
@@ -8456,10 +8463,10 @@ hardhat@^2.3.0:
uuid "^3.3.2"
ws "^7.4.6"
hardhat@^2.
6.5
:
version "2.
6.5
"
resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.
6.5.tgz#61d3e22da34e1b175bbe599f77396b32f9788b58
"
integrity sha512-
sBhREWZjQTtR/KMMp2F3ySuDqL0norjNq68geR3nlXRHXYKuNKeL7xqVsmldekt3sVB5Wh1WX7xDX79kvUr+fA
==
hardhat@^2.
7.0
:
version "2.
7.0
"
resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.
7.0.tgz#d8f01bc07bdd88ccaa00719ddb18618bc59a73b5
"
integrity sha512-
DqweY3KH5gwExoZ8EtsAfioj0Hk0NBXWXT3fMXWkiQNfyYBoZLrqdPNkbJ/E2LD4mZ+BKF7v/1chYR9ZCn2Z+g
==
dependencies:
"@ethereumjs/block" "^3.4.0"
"@ethereumjs/blockchain" "^5.4.0"
...
...
@@ -8468,7 +8475,7 @@ hardhat@^2.6.5:
"@ethereumjs/vm" "^5.5.2"
"@ethersproject/abi" "^5.1.2"
"@sentry/node" "^5.18.1"
"@solidity-parser/parser" "^0.1
1
.0"
"@solidity-parser/parser" "^0.1
4
.0"
"@types/bn.js" "^5.1.0"
"@types/lru-cache" "^5.1.0"
abort-controller "^3.0.0"
...
...
@@ -8506,7 +8513,7 @@ hardhat@^2.6.5:
stacktrace-parser "^0.1.10"
"true-case-path" "^2.2.1"
tsort "0.0.1"
uuid "^
3
.3.2"
uuid "^
8
.3.2"
ws "^7.4.6"
has-ansi@^2.0.0:
...
...
@@ -15513,6 +15520,11 @@ uuid@^3.3.2, uuid@^3.3.3:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
uuid@^8.3.2:
version "8.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
v8-compile-cache@^2.0.3:
version "2.3.0"
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
...
...
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