English | 简体中文
npm install -g pnpm
pnpm install
pnpm prepare
# 执行合约编译
pnpm compile
# 执行合约部署
pnpm deploy
# 执行合约测试用例
pnpm test
# 合约测试覆盖率
pnpm coverage
# 合约大小检测
pnpm size
# 导出abi文件
pnpm abi
# 全局格式化检测
pnpm lint
# 全局格式化执行
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
部署合约到特定网络
npx hardhat run --network rinkeby deploy/deploy.ts
验证已部署的合约
npx hardhat verify --network rinkeby "DEPLOYED_CONTRACT_ADDRESS" "constructor-args1" "constructor-args2"