This project provides a modern Ethereum development environment using Hardhat, Viem, and TypeScript, offering a fast, type-safe, and developer-friendly foundation for building, testing, and deploying smart contracts.
It includes a sample smart contract, an associated unit test suite, and a Hardhat Ignition module for streamlined and automated deployment.
- 🔧 Hardhat Framework — Comprehensive Ethereum development toolkit for compiling, testing, debugging, and deploying smart contracts.
- 💡 Viem Integration — A lightweight, modern alternative to Ethers.js, offering improved type safety, performance, and developer ergonomics for on-chain interactions.
- 🧩 TypeScript Support — Full TypeScript configuration out of the box for strong typing, IntelliSense, and enhanced development reliability.
- 🧪 Built-in Sample Contract & Test Suite — Includes an example Solidity contract (
Lock.sol) and a corresponding test file to validate deployment and core logic using Hardhat’s testing environment. - 🚢 Hardhat Ignition Module — Simplifies deployment through structured and configurable deployment scripts, ensuring repeatable, deterministic contract deployments.
For additional documentation and configuration details:
Clone the repository and install dependencies:
npm installThis will install Hardhat, Viem, TypeScript, and all required plugins and typings for a fully functional development environment.
After installation, you can run the following commands to verify your setup:
Compile all Solidity smart contracts using Hardhat’s built-in compiler:
npx hardhat compileExecute the automated test suite to validate contract functionality:
npx hardhat testUse Hardhat Ignition to deploy your sample contract:
npx hardhat ignition deploy ./ignition/modules/Lock.ts| Layer | Technology | Purpose |
|---|---|---|
| Smart Contracts | Solidity (via Hardhat) | Core blockchain logic |
| Development | Hardhat | Local Ethereum dev environment |
| Type Safety | TypeScript | Strong typing and IDE support |
| Blockchain Interaction | Viem | Modern type-safe Ethereum client |
| Deployment | Hardhat Ignition | Structured and reproducible deployments |
| Testing | Mocha / Chai | Contract validation and assertions |
This boilerplate serves as a next-generation Ethereum development template, combining the robustness of Hardhat with the type-safe performance of Viem and TypeScript. It’s ideal for developers who want a modern, scalable, and production-ready setup for building Web3 applications or smart contract systems.