Fork Ethereum mainnet locally with Hardhat Network
Run a local Hardhat node that mirrors live mainnet state for contract testing without deploying to a public testnet.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Run a local Hardhat node that mirrors live mainnet state for contract testing without deploying to a public testnet.
When Hardhat fork tests fail with 'block not found', gas reverts, or stale state, this guide walks a repeatable diagnostic flow—from RPC archive checks to gas-limit alignment and block pinning.
Learn how to add Hardhat’s forking to continuous‑integration workflows with a lean config, trust boundaries, sanity checks, and how to detect stale forks that could break your tests.
Learn how to configure Hardhat Network to fork Ethereum mainnet, run tests against real contract state, and avoid common pitfalls.
Learn why transactions revert when using a Hardhat fork, how to check the fork block versus contract deployment, and what fixes or escalation steps to take.
Decide when to use Hardhat’s in‑process EVM versus a pinned mainnet fork, compare trade‑offs, and see a concrete configuration with validation steps.