>
>
Join the Hardhat team! We are hiring
>
>

Plugins

Plugins are the backbone of Hardhat, and they're built using the same config API that you use in your Hardhat configuration. Read the Building plugins guide to learn how to create your own, and send a pull request to get it listed here.

Extend Hardhat's functionality with the plugins below.

Official plugins

Nomic Foundation's recommended bundle of Hardhat plugins (ethers based)

Hardhat
Setup
Ethers.js

Nomic Foundation's recommended bundle of Hardhat plugins (viem based)

Hardhat
Setup
viem

Adds Ethereum-related matchers to Chai

Chai
Testing

Injects ethers.js into the Hardhat Runtime Environment

Ethers.js
Testing
Tasks
Scripts

Makes it easier to use viem in a Hardhat project

viem
Testing
Tasks
Scripts

Automatically verify contracts

Etherscan
Verification

Makes it easier to use Hardhat and Foundry in the same project

Foundry

Hardhat plugin for the Ledger hardware wallet

Ledger
Wallet

Adds support to compile Vyper smart contracts

Vyper
Compiler

Easily run solhint to lint your Solidity code

Solhint
Linter

Automatically run the solpp preprocessor before each compilation

Solpp
Preprocessor

Adds a Waffle-compatible provider to the Hardhat Runtime Environment and automatically initializes the Waffle Chai matchers

Waffle
Testing

Injects Web3 1.x into the Hardhat Runtime Environment

Web3.js
Testing
Tasks
Scripts

Injects Web3 4.x into the Hardhat Runtime Environment

Web3.js
Testing
Tasks
Scripts

Integration with TruffleContract from Truffle 5

Truffle
Testing

Injects Web3 0.20.x into the Hardhat Runtime Environment

Web3.js
Legacy
Testing
Tasks
Scripts

Integration with TruffleContract from Truffle 4

Truffle
Testing

Community plugins

Sorted by npm downloads

Code coverage for Solidity

Testing
Coverage
Hardhat plugin

Gas usage per unit test. Average gas usage per method. A mocha reporter.

Testing
Gas
Hardhat plugin

Zero-config TypeChain support for Hardhat.

Testing
Tasks

Automatically run Hardhat actions on file changes.

Tasks
Testing

Hardhat plugin for Deployments

Deployment
Testing

Calculate compiled contract sizes

Compiling
Bytecode

Hardhat plugin for deploying and managing upgradeable contracts.

Security
Upgrades
OpenZeppelin

A hardhat-deploy plugin for Ethers.js v5

Ethers.js
hardhat-deploy

See internal transactions, events and storage operations during your hardhat tests in the console

EVM
Events
Logs
Trace
Console
Testing

Easily integrate your Hardhat project with Tenderly. Tenderly is an Ethereum monitoring, debugging and analytics platform.

Debuggin
Monitoring
Alerting
Tasks
Scripts

Automatically export Solidity contract ABIs on compilation

Compiling
ABI

The Solidity mocking library. Smock is a utility package that can generate mock Solidity contracts written entirely in JavaScript.

Testing
Mocking

An updated and working Hardhat plugin to compile the Yul and Yul+ languages into solc compatible artifacts. Works with .yul and .yulp file extensions

Yul
Assembly
Compiler
Yul+

Compile Solidity sources directly from npm dependencies

Compiling
Dependencies

An hardhat plugin to pre-process contract source code before compilation

Solidity
Preprocessor

Zero-config Hardhat plugin to generate documentation for all your Solidity contracts.

Documentation
Docs
Solidity
NatSpec

Exporting solidity contract storage layout

solidity
storage-layout

Automatically prepend local Solidity source files with an SPDX License Identifier

License

Remove Hardhat console.log imports and calls from Solidity source files

Logging
Console
Deployment

Automatically deploy the ERC-1820 registry contract to Hardhat EVM chains.

Testing

The hardhat-w3f plugin allows builders to build & run Web3 Functions connecting smart off-chain data with smart contracts

Gelato
w3f
offchain
functions

Generate a static documentation site from NatSpec comments

Documentation
NatSpec

Automatically expose internal Solidity functions for testing

Solidity
Testing

A jest environment with hardhat built in.

uniswap
testing
jest
node

Helper plugin to manipulate blocks timestamp and trigger mining. It can be used from the command line and in the tests.

Testing

Define your project's deployment in a simple manifest, then deploy and share it anywhere. Inspired by Docker, Terraform, and npm. https://usecannon.com/

Tooling
Deployment
Testing

Hardhat plugin to deploy your smart contracts across multiple EVM chains with the same deterministic address.

Deployment
CREATE2
Tasks

Integrate your Hardhat project and Hardhat network with Ethernal. Ethernal is a block explorer for private chains.

explorer
debugging
development-tool

Hardhat plugin for Unlock Protocol deployments.

unlock
nft
memberships
udt
testing
deployment

Automatically fetch contract ABI from Etherscan

Etherscan
ABI

