{
 "kind": "tool",
 "slug": "hardhat",
 "path": "tools/hardhat/",
 "name": "Hardhat",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Crypto and web3",
   "tools/web3/"
  ]
 ],
 "lead": "Ethereum development environment for compiling, testing and deploying smart contracts.",
 "chips": [
  {
   "label": "Crypto and web3",
   "path": "tools/web3/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install hardhat"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/NomicFoundation/hardhat"
  },
  {
   "label": "Website",
   "href": "https://hardhat.org"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/NomicFoundation/hardhat"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 23, 2026",
   "note": "Latest GitHub release Nov 12, 2026. ",
   "src": "https://github.com/NomicFoundation/hardhat"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "13 projects",
   "status": "info",
   "sub": "#6 of 155 in its category",
   "note": "Dependency in 13 public GitHub projects set up for AI coding agents that we scanned (0.2%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Docs for agents",
   "status": "yes",
   "sub": "llms.txt",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": "https://hardhat.org/llms.txt"
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Hardhat does",
   "parts": [
    {
     "t": "prose",
     "text": "Hardhat 3 runs Solidity tests on a runtime written in Rust and treats Solidity and TypeScript tests as equals, so one project can mix fast Solidity unit tests with TypeScript integration tests."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Hardhat popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "57",
       "of": "/ 100",
       "l": "Gid Score, #1227 overall"
      },
      {
       "n": "550K",
       "l": "downloads a week, npm"
      },
      {
       "n": "8,522",
       "l": "GitHub stars"
      },
      {
       "n": "13",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How Hardhat is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "Hardhat is a dependency in 13 of the 6,258 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750); counting those, it appears in 261 projects, and what it is used with below comes from all of them.",
      "Projects that use it most often also use OpenZeppelin Contracts (62.1%), viem (60.9%), dotenv (55.2%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "8 projects, 0.3%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "6 projects, 0.2%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 62.1% of its projects",
       "v": "OpenZeppelin Contracts",
       "path": "tools/openzeppelin/"
      },
      {
       "l": "In 60.9% of its projects",
       "v": "viem",
       "path": "tools/viem/"
      },
      {
       "l": "In 55.2% of its projects",
       "v": "dotenv",
       "path": "tools/dotenv/"
      },
      {
       "l": "In 47.5% of its projects",
       "v": "ethers.js",
       "path": "tools/ethers/"
      },
      {
       "l": "In 40.6% of its projects",
       "v": "Hardhat Toolbox",
       "path": "tools/nomicfoundation-hardhat-toolbox/"
      },
      {
       "l": "In 26.4% of its projects",
       "v": "Hardhat ethers Plugin",
       "path": "tools/nomicfoundation-hardhat-ethers/"
      },
      {
       "l": "In 25.7% of its projects",
       "v": "ts-node",
       "path": "tools/ts-node/"
      },
      {
       "l": "In 24.1% of its projects",
       "v": "Chai",
       "path": "tools/chai/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "Hardhat in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Solidity tests on a Rust runtime",
       "v": "Deploying, testing and debugging all run on what the site calls Hardhat's \"new runtime written in Rust\". The maintainers present this runtime as the performance story of Hardhat 3."
      },
      {
       "l": "Solidity and TypeScript tests side by side",
       "v": "You do not have to pick one test language for the whole project. The site suggests Solidity unit tests \"for speed and conciseness\", TypeScript integration tests \"for expressiveness and complexity\", and fuzz tests, decided case by case."
      },
      {
       "l": "Actionable revert errors with Solidity stack traces",
       "v": "When a transaction reverts, Hardhat shows what the site calls \"actionable errors\" next to detailed Solidity stack traces. The site says the traces pinpoint \"exactly where and why\" the code fails."
      },
      {
       "l": "Scaffolding without prompts",
       "v": "The <code>--template</code> flag creates a project without the interactive questions. The docs name automation scripts and AI agents as the reason this mode exists."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Needs a recent Node.js",
       "v": "Hardhat 3 requires Node.js v22.13.0 or later. For the package manager, the docs say \"we strongly recommend pnpm\"."
      },
      {
       "l": "Hardhat 2 material is now the old version",
       "v": "The README calls Hardhat 3 the new major version and keeps v2 on a separate branch with its own docs. The docs include a migration guide for Hardhat 2 projects and another for Foundry projects."
      },
      {
       "l": "Amsterdam hardfork support is experimental",
       "v": "The latest release adds support for several upcoming Amsterdam EIPs, and each change is labeled \"experimental\". The maintainers warn that EIP-8037 significantly changes the gas costs of state creation."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Create a Hardhat 3 project without prompts and run its tests"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Bash",
       "code": "mkdir hardhat-example\ncd hardhat-example\nnpx hardhat --init --template node-test-runner-viem\nnpx hardhat test"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about Hardhat",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Packages around it",
       "items": [
        "@openzeppelin: Solidity contract library",
        "viem: TypeScript Ethereum client",
        "dotenv: Env file loader",
        "ethers: Ethereum JS library",
        "@nomicfoundation/hardhat-toolbox: Hardhat plugin bundle",
        "@nomicfoundation/hardhat-ethers: ethers.js plugin for Hardhat"
       ]
      },
      {
       "title": "More in Crypto and web3",
       "path": "tools/web3/",
       "items": [
        {
         "text": "viem",
         "path": "tools/viem/"
        },
        {
         "text": "ethers.js",
         "path": "tools/ethers/"
        },
        {
         "text": "Solana Web3.js",
         "path": "tools/solana-web3-js/"
        },
        {
         "text": "wagmi",
         "path": "tools/wagmi/"
        },
        {
         "text": "TweetNaCl.js",
         "path": "tools/tweetnacl/"
        },
        {
         "text": "OpenZeppelin Contracts",
         "path": "tools/openzeppelin/"
        },
        {
         "text": "Solana SPL Token",
         "path": "tools/solana-spl-token/"
        },
        {
         "text": "Hardhat Toolbox",
         "path": "tools/nomicfoundation-hardhat-toolbox/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Hardhat",
       "me": true,
       "facts": [
        "MIT",
        "Gid 57",
        "550K/wk"
       ]
      }
     ],
     "more": "Compare Hardhat with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install hardhat"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## Hardhat\n- Check that Node.js is v22.13.0 or later before installing Hardhat 3.\n- Scaffold without prompts: `npx hardhat --init --template node-test-runner-viem`. List the other templates with `npx hardhat --init --templates`.\n- Target Hardhat 3 docs and APIs. Hardhat 2 has its own separate docs. For a v2 project, consult the Hardhat migration guide.\n- Put the Solidity compiler version, networks, plugins and tasks in `hardhat.config.ts`.\n- Use the `.t.sol` extension for Solidity tests that live in `contracts/`. In `test/`, use either `.sol` or `.t.sol`.\n- Write deployments as Hardhat Ignition modules in `ignition/modules`.\n- Run `npx hardhat test` to confirm the project still works after changes.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm hardhat"
  ],
  [
   "Category",
   "Crypto and web3"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "hardhat@3.19.0, October 8, 2026"
  ],
  [
   "On GitHub since",
   "April 2018"
  ],
  [
   "Gid Score",
   "57.4"
  ],
  [
   "Rank in category",
   "#6 of 155"
  ],
  [
   "GitHub",
   "NomicFoundation/hardhat"
  ],
  [
   "Last change",
   "Nov 23, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/nomicfoundation.png"
}