Hardhat
Development environment for compiling, testing, debugging and deploying Solidity contracts on EVM chains.
No project pays to be listed. How we rank
Hardhat key facts
| Category | Smart contract tool |
|---|---|
| Chains | Ethereum and EVM networks |
| Platforms | macOS, Linux, Windows |
| Company | Nomic Foundation |
| Open source | Yes, on GitHub (NomicFoundation/hardhat) |
| Launched | 2018 (repository created April 2018) |
| Free plan | Yes, free and open source (MIT) |
| Pricing | Free: MIT-licensed npm package |
What is Hardhat?
Hardhat is a development environment for Ethereum and EVM chains, built by the Nomic Foundation. Hardhat 3 adds a Rust-powered runtime and supports tests in both Solidity and TypeScript, with Viem and Ethers.js integrations.
How Hardhat works
A Hardhat 3 project centers on hardhat.config.ts, which sets the Solidity compiler, networks, plugins and tasks.
Contracts sit in contracts/, Solidity tests use the .t.sol extension, TypeScript tests live in test/, and Hardhat Ignition modules in ignition/modules describe deployments. Solidity tests are Foundry-compatible and support fuzz and invariant tests; running tests with --coverage adds built-in Solidity code coverage.
Hardhat 2's development network always behaved like Ethereum Mainnet. Hardhat 3 lets you configure several simulated networks, each with its own chain type, with first-class support for Ethereum Mainnet and OP Mainnet and a generic type for other chains. The test runner is now a plugin: official options are Mocha and the Node.js test runner, which the docs recommend. Config files must use ESM, and Configuration Variables are loaded lazily.
How to start with Hardhat
- You need Node.js v22.13.0 or later and a package manager (the docs recommend pnpm).
- In an empty folder, run npx hardhat --init and accept the defaults to get the recommended hardhat-toolbox-viem setup with a sample Counter contract, a Solidity test, a TypeScript test and an Ignition module.
- Check the install with npx hardhat --help and run npx hardhat test.
- For scripts or CI, add --template node-test-runner-viem to skip the prompts.
Hardhat fees and limits
Hardhat is open source; the root LICENSE file in the GitHub monorepo points to the license file of each package. Deploying to a live network costs gas on that network.
Risks to know before using Hardhat
- Keep RPC URLs and private keys out of hardhat.config.ts.
- Configuration Variables read from environment variables by default, and Hardhat 3 ships an official plugin that stores them encrypted on disk.
- Older projects face a migration: ESM is required for config files and plugins use a new hook system, and the docs keep a separate Migrate from Hardhat 2 guide.
Hardhat alternatives
Other projects people compare with Hardhat.
Open-source Solidity contract library plus smart contract audits and security services.
Browser-based IDE for writing, compiling, testing and deploying Solidity smart contracts.
Open-source Rust toolkit for building, testing, fuzzing and deploying Solidity smart contracts.
Where Hardhat ranks on DappAtlas
Listed next to Hardhat
Hardhat pros and cons
- Tests in Solidity or TypeScript in Hardhat 3
- Viem and Ethers.js integrations for TypeScript tests
- Free and open source on GitHub
- Hardhat 3 changes configuration, so older plugins and projects may need migration
- Needs a Node.js project, unlike a single Foundry binary
Hardhat FAQ
What is Hardhat?
Hardhat is a development environment for Ethereum and EVM chains, built by the Nomic Foundation. Hardhat 3 adds a Rust-powered runtime and supports tests in both Solidity and TypeScript, with Viem and Ethers.js integrations.
Which chains does Hardhat support?
Ethereum and EVM networks.
How much does Hardhat cost?
Free: MIT-licensed npm package, according to Hardhat’s own page (checked Oct 1, 2026). Free plan: Yes, free and open source (MIT).
Sources
How this page works
Sources: Hardhat: official site, Hardhat: Home, Hardhat: GitHub repository. Data as of Oct 1, 2026.
Not affiliated with any project listed. Educational content, not financial advice.