Set environment variables:
cp .env.sample .envInstall dependencies, and compile source code:
npm install
npx hardhat clean
npx hardhat compileexport REPORT_GAS=true
npx hardhat testnpx hardhat coverage
open coverage/index.htmlCheck if coverage threshold has been met:
npx istanbul check-coverage --lines 90
Start a local node:
npx hardhat nodeDeploy a smart contract to the local network:
npx hardhat run --network localhost scripts/deploy-<contract>.tsDeploy a smart contract to the Sepolia test network:
npx hardhat run --network sepolia scripts/deploy-<contract>.tsVerify a contract on Etherscan:
npx hardhat verify --network <network> <contract address> <constructor parameters>