These is the list of packages installed in the repository
Hardhat is the Smart Contracts development tool itself. It helps us manage the Solidity compiler, connecting to a local blockchain and deploying contracts to the real blockchains.
$ yarn add -D hardhat
Ethers is one of the libraries that can be used to access the blockchain. It has an abstraction layer for contracts, wallets, signers, and so on
$ yarn add -D @nomiclabs/hardhat-ethers 'ethers@^5.0.0'
Reference: https://hardhat.org/plugins/nomiclabs-hardhat-ethers.html
Typescript is a typed Javascript. The typings help the development because they are checked and also the editors can show more information on functions and classes parameters.
$ yarn add -D ts-node typescript @types/node
Config file: tsconfig.json
Reference: https://hardhat.org/guides/typescript.html
Typechain will help generating typescript bindings for the Solidity contracts at compile time. Then this bindings can be used to access the contracts using typescript.
$ yarn add -D typechain @typechain/hardhat @typechain/ethers-v5 @ethersproject/bytes @ethersproject/abi @ethersproject/providers
Reference: https://www.npmjs.com/package/@typechain/hardhat
A plugin that reports the amount of gas spent on each contract's functions. Useful to estimate deployment and operations cost
$ yarn add -D hardhat-gas-reporter
Reference: https://www.npmjs.com/package/hardhat-gas-reporter
This plugin reports the size of each Solidity contract. Currently there is a limit on the contract size and if the contract goes above it, it will be rejected when trying to deploy it
$ yarn add -D hardhat-contract-sizer
Reference: https://www.npmjs.com/package/hardhat-contract-sizer
This plugin exports the ABI of the contracts into a specific directory, and it also allows to output a compact ABI format that is useful in some scenarios:
$ yarn add -D hardhat-abi-exporter
Reference: https://www.npmjs.com/package/hardhat-abi-exporter
This plugin helps verifying the contracts on Etherscan.
$ yarn add -D @nomiclabs/hardhat-etherscan
Reference: https://www.npmjs.com/package/@nomiclabs/hardhat-etherscan
Waffle is a testing framework that uses Chai and Mocha and allows to write tests that can be run directly from Hardhat
$ yarn add -D @nomiclabs/hardhat-waffle 'ethereum-waffle@^3.0.0' chai chai-ethers-bn mocha @types/chai @types/mocha
Reference: https://hardhat.org/plugins/nomiclabs-hardhat-waffle.html
Useful to get statistics on the test coverage for your contracts. It will report the percentage of code covered and the uncovered lines
$ yarn add -D solidity-coverage shelljs
Config file: .solcover.js
Reference: https://www.npmjs.com/package/solidity-coverage
This is a local blockchain that can be used to test smart contracts. It has the ability to quickly fork a real blockchain and it is a great addition to the local Hardhat node.
$ yarn add -D ganache
This tool takes care of formatting your code in a proper way and keeping all code of the same language with the same format
$ yarn add -D prettier prettier-plugin-solidity
Config files: .prettierignore and .prettierrc.yaml
Linters are a special set of tools that help identifying bad syntax in languages like Javascript. In other cases like the linter of Solidity, the tool focuses on good practices and finding possible vulnerabilities in the code
Install with its Prettier plugin as well
$ yarn add -D eslint eslint-config-prettier eslint-plugin-import @typescript-eslint/eslint-plugin @typescript-eslint/parser
Config files: .eslintignore and .eslintrc.yaml
Reference: https://github.com/eslint/eslint#installation-and-usage
Install with its Prettier plugin as well
$ yarn add -D solhint solhint-plugin-prettier
Config files: .solhint.json and .solhintignore
Reference: https://github.com/protofire/solhint
This set of contracts provides the most common functionality for the development of smart contracts. They are battle tested and will increase the security of yout contracts.
$ yarn add -D @openzeppelin/contracts
dotenv allows the loading of environment variables into our scripts. This is a standard way of defining variables specific to the environment without checking them into the repository
$ yarn add -D dotenv
Reference: https://www.npmjs.com/package/dotenv
yargs is a library for input parameter parsing. It is ideal for scripts that act as command line tools
$ yarn add -D yargs @types/yargs
Reference: https://www.npmjs.com/package/yargs
Allows to set environment variables on different systems without worrying about the syntax
$ yarn add -D cross-env
Reference: https://www.npmjs.com/package/cross-env
For project files management
$ yarn add -D fs-extra @types/fs-extra
Create more verbose command line scripts that provide an indication of current progress
$ yarn add -D cli-progress
Create better command line scripts by adding colors and making them more beautiful and useful
$ yarn add -D console-log-colors
Git hooks made easy. Helper to run pre-commit hooks before pushing to the remote repository
$ yarn add -D husky
$ npx mrm@2 lint-staged