-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mainnet forking stopped working after 2.7.1 #2630
Comments
This issue is also being tracked on Linear. We use Linear to manage our development process, but we keep the conversations on Github. LINEAR-ID: 146409a3-4675-476c-ba59-b12341a442d6 |
Ugh, this one was hard. Thanks for reporting, @pdyraga. I think the root of the issue is here: The Hardhat Network config has a
I don't know what's the right solution here. There is an open issue about this in the |
I'm going to close this issue now because there's not much we can do here. Converting the |
After an update in `deepmerge` library, `hardhat-local-networks-config` stopped working and that lead to our system tests to fail with a mysterious `TypeError: config.chains.has is not a function` error. Until the problem is not fixed in `hardhat-local-networks-config`, the plugin is removed. It was here for convenience and all tests are passing without it. See NomicFoundation/hardhat#2630
Thanks @fvictorio. I confirmed that after removing a reference to |
After an update in `deepmerge` library, `hardhat-local-networks-config` stopped working and that lead to our system tests to fail with a mysterious `TypeError: config.chains.has is not a function` error. Until the problem is not fixed in `hardhat-local-networks-config`, the plugin is removed. It was here for convenience and all tests are passing without it. See NomicFoundation/hardhat#2630
Removed hardhat-local-networks-config plugin After an update in `deepmerge` library, `hardhat-local-networks-config` stopped working and that lead to our system tests failing with a mysterious `TypeError: config.chains.has is not a function` error. Until the problem is not fixed in `hardhat-local-networks-config`, the plugin is removed. It was here for convenience and all tests are passing without it. See NomicFoundation/hardhat#2630 To test this change, try running system tests on `main`: ``` FORKING_URL=... yarn test:system --verbose ``` Then, try doing the same on this branch.
tl;dr;
When trying to
hardhat_reset
on mainnet fork, I am gettingTypeError: config.chains.has is not a function
error. The code worked fine on hardhat version2.7.1
and started failing once we updated to2.8.4
. Updating to the most recent version -2.9.3
as of now - does not help.How to reproduce
Option 1
FORKING_URL=https://eth-mainnet.alchemyapi.io/v2/<id> yarn test:system
TypeError: config.chains.has is not a function
errorIf you want to dive deeper: Go back in the history, to commit
f129e209ff70e74d37e78d4db6d7987950844bb6
, just before the version was updated you will see the tests passing. If you go to commitb8d198e9ec0e0adc91d35ad322d2815ad850a2b5
where the version was updated, you will see the tests failing.Option 2
FORKING_URL=https://eth-mainnet.alchemyapi.io/v2/<id> yarn test:system
package.json
and update Hardhat to the most recent versionFORKING_URL=https://eth-mainnet.alchemyapi.io/v2/<id> yarn test:system
TypeError: config.chains.has is not a function
Option 3
Try this piece of code with the most recent (2.9.3) hardhat version and config from either
https://github.com/threshold-network/solidity-contracts/blob/main/hardhat.config.ts
or
https://github.com/keep-network/coverage-pools/blob/main/hardhat.config.ts
You will see the test failing with
TypeError: config.chains.has is not a function
when trying tohardhat_reset
.The text was updated successfully, but these errors were encountered: