Giter VIP home page Giter VIP logo

Comments (1)

shawnharmsen avatar shawnharmsen commented on June 14, 2024 3
  1. nothing on npm yet so trying locally
  2. Documenting how to get it working locally for reference below

Steps to use locally

  1. clone https://github.com/foundry-rs/hardhat
  2. npm i && npm run build
  3. 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"
  }
}
  1. 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 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
  • TBD

from hardhat.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.