Key takeaways
- Hardhat organizes EVM contract development, testing and deployment.
- Scripts and network configuration support reproducible deployments.
- It can be combined with Foundry when a project needs different testing workflows.
What is Hardhat?
Hardhat organises EVM contract development, testing and deployment. It brings together compiler settings, networks and extensions so teams can repeat workflows locally and in continuous integration. Its role extends beyond compilation to connecting source code, artifacts and deployment operations.
Hardhat 3 supports Solidity and TypeScript tests, with integrations for tools such as Viem and Ethers. Plugins and test environments should match the project version rather than mix instructions from Hardhat 2 and 3. Version compatibility matters throughout testing, scripting and release preparation.
How it works
Projects pin compilers, dependencies and network settings. Tests execute calls against simulated environments and check results, events and reverts. A fork can use a network's state at a selected block when the RPC provides the necessary historical data access.
Deployment can use scripts or tools such as Ignition. Both approaches should retain parameters, addresses and verification records. Repeating an administrative task must not accidentally issue assets or transfer permissions again, so scripts need to inspect existing state before taking actions that modify the deployment.
What Hardhat offers
Hardhat fits projects combining contracts with TypeScript services and integration tests. An issuance flow can be tested alongside the client that prepares calls and decodes events, revealing mismatches between the interface expected by the application and the one exposed by the contract.
A delivery can include tests for roles, pause conditions, administration transfer and failing external contracts. Teams retain per-network version records so incidents can be reproduced without relying on the local configuration of the person who performed the original deployment or administrative operation.
Limitations and selection criteria
Local simulation does not reproduce every public-network condition. A fork is a state snapshot, not a guarantee of future execution. Testing should be complemented by destination checks and policies for keys, permissions and administrative transactions used to operate the application.
Choosing between Hardhat and Foundry depends on testing needs and team stack. They can coexist with explicitly aligned versions and settings. Hardhat upgrades require reviewing plugins, artifacts and script behaviour as well as checking whether the project still compiles and its tests remain meaningful.
Also known as
- Hardhat framework
- Hardhat Network





