You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to use mainnet hard fork of hardhat produces the error in title.
Reproduction:
Set hardhat.config.ts FORK_MAINNET to true
Run a script using hardhat run --network hardhat <script>
Call ethers.getSigners()
Error emitting line of script:
constSigner=(awaitethers.getSigners())[0];
Hack solution
I was able to get rid of the error by deleting / commenting out:
//chainId: !forkingData ? 43112 : undefined, //Only specify a chainId if we are not forking
in hardhat.config.ts
Output:
$ npx hardhat run --network hardhat scripts/<script>
Error: Missing required chain parameter: networkId
at Common.setChain (<base_path>/node_modules/@ethereumjs/common/src/index.ts:318:17)
at new Common (<base_path>/node_modules/@ethereumjs/common/src/index.ts:286:30)
at Function.forCustomChain (<base_path>/node_modules/@ethereumjs/common/src/index.ts:237:12)
at Object.makeForkCommon (<base_path>/node_modules/hardhat/src/internal/hardhat-network/provider/utils/makeForkCommon.ts:6:17)
at Function.create (<base_path>/node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:157:22)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at HardhatNetworkProvider._init (<base_path>/node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:232:28)
at HardhatNetworkProvider._send (<base_path>/node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:180:5)
at HardhatNetworkProvider.request (<base_path>/node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:106:18)
at EthersProviderWrapper.send (<base_path>/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The text was updated successfully, but these errors were encountered:
Issue:
Attempting to use mainnet hard fork of hardhat produces the error in title.
Reproduction:
FORK_MAINNET
totrue
hardhat run --network hardhat <script>
ethers.getSigners()
Error emitting line of script:
Hack solution
I was able to get rid of the error by deleting / commenting out:
//chainId: !forkingData ? 43112 : undefined, //Only specify a chainId if we are not forking
in hardhat.config.ts
Output:
The text was updated successfully, but these errors were encountered: