This boilerplate contains preconfigured HardHat Ethereum development environment with additional tools, providing an easy start for a new smart contract project.
- Use preconfigured linter and formatter for TypeScript and Solidity would reduce efforts to keep codebase clean (via an automation) and let you focus on development of product features instead.
- Get advantages of TypeScript type inference system to avoid bugs in scripts and tests, therefore improving their quality.
- Get support for
.env
files to manage credentials and access them from scripts and tests easily. - Use GitHub Actions workflow to apply continuous integration practice without additional efforts.
- Get enhanced development experience by using suggested IDE extensions. Template contains initial configuration.
- Preinstall NodeJS of compatible version. If there is a need to run different NodeJS versions, consider using NVM or similar tool for your platform.
nvm install nvm use node --version npm --version
- Create new repository, using this template.
- Clone newly created repository and switch to its directory.
- Install dependencies:
npm install
- Install Visual Studio Code IDE and extensions.
- Tune settings according to your personal preference and start your development.
This project template relies on following notable dependencies:
- @openzeppelin/contracts
- Widely used primitives and components to develop smart-contracts. In case if you prefer to use upgradability, consider to use @openzeppelin/contracts-upgradeable instead.
- dotenv
- Support for
.env
files in tests and scripts.
- Support for
- ethers
- Wallet implementation and utilities in JavaScript and TypeScript.
- solidity-coverage
- Code coverage for Solidity testing.
- hardhat-abi-exporter
- Simplified smart-contract ABI export on compilation via Hardhat.
- hardhat-contract-sizer
- Bytecode size estimaton for compiled smart-contracts.
- hardhat-gas-reporter
- Estimate gas usage for executed unit tests.
- typescript
- Support for TypeScript.
- prettier and prettier-plugin-solidity
- Automated code formatting for JavaScript, TypeScript and Solidity.
- @typescript-eslint/parser and @typescript-eslint/eslint-plugin
- ESLint linter support for TypeScript.
- @nomiclabs/hardhat-solhint
- SolHint linter support for Solidity.
- @nomiclabs/hardhat-etherscan
- EtherScan smart-contract verification service support for HardHat.
We recommend using Visual Studio Code IDE alongside with following extensions to enhance development experience: