Repository navigation
[HARDHAT 3] Configuring and connecting to local network created by node task #7257
Replies: 1 comment 2 replies
|
Hey @Tilt-github thanks for the feedback. Absolutely, we will update the docs with this info. In Hardhat 3 we support having multiple networks connected to at once. These connections can be to remote If no network config is specified when configuring a new node (e.g. in-memory for tests or as part of networks: {
default: {
type: "edr-simulated",
chainType: "generic",
mining: {
auto: false,
interval: 1000,
},
},
}The You can specify different configuration settings when starting a local node with: npx hardhat node --network my-network-config |
Uh oh!
There was an error while loading. Please reload this page.
This question is about changes introduced in hardhat 3, NOT hardhat 2.
In Hardhat 2 I could configure the network created by the node task through the network named "hardhat" in hardhat.config.ts.
I could also set that the default network (when not using the --network cmd line flag) by using the the property defaultNetwork. For example:
defaultNetwork: "localhost" //to set the node task network as defaultBut the
defaultNetworkproperty is no longer supported in hardhat.config.ts in hardhat 3.How can I do all that in hardhat 3. This is not explained anywhere on the docs pages.
In hardhat 3:
I really suggest these questions are clearly addressed in the docs pages. This is elementary stuff that shouldn't be missing from the official documentation.
All reactions