Overview
Hardhat is an open-source development environment for Ethereum smart contracts, providing local network testing, debugging, and task automation. It is a standard tool in Solidity development. Hardhat's local network and stack traces made contract development significantly more productive.
How It Works
Developers write and compile Solidity contracts, then deploy them to a Hardhat local network that simulates the Ethereum runtime. The environment provides deterministic testing, console logging, and detailed stack traces for debugging. A task system automates common workflows such as deployment and verification.
Key Features
The local network offers fast iteration with configurable accounts and gas. Hardhat's debugging output identifies failing calls and state changes. Its plugin ecosystem integrates with testing libraries, deployment tools, and Etherscan verification.
Pricing
Hardhat is open source and free to use. Developers pay only for any infrastructure they choose, such as mainnet API providers or contract verification services. There are no license costs for the core tooling.
Alternatives
Hardhat competes with Foundry, which offers a Rust-based alternative, and with Truffle, an older framework. Hardhat's JavaScript-based tooling and mature ecosystem make it a common choice, while Foundry appeals to developers seeking speed and on-chain testing.