Comments (1)
- nothing on npm yet so trying locally
- Documenting how to get it working locally for reference below
Steps to use locally
- clone https://github.com/foundry-rs/hardhat
npm i && npm run build
- add local @foundry-rs/hardhat-anvil to
package.json
{
"name": "hardhat-project",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.6",
"@nomiclabs/hardhat-waffle": "^2.0.3",
"chai": "^4.3.6",
"ethereum-waffle": "^3.4.4",
"ethers": "^5.6.5",
"hardhat": "^2.9.5",
"@foundry-rs/hardhat-anvil": "file:/path/to/hardhat/packages/hardhat-anvil"
}
}
hardhat.config.js
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 localhardhat-anvil
- check that
index.js
is inhardhat-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
- TBD
from hardhat.
Related Issues (15)
- Add proper CI workflows
- support hardhat test --parallel : run different anvil node for each test-file?
- hardhat-anvil allowUnlimitedContractSize doesn't work
- hardhat-anvil does not allow connecting to anvil node running in docker HOT 4
- Bug: installed from npm and have "valid main entry" error HOT 2
- Hardhat Artifact Source Name incorrect
- Tests Pass with Panic HOT 2
- Add test task
- Fix flaky tests
- Error Message when `forge` not installed HOT 1
- Failed to install solc 0.8.15: Checksum mismatch for version 0.8.15 HOT 4
- Unable to resolve import: "INSERT_CONTRACT" with remappings when using NPM workspaces HOT 2
- Error HH108: Cannot connect to the network anvil
- Access default hardhat `compile` and `test` while still using this plugin HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hardhat.