$ account NomicFoundation
Hardhat is a professional Ethereum smart-contract development environment, implemented as a large TypeScript monorepo. In production it operates as a CLI and programmatic framework that compiles Solidity, runs tests against local or remote networks, deploys contracts, verifies source code on block explorers, and manages project secrets and hardware-wallet signing. The core `hardhat` package provides a task runner, plugin system (`definePlugin`), hook handlers, config loading, and a Hardhat Runtime Environment, while companion packages add viem/ethers client integration, chai matchers, the Ignition declarative deployment engine, verification against Etherscan/Blockscout/Sourcify, Mocha and node:test runners, Foundry remapping support, coverage, gas analytics, and alternative Slang/Solx compiler backends. The architecture is a modular, hook-driven monorepo of 30+ packages. The core exposes lifecycle hooks for config, network, HRE, Solidity, and testing; plugins register tasks, global options, and hook handlers that compose through `next()` chains. Ignition-core implements a journal-based deployment state machine with reconciliation, execution strategies, and nonce management, making deployments resumable and auditable. The network layer abstracts JSON-RPC providers over HTTP and EDR-backed simulated networks, with request handlers for gas estimation, account management, and chain validation. Entry points include `packages/hardhat/src/cli.ts`, `packages/hardhat/src/hre.ts`, `packages/hardhat/src/config.ts`, and `packages/ignition-core/src/deploy.ts`. The codebase is well-engineered and heavily tested, with fixture projects, CI workflows, changesets, e2e scenarios against real-world projects, and benchmark infrastructure. It is current with Node 24 and modern TypeScript/ESM patterns. Notable minor issues include duplicated helper code across packages, hand-maintained chain/explorer mappings and hardfork lists, and some fragile workarounds around third-party CJS/ESM interop. Overall, it is a strong, actively maintained developer-tooling codebase with several genuinely reusable internal components.