A BoilerPlate Template Project To Start Solidity Development With Hardhat and Typescript. All you have to do is create a new repository from the template and start coding your smart contracts.
- Typechain plugin enabled (typescript type bindings for smart contracts)
- Ignition for contract deployment
- Testing environment configured and operational, with test coverage
- Prettier and eslint configured for project files and solidity smart contract
- Solhint configured for enforcing best practices
- Github actions workflows prepared for CI/CD
- Prepared Smart Contract Examples, Tests, Deployments and Tasks for Common ERC Standards (ERC20, ERC721, ERC1155)
Check the Hardhat documentation for more information.
https://hardhat.org/getting-started/
.
├── contracts
│ ├── BasicERC1155.sol
│ ├── BasicERC20.sol
│ └── BasicERC721.sol
├── ignition
│ ├── deployments
│ ├── modules
│ │ ├── BasicERC1155Module.ts
│ │ ├── BasicERC20Module.ts
│ │ └── BasicERC721Module.ts
│ └── parameters
│ └── custom.json
├── tasks
│ ├── erc1155
│ │ ├── base-uri.ts
│ │ ├── contract-uri.ts
│ │ └── mint.ts
│ ├── erc20
│ │ └── mint.ts
│ ├── erc721
│ │ ├── base-uri.ts
│ │ ├── contract-uri.ts
│ │ └── mint.ts
│ └── utils
│ ├── accounts.ts
│ ├── balance.ts
│ ├── block-number.ts
│ └── send-eth.ts
├── test
│ ├── BasicERC1155.ts
│ ├── BasicERC20.ts
│ └── BasicERC721.ts
└── hardhat.config.ts
- Hardhat Network (localhost)
- Ethereum Mainnet
- Ethereum Sepolia Testnet
- Polygon Mainnet
- Polygon Mumbai Testnet
Feel free to add more networks in hardhat.config.ts file.
npx hardhat compile- to compile smart contract and generate typechain ts bindingsnpx hardhat test- to run testsnpx hardhat ignition- to deploy smart contractsnpx hardhat node- to run a localhost nodenpx hardhat help- to see all available commands
npm installnpm run compileThis project uses Hardhat Keystore to securely manage sensitive configuration variables like private keys and RPC URLs. Secrets are stored encrypted and never committed to disk in plain text.
Set your private key
npx hardhat keystore set PRIVATE_KEYSet your RPC URLs (for the networks you plan to use)
npx hardhat keystore set SEPOLIA_RPC_URL
npx hardhat keystore set MAINNET_RPC_URLSet your Etherscan API key (for contract verification)
npx hardhat keystore set ETHERSCAN_API_KEYList stored variables
npx hardhat keystore listThis is an example flow to deploy an ERC721 token to a public network and interact with it.
npx hardhat ignition deploy ignition/modules/BasicERC721Module.ts --network sepoliaVerify contract
npx hardhat ignition verify chain-11155111 --network sepolianpx hardhat ignition deploy ignition/modules/BasicERC721Module.ts --network sepolia --verifyLook at ignition/parameters/custom.json to see how to adjust contract parameters
npx hardhat ignition deploy ignition/modules/BasicERC721Module.ts --network sepolia --verify --parameters ignition/parameters/custom.jsonnpx hardhat erc721-mint \
--contract 0x3fCB912bfb67B78121C5F326C24fBb0D2ca146dD \
--recipient 0x73faDd7E476a9Bc2dA6D1512A528366A3E50c3cF \
--network sepolianpm run testnpm run coveragenpm run format:check
npm run format:writenpm run lint:check
npm run lint:fixnpm run sol:format:check
npm run sol:format:writenpm run solhintThis repo is configured for Claude Code with project conventions, automated agents, and skills. Claude follows the instructions in CLAUDE.md when working in this project.
npm install -g @anthropic-ai/claude-code
claudeRun claude in the project root — it automatically reads CLAUDE.md for project conventions.
| Command | Description |
|---|---|
/new-contract |
Scaffolds a new Solidity contract with test file, Ignition module, and Hardhat tasks. Asks for contract name, token standard, and features, then generates all files following project conventions. |
/deploy-check |
Runs a pre-deployment checklist: compile, test, coverage, lint, format check, Ignition module review, and network config verification. Outputs a PASS/FAIL/WARN summary table. |
- Security Reviewer — Comprehensive security review agent that analyzes contracts for vulnerabilities, incentive design issues, and OpenZeppelin v5 best practices. Invoke with:
claude "review BasicERC20.sol for security" --agent security-reviewer
- Auto-format on save — Edited
.tsand.solfiles are automatically formatted with Prettier after each edit. - Protected files —
.envandpackage-lock.jsonare blocked from direct edits.
Need additional help with your solidity project?
Protokol builds custom blockchain and web3 solutions for organisations of all sizes. We build everything from smart contracts, to dApps, to fully bespoke web3 solutions.
Reach out at protokol.com/contact to learn how our web3 development services could help bring your project to life.
Looking for an exciting new role in web3?
Head over to protokol.com/careers to discover the roles we have available or to submit your résumé.
