Skip to content
Discussion options

You must be logged in to vote

There is not an easy way to create an ephemeral network based on a passed in config. You can import hardhat in a standalone script that will run a node:

const hre = require("hardhat");

However this reads the config from a Hardhat config file in the current working directory - not what you are after. It is also limited to one Hardhat network per node process.

See the docs for more details on use a Hardhat node from a script.

This is a limitation we explicitly looking to overcome in Hardhat v3, which we are actively working on.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by kanej
Comment options

You must be logged in to vote
1 reply
@kanej
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants