-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: copy across network config extensions #7106
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
base: main
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should merge these recursively, but this seems good enough for now.
I have spoken with Pato on this to check the logic. |
2819642
to
94c0577
Compare
Allow network config to have unspecified properties to support plugins extending the network config. We disable a test that specifically checks whether we error for users combining both HTTP and EDR network config properties. It is not obvious how we keep this test and allow network config extensions.
This is to support type extensions
This is a preparatory move before we rework it to support plugin additions.
94c0577
to
bb1f279
Compare
Plugins can extend network config, but the config generated for a new network connection was missing those extensions (they where not being copied across).
This is in response to a bug booting
npx hardhat node
from thev3-hh-ledger
branch within the example-project. If you runpnpm hardhat node
you get an error:The issue is that the Ledger handler assumes that
networkConnection.networkConfig.ledgerAccounts
is populated:The version of
networkConfig
associated with the connection is a clone, but the bug is that theledgerAccounts
are not being copied across.This PR updates the config creation during network connection creation to merge the user provided network config (extended by plugins) and the overrides.
Test locally
cd v-next/example-project pnpm build pnpm hardhat node