Home

Hardhat

Hardhat is an open-source Ethereum development environment and task runner for building, testing, and deploying smart contracts. It is implemented as a Node.js package and is designed to streamline a developer’s workflow by providing a local development network, a configurable task system, and integrated testing and debugging tools.

A central component of Hardhat is the Hardhat Network, a local Ethereum node tailored for development. It

Workflows are configured in a hardhat.config.js (or .ts) file, where networks, Solidity compiler versions, paths, and

Hardhat supports a rich plugin ecosystem. Popular plugins include @nomiclabs/hardhat-ethers and @nomiclabs/hardhat-waffle for Ethers.js and Waffle

Hardhat is widely used for local development, contract debugging, and deployment pipelines in Ethereum and other

runs
locally,
offers
immediate
feedback,
supports
account
management
with
pre-funded
test
Ether,
and
can
fork
an
external
chain
such
as
Ethereum
mainnet
for
testing
against
live
state.
Hardhat
also
provides
enhanced
debugging
features,
including
Solidity
stack
traces,
detailed
error
messages,
and
the
ability
to
run
console.log
statements
from
within
contracts.
plugins
are
declared.
Developers
interact
with
the
system
through
the
command
line,
using
commands
such
as
npx
hardhat
compile,
npx
hardhat
test,
and
npx
hardhat
run.
The
Hardhat
Runtime
Environment
(HRE)
is
injected
into
scripts
and
tests,
offering
access
to
utilities,
environments,
and
configured
plugins.
integration,
and
hardhat-deploy
for
deployment
workflows.
The
architecture
is
designed
for
extension
with
additional
plugins
and
custom
tasks,
and
it
offers
robust
TypeScript
support.
EVM-compatible
networks.
It
is
commonly
compared
with
other
development
stacks
and
is
favored
for
its
fast
feedback
loop
and
extensible
tooling.