Make sure you have pnpm installed. (How to install)
Before running any command, make sure to install dependencies:
$ pnpm installCreate environment files, and replace environment variables with your own values
cp ../.env.example ../.envCompile the smart contracts and generate TypeChain artifacts:
$ pnpm clean
$ pnpm compileLint the Solidity code:
$ pnpm lint:solRun the tests:
$ pnpm testGenerate the code coverage report:
$ pnpm coverageGenerate ABI of contracts.
The generated ABI can be found within abis/ folder
We generate both human readable ABI
pnpm run clear-abi
pnpm run export-abiSee the gas usage per unit test and average gas per method call:
$ REPORT_GAS=true pnpm testDelete the smart contract artifacts, the coverage reports and the Hardhat cache:
$ pnpm cleanContracts written here have deploy scripts written in scripts/ directory.
The commands to run them are documented in package.json.
To get a better grasp of how the scripts can be used to deploy / interact with contracts.
Refer DEPLOY_STEPS.md
Additionally if you are using vscode -> debug scripts are written up in launch.json
to make it easier to debug the script while running them.
Note: This package skeleton was generated using hardhat advanced generator