Hardhat
96.2kstarscachedEthereum development environment
Official links
About Hardhat
Hardhat is a development environment for Ethereum that gives you a local network, a flexible task runner, and first-class TypeScript support. Its plugin ecosystem covers everything from verification (hardhat-verify) to gas reporting, coverage, and deploy pipelines. Hardhat's console.log in Solidity and stack traces for failed transactions remain some of the most loved features in the ecosystem.
Quickstarts
A fast path from zero to running code.
mkdir my-project && cd my-project
npm init -y
npm install --save-dev hardhat
npx hardhat initimport { expect } from "chai";
import { ethers } from "hardhat";
describe("Counter", () => {
it("increments", async () => {
const counter = await ethers.deployContract("Counter");
await counter.increment();
expect(await counter.count()).to.equal(1n);
});
});npx hardhat test
npx hardhat run scripts/deploy.ts --network sepoliaDocumentation
The Hardhat docs are organised around Getting Started, Guides (testing, deployment, forking), the Config reference, and a Plugins directory. The Hardhat for Viem guide is the fastest way to a modern TS + viem workflow.
Read full docsCommunity Notes
Tips, gotchas, and updated examples from the community.
No community notes yet.
Be the first to share a tip, gotcha, or updated example.