Thought to have a fast way of bootstraping projects with best practice's in mind. Having linters, prettiers, standards on how to commit, and changelog creation & maintenance.
This is achieved using several hardhat plugins, and external known packages.
This boilerplate includes:
- Hardhat
- Solhint
- Prettier
- Coverage
- Gas reporter
- Commitlint
- Standard version
- Uniswap + Internal tooling
You need to setup the following GitHub secrets to run the GitHub workflows successfully:
ALCHEMYKEY: the mainnet Ethereum API key is for running e2e tests on the forked mainnet. Get the key from your app on the Alchemy Dashboard.COINMARKETCAP_API_KEY: the CoinMarketCap API key is for fetching the crypto asset prices to use during the gas report. Get the key from the CoinMarketCap Developers Dashboard.CC: Codechekcs is for code review automation. We use Codechecks for gas reporting in this project. Get the Codechecks secret by following the "Getting Started" guide on the codechecks documentation.
yarn coverage: Runs solidity code coverage
yarn fork: Runs a mainnet fork via hardhat's node forking util.yarn fork:script {script_path}: Runs the script in mainnet's fork.yarn fork:test: Runs tests that should be run in mainnet's fork.
yarn lint:fix: Runs prettier and solhint
yarn release: Runs standard changelog, changes package.json version and modifies CHANGELOG.md accordingly.
yarn test:all: Runs all solidity tests.yarn test:unit: Runs all solidity tests in folder unityarn test:e2e: Runs all solidity tests in folder e2e
yarn test:gas: Runs all tests and report gas usage.