ScopeBots

All tools / Compare

Foundry vs Hardhat: Solidity frameworks compared

Foundry and Hardhat are both free, open-source toolkits for building, testing and deploying Solidity contracts. Foundry is a set of Rust command-line tools (forge, cast, anvil, chisel); Hardhat 3 is a Node.js environment built around plugins that runs both Solidity and TypeScript tests. The main differences are the language you test in and how much you want a JavaScript project around your contracts.

FoundryHardhat
ChainsEthereum Any EVM chainEthereum Any EVM chain
Best forFast Solidity build, test and deploy toolkitPlugin-based TypeScript environment for EVM contracts
Confirmed featuresCompile contracts · Local test chain · Testing framework · Fuzz or property testing · Fork mainnet for tests · Deployment scripting · Contract verification · Build and sign transactionsCompile contracts · Local test chain · Testing framework · Fuzz or property testing · Fork mainnet for tests · Deployment scripting · Contract verification
Free optionFree and open source, dual-licensed MIT or Apache-2.0. Install with foundryup. Source: Foundry free optionFree and open source (MIT on npm). Hardhat 3 needs Node.js v22.13.0 or later. Source: Hardhat free option
PriceFree (open source)Free (open source)
MakerFoundry contributors (foundry-rs)Nomic Foundation
Last checkedOct 25, 2026 (source: Foundry listing)Oct 29, 2026 (source: Hardhat listing)
Try itVisit FoundryVisit Hardhat

Pick Foundry if…

Your team wants to write tests in Solidity and work from the command line: forge builds, tests and fuzzes, cast sends transactions and reads chain data, and anvil runs a local node. No Node.js project is required.

Pick Hardhat if…

Your team lives in TypeScript: Hardhat 3 runs Solidity tests and TypeScript tests with viem or ethers.js, deploys with Hardhat Ignition, and adds features through plugins. Its docs also cover Foundry compatibility if part of the team uses forge.

Our verdicts

Foundry

A Rust toolkit (Forge, Cast, Anvil, Chisel) for compiling, testing, deploying and poking at Solidity contracts, popular for fast tests and fuzzing. Free and open source. Its docs name Ethereum and otherwise work on any EVM chain, so we don't give it chain-specific badges.

Hardhat

A plugin-based TypeScript development environment to compile, test, debug and deploy EVM contracts, with a large plugin ecosystem. Free and open source. Its docs name Ethereum mainnet and testnets and otherwise target any EVM chain.

See every pick in Smart contracts & SDKs. Prices change often, so confirm on each maker's site before you buy.

Know when chain support changes

One short email when we add tools or a tool adds, drops or deprecates a chain. Nothing new, no email. Unsubscribe anytime.