Hardhat plugin to combine multiple ABIs into a Diamond ABI artifact

diamond standard

Check for storage layout changes

Storage Layout
Solidity
Upgradable Contracts

Hardhat plugin to test scilla contracts. Scilla is Zillqa's programming language to develop smart contracts.

Scilla
Testing
Zilliqa

A plugin to push contracts to tenderly

Deployment
Testing
Tenderly
Verification

Hardhat plugin for integrating with Fireblocks

Deployment
Security

Hardhat plugin to ease dealing ERC20 tokens in hardhat forks.

erc20
deal
foundry
forge
mock
balanceOf
fork
testing
tests

Integrates Chainlink into Hardhat projects.

chainlink
hardhat

Generate 0xWeb classes for contracts to easily communicate with the blockchain.

dApp-Client
Class-Generation
Testing

Upload local function selectors to the Ethereum Selector Database

Bytecode
ABI

Enable project-specific features inside Truffle Dashboard, including advanced calldata decoding and more

truffle-dashboard
transaction
signing
decoding

Zero-config Hardhat plugin to check the output of the compiler for any problems like missing NatSpec

Productivity
CI
Compiler
Docs
Solidity
NatSpec
Build

Hardhat plugin to generate smart contract bindings for Golang

Bindings
Go
Testing
Solarity

Hardhat plugin to automate the deployment and verification of contracts

Deployment
Verification
Migration
Solarity

Hardhat made awesome with a flexible CLI to help run tests, scripts, deploy Mock contracts and more.

CLI
Testing
Tasks
Config

Hardhat plugin to generate customizable smart contracts documentation

Documentation
NatSpec
Markdown
Solarity

Prepare the contract artifacts and the TypeChain bindings for registry deployment.

Deployment
Tasks
TypeChain

Allow loading network configs for Hardhat projects in home file

Networks
Config

Automatically export contract bytecode on compilation

Bytecode
Compiling

Provide tasks to integrate Circom and SnarkJS

Circom
Snarkjs
Preprocessor
Compiling
Tasks
Scripts

The ultimate environment for building with Circom

Circom
zk
SnarkJS
environment
Solarity

Hardhat plugin for verifying smart contracts deployed on the EVM chains including X Layer

OKX Explorer
Verification
X Layer

Hardhat plugin for enabling on-the-fly network switching within your Hardhat scripts and tasks

Tasks
Scripts
Testing

Generate and execute on-chain transactions via txn.xyz

Signing
Scripts

Output list of available accounts and their balances

Accounts
Balances

Automatically compiles your Solidity contracts with the OVM compiler.

Optimism
Solidity
Compiler
OVM

Integrates Hardhat and ethers.js with Optimism's L2 network.

Optimism
ethers.js
OVM

Hardhat plugin that allows you to use Jest easily

Deployment
Testing
Jest
Smart Contracts
Solidity

A plugin for integrating Starknet tools into Hardhat projects

starknet
cairo
layer two

Generate a beautiful and interactive documentation website for your project in seconds

Documentation
NatSpec

Execute commands on deployed contracts on any network using a helpful TUI.

Tooling
Operations
Testing

Hardhat plugin for Uniswap V3 deployment

uniswap
testing
deployment
local

generate an output file of organized function selectors for all ABI/.json files within ./artifacts/contracts

function
selectors
tooling
router

Hardhat plugin to get compiler outputs of contracts

Tooling
Testing
Tasks
Scripts
Solc
Compiler

Hardhat Reef plugin for interacting with contracts on the Reef chain

Reef Chain

AI assistant that interprets user input and executes hardhat tasks

ethernaut-cli
AI
Agent

Ui extensions for the ethernaut-util package

ethernaut-cli
ui
utilities

Ui extensions for the ethernaut-network package

ethernaut-cli
ui
network

Transfers Link token amount between accounts.

Chainlink
Link

Display different signatures that have the methods, events and errors of your contracts by console

functions
errors
events
tooling
selectorss

Tasks for interacting with different networks

ethernaut-cli
network

Ui extensions for the ethernaut-network package

ethernaut-cli
ui
interactivity
enquirer
prompts

Tasks for playing the Open Zeppelin Ethernaut challenges from the CLI

ethernaut-cli
OpenZeppelin
Ethernaut

This Hardhat plugin add 3 tasks to Hardhat, to summarize a smart contract in human readable format using OpenAI GPT-3, to create a readme looking at your package.json and a task to ask question to chatGPT when running into errors.

chatGPT
openai
gpt3
ai

Show transaction params before hardhat send transaction to network

log
logger
transaction

Develop your subgraph side by side with your contracts to save gas and increase productivity.

graphprotocol
subgraph
graphql
development
deployment

Ui extensions for the ethernaut-interact package

ethernaut-cli
ui
interact
etherscan

Tasks for sending transactions and interacting with contracts

ethernaut-cli
contract
send
transactions

Ui extensions for the ethernaut-ai package

