Before first commit with this template remove unnecessary code examples, like CustomToken etc.
Clone this repository, then install the dependencies with npm install, then compile contracts with npm run compile.
npm run test
npm run coverage
npm run doc or npx hardhat docgen
The document will be created in the docs folder.
Check about NatSpec to know how to describe your contract to docgen.
Script to deploy CustomToken in rinkeby.
create .env-rinkeby before.
npx hardhat run --network rinkeby scripts/deployCustomToken.ts
npx hardhat getBalanceByAddress --network rinkeby --token TOKEN_ADDRESS --user OWNER_ADDRESS
Mocha Test Explorer
As we are using typescript tests, we nee to add following attribute in settings.json file (Visual Studio Code global settings):
"mochaExplorer.files": "test/**/*.{j,t}s",
If you see "Mocha: Error" in test explorer, ensure that npx hardhat test works.
npx hardhat verify --network rinkeby CONTRACT_ADDRESS ARG1 ARG2
To verify upgradable contract - you need use address of implementation as CONTRACT_ADDRESS
Btw you can verify your contract with deploy. You can find example how do it in deploy scripts.
Wizard is a useful generator of smart contracts.