Hardhat

Development environment for compiling, testing, debugging and deploying Solidity contracts on EVM chains.

No project pays to be listed. How we rank

Facts checked Oct 1, 2026

Hardhat key facts

CategorySmart contract tool
ChainsEthereum and EVM networks
PlatformsmacOS, Linux, Windows
CompanyNomic Foundation
Open sourceYes, on GitHub (NomicFoundation/hardhat)
Launched2018 (repository created April 2018)
Free planYes, free and open source (MIT)
PricingFree: MIT-licensed npm package
About

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

  1. You need Node.js v22.13.0 or later and a package manager (the docs recommend pnpm).
  2. 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.
  3. Check the install with npx hardhat --help and run npx hardhat test.
  4. 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.
Smart contract toolmacOSLinuxWindows

Hardhat alternatives

Other projects people compare with Hardhat.

OpenZeppelin

Open-source Solidity contract library plus smart contract audits and security services.

Remix IDE

Browser-based IDE for writing, compiling, testing and deploying Solidity smart contracts.

Foundry

Open-source Rust toolkit for building, testing, fuzzing and deploying Solidity smart contracts.

Where Hardhat ranks on DappAtlas

Hardhat pros and cons

Pros
  • Tests in Solidity or TypeScript in Hardhat 3
  • Viem and Ethers.js integrations for TypeScript tests
  • Free and open source on GitHub
Cons
  • 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

  1. Hardhat: official site
  2. Hardhat: Home
  3. Hardhat: GitHub repository
  4. Hardhat: packages/hardhat LICENSE on GitHub
  5. Hardhat: packages/hardhat package.json on GitHub
  6. Hardhat: Getting started
  7. Hardhat: What's new in Hardhat 3
  8. Hardhat: GitHub license file

How this page works

Sources: Hardhat: official site, Hardhat: Home, Hardhat: GitHub repository. Data as of Oct 1, 2026.

How we review

Not affiliated with any project listed. Educational content, not financial advice.