explaingit

nomicfoundation/hardhat

8,473TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TLDR

Hardhat is a professional development toolkit for building Ethereum blockchain applications, it handles compiling, deploying, automated testing, and debugging smart contracts in one workflow.

Mindmap

mindmap
  root((Hardhat))
    What it does
      Compile contracts
      Deploy to network
      Run tests
      Debug errors
    Tech Stack
      TypeScript
      Node.js
      Ethereum
    Use Cases
      New project setup
      Contract testing
      Testnet deployment
    Audience
      Ethereum developers
      DApp builders
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Set up a new Ethereum project using the interactive terminal setup command

USE CASE 2

Compile and deploy smart contracts to an Ethereum network

USE CASE 3

Write and run automated tests for smart contract code

USE CASE 4

Step through and debug a smart contract transaction to find where it fails

Tech stack

TypeScriptNode.jsEthereum

Getting it running

Difficulty · moderate Time to first run · 30min

Full documentation for Hardhat 3 lives on the project website rather than in the README, check there before starting.

In plain English

Hardhat is a toolkit for developers building software on Ethereum, the blockchain platform known for smart contracts. Smart contracts are programs that run directly on the Ethereum network, and writing them requires a different kind of workflow than typical software. Hardhat provides the tools to compile those contracts, deploy them to a network, write automated tests, and step through bugs when something goes wrong. The project describes itself as a development environment for professionals, meaning it is built for people actively writing and shipping Ethereum-based applications rather than beginners exploring the concept for the first time. That said, starting a new project is straightforward: running a single command in a terminal begins an interactive setup process that walks you through the initial configuration. The README for this repository covers Hardhat 3, which is the latest major version. If you are working with an older project using Hardhat 2, a separate branch of the repository holds that version's code and documentation. The full documentation for Hardhat 3 lives on the project's website rather than in the README itself, so the README is intentionally brief and points readers outward. Hardhat is maintained by the Nomic Foundation, an organization focused on Ethereum developer tooling. The project is open to contributions, and the repository includes a separate contributing guide with instructions for setting up a local development environment to work on Hardhat itself.

Copy-paste prompts

Prompt 1
Set up a new Hardhat 3 Ethereum project using the interactive setup command, then walk me through the resulting folder structure and what each file does.
Prompt 2
Write a Hardhat test in TypeScript that deploys a simple ERC-20 token contract and checks that the deployer receives the initial supply.
Prompt 3
I have a Hardhat 2 project and want to migrate it to Hardhat 3, what breaking changes should I look out for and what steps should I take?
Prompt 4
Configure a Hardhat project to deploy a smart contract to the Ethereum Sepolia testnet, including the network config, an env file for the private key, and a deploy script.
Prompt 5
Show me how to use the Hardhat debugger to step through a failing smart contract transaction and identify where it reverts.
Open on GitHub → Explain another repo

← nomicfoundation on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.