$ npm use
$ npm install
Create your smart contract in contracts/
folder
Set solidity version in hardhat.config.ts file, solidity -> compilers -> version, then run compilation
$ npx hardhat compile
Create your tests in test folder. To set typed test, describe types in test.config.d.ts
. Then, use it with Mocha.Context (this)
Run tests with command:
$ npx hardhat test TEST_PATH
Run tests and calculate gasPrice with command:
$ REPORT_GAS=true npx hardhat test
Run deploy in hardhat network
$ npx hardhat deploy
Run deploy in ropsten network
$ npm run deploy:ropsten
Run deploy in ropsten network for new contract
$ npm run deploy:ropsten:new
Run verify in ropsten network
$ npm run verify:ropsten
- Hardhat documentation: https://hardhat.org/getting-started/
- Style Guide: https://docs.soliditylang.org/en/v0.8.13/style-guide.html#style-guide
- Common Patterns: https://docs.soliditylang.org/en/v0.8.13/common-patterns.html
- Security Considerations: https://docs.soliditylang.org/en/v0.8.13/security-considerations.html#security-considerations