Giter Club home page Giter Club logo

hardhat's Introduction

hardhat-framework

This package helps configuring a repo for hardhat development the Boring way. This is very opinionated :)

Creating a new project

We will do this using the yarn package manager, starting with:

yarn init yarn add --dev boringcrypto/hardhat-framework yarn boring init

Setting up your .env

You can include your environment variables in a .env file in the root of your repo. Alternatively you can set an actual environment variable called DOTENV_PATH to point to a central .env file to be used. This way you can use the same environment settings accross multiple projects.

Some useful settings:

ALCHEMY_API_KEY=
COINMARKETCAP_API_KEY=
HARDHAT_NETWORK=hardhat
HARDHAT_MAX_MEMORY=4096
HARDHAT_SHOW_STACK_TRACES=true
HARDHAT_VERBOSE=true

Goals

  • Compile solidity contracts yarn compile

  • Run hardhat as ETH mainnet fork yarn hardhat node

  • Create typescript binding for all contracts automatic on compile

  • Run coverage check yarn hardhat coverage

  • Run gas report

  • Flatten contracts correctly

  • Handle deployments of flattened contract

  • Verify on Etherscan

  • Auto-run prettier on pre-commit

  • Code completion in tests and scripts

  • Mainnet forking fixed to the block 6 blocks before the current one

Recommended VSCode extentions

  • solidity - Juan Blanco
  • Mocha Test Explorer - Holger Benl
  • Vue Language Features (Volar) - Johnson Chu

hardhat's People

Contributors

boringcrypto avatar zeekay avatar

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.