ethernaut-cli
ui
AI

Simple, everyday utilities for Ethereum devs

ethernaut-cli
utilities

Ui extensions for the ethernaut-wallet package

ethernaut-cli
ui
wallet

A Hardhat plugin for working with on-chain proposals

governance
proposals
simulation

Tasks for interacting from different Ethereum accounts

ethernaut-cli
wallet

Build and deploy only changed smartcontracts

deployment
diff deployment
ethers.js
proxy

Hardhat React Plugin to interact with your deployed contracts

Tooling
Testing
ui
plugin

Hardhat plugin to compile the Yul and Yul+ languages into solc compatible artifacts. Works with .yul and .yulp file extensions

Yul
Assembly
Compiler
Yul+

A framework for building solidity CTF challenges.

ctf
capture-the-flag
framework
security
solidity

Hardhat plugin to get contract storage, gas and code size insights using the compiler ast output

Tooling
Storage
Gas
Size
Bytecode

Publish generated typechain-types to NPM

typechain-types
npm registry

A Hardhat Typescript plugin to test and interact with Huff contracts

Deployment
Tasks
Huff

Recording deployed contracts address to json file

deployed history

Hardhat plugin to sync your compiled contract with Laika

Tasks
Laika

A Hardhat plugin that generates a React hook component from your smart contracts. Hot reloaded into your React app. Deployed or not deployed. And everything typed and initialized.

Ethers.js
React
Deploy
Typechain
Frontend
Web3modal

Overrides ENS ownership in hardhat network to allow orchestration superpowers

ENS
Testing
Orchestration
Productivity

Hardhat plugin to get interfaceid

ABI
interfaceid
Solarity

Hardhat plugin for the Trezor hardware wallet

Trezor
Wallet

Integrate MultiBaas into Hardhat's workflow!

middleware
ethereum
OMG

Hardhat plugin to deeply compare smart contracts

Storage Layout
Bytecode
Diff
Compare
Solarity

Hardhat TypeScript plugin for Etherspot

smart contract wallet

Quickly add security and operational alerting for your project using Forta: a decentralized monitoring network for Web3 systems.

Security
Monitoring
Alerting
Forta

Hardhat plugin for writing tests in solidity

solidity tests

Simple plugin to track gas on the transaction level.

Testing
Gas
Hardhat plugin

Handy set of utilities for testing contracts in Hardhat projects

testing
solidity

Hardhat plugin for solidity contract verification on Blockscout block explorer.

Blockscout
Deployment
Solidity
Verification

Hardhat plugin to check and lock the storage layout of contracts

Tooling
Testing
Storage

Stop Hardhat test execution on demand and print output from completed tests

Testing
Mocha

Generate unique storage namespaces within a script/task

solidity
storage
namespace
router

Hardhat plugin to allow adding any extra data to your network configuration

Metadata
Testing
Tasks
Config

Export flat contract on compilation via Hardhat.

Flatten
Smart contract
Solidity
Deployment

This plugin allows you to upload compiled hardhat smart contract artifacts to Kriptonio. On kriptonio side new smart contract will be created with attached artifacts, which you can afterward deploy and manage via kriptonio.

Monitoring
Debugging
Deployment

Export deployed contract addresses (multichain) in typescript files.

solidity
vyper
deployment
typescript
addresses
monorepo
frontend

Another small hardhat task for printing contract's storage layout 📐

Deployment
Testing
Security
Debug
helper
Tasks

Injects hethers into the Hardhat Runtime Environment

Hedera
hethers

Hardhat plugin for cloning verified contracts from any supported network using Etherscan's API.

Etherscan
Clone
Smart contract

Build prompt with Solidity code.

solidity
CLI

This Hardhat plugin provides two tasks and two functions to help you manage and optimize your transactions on Ethereum compatible blockchain. The two tasks include the ability to retry a transaction and retrieve the current gas cost.

transaction
gasPrice
retry
helper

Keeps mainnet fork state updated by replaying relevant live txs

Mainnet fork
live
transaction replay

View contracts' layouts with CLI and .json output

solidity
storage

A plugin for submitting code to Sourcify

Sourcify
Verification

Small hardhat task for debug money transfers 🤝💰

Deployment
Testing
Security
Debug
helper
Tasks

Hardhat TypeScript plugin to run a chainlink node and interact with it

ethereum
smart-contracts
chainlink
hardhat-plugin

Hardhat plugin to send an OSX notification when hardhat compilcation fails/succeeds

Deployment
Tooling
Notification
Compile

This plugin brings the proxy contract to Hardhat, which allows you to manage the proxy contract in a simple way.

Proxy Contract
Tasks
Scripts

Hardhat plugin for Uniswap V2 (pancakeswap protocol) testing and deployment. You can use it to test features such as pair creation, liquidity provisioning, and swaps.

uniswap
pancakeswap
testing
deployment
automated

Deploy contracts with Hardhat using Gas Station Network

GSN
Gasless
Deployment