22
33### Run
44
5- To run the mainnet fork you have to set one of the following environment variables:
5+ ### Available Environment Variables
66
7- - ` INFURA_TOKEN ` to use Infura as provider
8- - ` ALCHEMY_TOKEN ` to use Alchemy as provider
9- - ` ETH_RPC_URL ` to use a custom provider
7+ The following environment variables can be used to configure the hardhat node:
8+
9+ - ` INFURA_TOKEN ` - Token for Infura provider
10+ - ` ALCHEMY_TOKEN ` - Token for Alchemy provider
11+ - ` ETH_RPC_URL ` - Custom Ethereum RPC URL
12+ - ` DONT_SET_CHAIN_ID ` - Set to any value to prevent setting chainId (useful when forking)
13+ - ` HARDFORK ` - Specify the hardfork to use (defaults to "cancun")
14+
15+ ### Available Node Types
16+
17+ The following node types are available as different Docker image tags:
18+
19+ - ` :latest ` or ` :<version> ` - Mainnet fork node
20+ - ` :<version>-scratch ` - Fresh node without forking
21+ - ` :<version>-hoodi ` - Hoodi network fork node
22+
23+ ### Node Configuration
24+
25+ The Hardhat node comes with the following default configuration:
26+
27+ - 30 test accounts
28+ - Initial base fee per gas set to 0
29+ - Mocha timeout set to 5 minutes
30+ - Solidity version 0.8.25
1031
1132### Examples
1233
@@ -31,13 +52,13 @@ docker run -e ETH_RPC_URL=your_url -p 8545:8545 -it --rm ghcr.io/lidofinance/har
3152If you don't need to fork mainnet, and you only want to work with the ` -scratch ` node:
3253
3354``` bash
34- docker run -p 8545:8545 -it --rm ghcr.io/lidofinance/hardhat-node:2.23.0
55+ docker run -p 8545:8545 -it --rm ghcr.io/lidofinance/hardhat-node:2.23.0-scratch
3556```
3657
37- If you don't need testing ant hoodi use ` -hoodi-fork ` node, for example:
58+ If you want to fork hoodi use ` -hoodi ` node, for example:
3859
3960``` bash
40- docker run -e ETH_RPC_URL=your_url -p 8545:8545 -it --rm ghcr.io/lidofinance/hardhat-node:2.22.18.1 -hoodi-fork
61+ docker run -e ETH_RPC_URL=your_url -p 8545:8545 -it --rm ghcr.io/lidofinance/hardhat-node:2.23.0 -hoodi
4162```
4263
4364### Forking fork chainId issue
@@ -59,3 +80,23 @@ To fix this `chainId` must not be set in the forked node. To do so set `DONT_SET
5980- merge the PR
6081- create a new tag with the version ` git tag -a <version> -m "Hardhat version <version>" `
6182- push the tag ` git push --tags `
83+
84+ ### Available Environment Variables
85+
86+ The following environment variables can be used to configure the hardhat node:
87+
88+ - ` INFURA_TOKEN ` - Token for Infura provider
89+ - ` ALCHEMY_TOKEN ` - Token for Alchemy provider
90+ - ` ETH_RPC_URL ` - Custom Ethereum RPC URL
91+ - ` ARB_RPC_URL ` - Custom Arbitrum RPC URL
92+ - ` OPT_RPC_URL ` - Custom Optimism RPC URL
93+ - ` DONT_SET_CHAIN_ID ` - Set to any value to prevent setting chainId (useful when forking)
94+ - ` HARDFORK ` - Specify the hardfork to use (defaults to "cancun")
95+
96+ ### Available Node Types
97+
98+ The following node types are available as different Docker image tags:
99+
100+ - ` :latest ` or ` :<version> ` - Mainnet fork node
101+ - ` :<version>-scratch ` - Fresh node without forking
102+ - ` :<version>-hoodi-fork ` - Hoodi network fork node
0 commit comments