GithubHelp home page GithubHelp logo

comingalive / hardhat-jest-example Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 611 KB

Hardhat TypeScript Jest Dev Starter Kit

Shell 2.74% Solidity 16.98% TypeScript 78.48% JavaScript 1.80%
ethereum hardhat jest typechain waffle

hardhat-jest-example's Introduction

Hardhat TypeScript Jest Dev Starter Kit

Mocha and Chai instead of Jest: https://github.com/rhlsthrm/typescript-solidity-dev-starter-kit

Consists of:

  1. Hardhat - Ethereum development environment.
  2. Ethers - Ethereum interactions and utilities.
  3. TypeChain - TypeScript typings generator.
  4. Jest - testing framework.
  5. Waffle - testing matchers.

How to use

Clone repo and install dependencies:

git clone https://github.com/comingAlive/hardhat-jest-example.git
cd hardhat-jest-example

npm install
# or
yarn

Available Functionality

Build Contracts and Generate Typechain Typings

yarn compile

Run Contract Tests.

jest

Start a local node.

hardhat node

Run Contract Test on the local network.

yarn test -- --network localhost

Deploy to Ethereum

Create/modify network config in hardhat.config.ts and add API key and private key, then run:

hardhat run --network rinkeby scripts/deploy.ts

Verify on Etherscan

Add Etherscan API key to hardhat.config.ts, then run:

hardhat verify-contract --contract-name Counter --address <DEPLOYED ADDRESS>

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.