Mocha and Chai instead of Jest: https://github.com/rhlsthrm/typescript-solidity-dev-starter-kit
Consists of:
- Hardhat - Ethereum development environment.
- Ethers - Ethereum interactions and utilities.
- TypeChain - TypeScript typings generator.
- Jest - testing framework.
- Waffle - testing matchers.
Clone repo and install dependencies:
git clone https://github.com/comingAlive/hardhat-jest-example.git
cd hardhat-jest-example
npm install
# or
yarn
yarn compile
jest
hardhat node
yarn test -- --network localhost
Create/modify network config in hardhat.config.ts
and add API key and private key, then run:
hardhat run --network rinkeby scripts/deploy.ts
Add Etherscan API key to hardhat.config.ts
, then run:
hardhat verify-contract --contract-name Counter --address <DEPLOYED ADDRESS>