Before jump into further, the happy case test shell is highly recommended to execute
Compiles the entire project, building all artifacts
npx hardhat compile
Runs mocha tests
npx hardhat test
Exports contracts ABIs
npm run abi
Rewrite sources with prettier formatter
npm run format
Check source format
npm run lint
List all hardhat commands
npx hardhat --help
npx hardhat wallet:add --name [name]
...
npx hardhat getTransaction --hash [hash]
...
npx hardhat multitoken:deploy
...
For more information, please refer MultiToken
npx hardhat gametoken:deploy --name [name] --symbol [symbol] --supply [supply; 1 = 10**decimals]
ex)
npx hardhat gametoken:deploy --name "Sample token" --symbol SMP --supply 1000000000
For more information, please refer GameToken
npx hardhat utilitytoken:deploy --name [name] --symbol [symbol] --minter [first minter address]
ex)
npx hardhat utilitytoken:deploy --name Candy --symbol CND --minter 0x1ABC7154748D1CE5144478CDEB574AE244B939B5
For more information, please refer GameToken
npx hardhat itemnft:deploy
...
For more information, please refer ItemNFT
// At first, you should deploy the vesting implementation contract, and then deploy serveral vesting proxy contracts for beneficiaries
npx hardhat vesting:deploy_impl
// then `~/.iskra_console/deploy/vesting-impl-address.json` file created
// Next, deploy vesting proxy contract; --beacon is optional
npx hardhat vesting:deploy {--beacon [beacon address; use the output from vesting:deploy_impl]}
// Next, you should approve game token to prepare vesting; --token is optional
npx hardhat gametoken:approve --spender [vesting proxy contract address] --amount 10000 {--token [game token address]}
// Next, prepare vesting contract for a beneficiary
npx hardhat vesting:prepare --beneficiary [a beneficiary address] --amount 10000 {--vesting [vesting proxy]} {--token [game token]} {--duration [duration; default is 36]}
// Next, set start time for vesting contract
npx hardhat vesting:setstart --start "2022-05-01 09:00:00" {--vesting [vesting proxy]}
// You can do [vesting:deploy ~ vesting:setstart] at once
npx hardhat vesting:one_stop_setup --beneficiary 0xc4417F73DaC656337cEcfee8c784130f08be4FA7 --amount 10000 --start "2022-05-01 09:00:00"
For more information, please refer Vesting