Skip to content

Latest commit

 

History

History
79 lines (50 loc) · 1.04 KB

File metadata and controls

79 lines (50 loc) · 1.04 KB

Development

Local environment

npx hardhat node

Mainnet forking

npx hardhat node --fork <https://eth-mainnet.alchemyapi.io/v2/API_KEY>

https://hardhat.org/guides/mainnet-forking.html#mainnet-forking

Testing

npm run test

Single files

npm run test test/MasterChef.test.js

Mocha & Chai with Waffle matchers (these are really useful).

https://ethereum-waffle.readthedocs.io/en/latest/matchers.html

Running Tests on VSCode

https://hardhat.org/guides/vscode-tests.html#running-tests-on-visual-studio-code

Seeding

npx hardhat run --network localhost scripts/seed.js

Console

npm run console

npx hardhat --network localhost console

https://hardhat.org/guides/hardhat-console.html

Coverage

npm run test:coverage

https://hardhat.org/plugins/solidity-coverage.html#tasks

Gas Usage

npm run test:gas

https://github.com/cgewecke/hardhat-gas-reporter

Lint

npm run lint

Watch

npx hardhat watch compile