A clean Hardhat Ignition project for smart contract development.
# Install dependencies
npm install
# Compile contracts
npm run compile
# Run tests
npm test
# Deploy to local network
npx hardhat ignition deploy ignition/modules/Lock.ts --network localhost
# Deploy to testnet (sepolia)
npx hardhat ignition deploy ignition/modules/Lock.ts --network sepolianpm run compile- Compile contractsnpm run test- Run testsnpm run coverage- Generate test coverage reportnpm run gas-report- Generate gas usage reportnpm run clean- Clean build artifactsnpm run lint- Lint TypeScript and Solidity filesnpm run format- Format code
Copy .env.example to .env and configure:
SEPOLIA_RPC_URL- RPC URL for Sepolia testnetMAINNET_RPC_URL- RPC URL for Ethereum mainnetPRIVATE_KEY- Your wallet private key (without 0x prefix)ETHERSCAN_API_KEY- For contract verificationCOINMARKETCAP_API_KEY- For gas reportingREPORT_GAS- Set to true to enable gas reporting
contracts/- Solidity smart contractsignition/modules/- Hardhat Ignition deployment modulestest/- Contract testsscripts/- Utility scripts