module.exports = {
defaultNetwork: "anvil",
anvil: {
url: "http://127.0.0.1:8545/",
launch: true, // if set to true, it will spawn a new instance if the plugin is initialized
},
Troubleshooting
package.json main entry
Error: Cannot find module '...node_modules/@foundry-rs/hardhat-anvil/dist/src/index.js'. Please verify that the package.json has a valid "main" entry
npm run build at local hardhat-anvil
check that index.js is in hardhat-anvil/dist/index.js
npx hardhat node - anvil network value.url is missing
Error in plugin @nomiclabs/hardhat-anvil: Anvil network config is invalid: value.url is missing
Steps to use locally
npm i && npm run build
package.json
hardhat.config.js
Troubleshooting
package.json main entry
npm run build
at localhardhat-anvil
index.js
is inhardhat-anvil/dist/index.js
npx hardhat node
- anvil network value.url is missing