Hardhat
Ethereum development environment for compiling, testing and deploying smart contracts.
Crypto and web3 npm MIT
Used in agent projects
223
1.8% of 12,697 public repos built with AI coding agents
Rank in crypto and web3
#13 of 89
by use in those projects
Downloads
459K
npm, last 7 days, hardhat
GitHub stars
8,511
last push Oct 10, 2026
How Hardhat is used
Hardhat is a dependency in 223 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (1.8%), #13 of 89 in crypto and web3. The most used alternative there is Solana Web3.js. Projects that use it most often also use OpenZeppelin Contracts (60.5%), viem (57.0%), Hardhat Toolbox Viem (46.6%).
Often used with Hardhat
| OpenZeppelin Contracts | 60.5% of Hardhat projects · 46.3× more than average |
|---|---|
| viem | 57.0% of Hardhat projects · 4.6× more than average |
| Hardhat Toolbox Viem | 46.6% of Hardhat projects · 56.4× more than average |
| dotenv | 53.8% of Hardhat projects · 3.4× more than average |
| ethers.js | 43.0% of Hardhat projects · 9.5× more than average |
| Hardhat Toolbox | 39.9% of Hardhat projects · 55.7× more than average |
| Hardhat ethers Plugin | 25.6% of Hardhat projects · 56.0× more than average |
| Chai | 23.8% of Hardhat projects · 9.9× more than average |
By coding agent
| Claude Code | 0.4% of projects set up for it |
|---|---|
| Cursor | 0.3% of projects set up for it |
| GitHub Copilot | 0.2% of projects set up for it |
Share of public repos configured for each agent that list Hardhat as a dependency.
Install
| Package | npm install hardhat |
|---|---|
| Main stacks | TypeScript / JavaScript (169), Next.js (46), Rust (6), Python (2) |
| Example projects | FairCrypto/XEN-crypto, BabylonSocial/babylon, zeta-chain/toolkit, kreskohq/kresko-protocol, quiknode-labs/earn-smart-contracts |
Alternatives to Hardhat
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| Solana Web3.js npm Official JavaScript SDK for interacting with the Solana blockchain. |
2,099 (16.5%) | 2.6M | 2,767 | MIT |
| viem npm TypeScript interface for Ethereum with type-safe interactions. |
1,566 (12.3%) | 6.5M | 3,577 | MIT |
| Solana SPL Token npm JavaScript API for interacting with Solana's SPL Token program. |
924 (7.3%) | 1.2M | 223 | Apache-2.0 |
| wagmi npm React hooks library for Ethereum interactions and wallet connections. |
650 (5.1%) | 1M | 6,759 | MIT |
| ethers.js npm Complete Ethereum library for building dapps, wallets and blockchain tools. |
574 (4.5%) | 3.6M | 8,710 | MIT |
| Solana Wallet Adapter npm React hooks and UI for connecting Solana wallets to dapps with state management. |
547 (4.3%) | 1M | 2,030 | Apache-2.0 |
| Anchor npm Framework for developing Solana smart contracts with TypeScript and Rust. |
438 (3.4%) | 851K | 5,142 | (MIT OR Apache-2.0) |
| solders pypi Python bindings for Solana Rust tools enabling efficient blockchain interaction. |
423 (3.3%) | 388K | 449 | — |