This repository was generated from a template or is the template itself. For more information, see docs/TEMPLATE.md.
Install dependencies via Yarn:
yarn install
Compile contracts via Buidler:
yarn run buidler compile
By default, Buidler uses the BuidlerEVM.
To use Ganache, append commands with --network localhost
, after having started ganache-cli
in a separate process:
yarn run ganache-cli
To use an external network via URL, set the URL
environment variable and append commands with --network generic
:
URL="https://mainnet.infura.io/v3/[INFURA_KEY]" yarn run buidler test --network generic
Test contracts via Buidler:
yarn run buidler test
If using a supported network (such as Ganache), activate gas usage reporting by setting the REPORT_GAS
environment variable to true
:
REPORT_GAS=true yarn run buidler test --network localhost
Generate a code coverage report for Solidity contracts:
yarn run buidler coverage