English | 简体中文
npm install -g pnpm pnpm install pnpm prepare
# Compile the contract
pnpm compile
# Deploy the contract
pnpm deploy
# Run contract test cases
pnpm test
# Check contract code coverage
pnpm coverage
# Check contract size
pnpm size
# Export ABI file
pnpm abi
# Perform global formatting check
pnpm lint
# Perform global formatting write
pnpm lint:fix
npx hardhat accounts npx hardhat compile npx hardhat clean npx hardhat test npx hardhat node npx hardhat help REPORT_GAS=true npx hardhat test npx hardhat coverage npx hardhat run scripts/deploy.ts TS_NODE_FILES=true npx ts-node scripts/deploy.ts npx eslint '**/*.{js,ts}' npx eslint '**/*.{js,ts}' --fix npx prettier '**/*.{json,sol,md}' --check npx prettier '**/*.{json,sol,md}' --write npx solhint 'contracts/**/*.sol' npx solhint 'contracts/**/*.sol' --fix
Deploy the contract to a specific network
npx hardhat run --network rinkeby deploy/deploy.ts
Validate deployed contracts
npx hardhat verify --network rinkeby "DEPLOYED_CONTRACT_ADDRESS" "constructor-args1" "constructor-args2"