Skip to content

Hardhat vs Foundry in 2026: tests, fuzzing and deployment

Hardhat 3 now runs Foundry-compatible Solidity tests: what sets them apart in deployment, and an invariant campaign that passes while testing nothing.

IIsaac González9 min
Share

Hardhat and Foundry logos
Since Hardhat 3 both tools share a test format; the difference lies in how the repository is deployed and operated.
Sources
  1. Hardhat 3: what's new
  2. Hardhat 3: writing Solidity tests
  3. Hardhat 3 configuration reference
  4. Hardhat release hardhat@3.21.2 (GitHub)
  5. Hardhat Ignition: deploying a module
  6. Foundry release v1.9.0 (GitHub)
  7. Foundry configuration reference: testing
  8. Foundry: invariant testing
  9. Foundry: deploying with forge script

Frequently asked questions

No. Hardhat 3 requires the configuration to be a declarative ESM module, and plugins must be on versions compatible with its new hook system. The 2.x line is still published under the hh2 npm tag, which allows a phased migration: configuration first, then plugins, and finally tests and scripts, checking that artifacts and addresses do not change.

Got a blockchain project in mind?

From idea to product, strategy and technology must move forward together.

Tell us your idea

As featured in

CointelegraphInvesting.comEl EspañolEmprendedoresEl ObservadorCriptoNoticias