Hardhat Cheat Sheet

Compile a contract:

npx hardhat compile

This command compiles all the contracts in side the "contracts" folder

Deploying & Testing your contract:

  1. Start a local node:
npx hardhat node
  1. Open a new terminal

  2. Run tests on the contract

npx hardhat test

Assuming that the test script already deploys the contract for you... If not use:

npx hardhat deploy