Plugins

Plugins are the backbone of Hardhat, and they're built using the same config DSL 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.

Injects ethers.js into the Hardhat Runtime Environment

Ethers.js
Testing
Tasks
Scripts

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

Waffle
Testing

Code coverage for Solidity

Testing
Coverage
Hardhat plugin

Hardhat plugin for Deployments

Deployment
Testing

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

Testing
Gas
Hardhat plugin

Automatically verify contracts on Etherscan

Etherscan
Verification

Calculate compiled contract sizes

Compiling
Bytecode

A hardhat-deploy plugin for Ethers.js v5

Ethers.js
hardhat-deploy

Generate TypeChain type definitions for smart contracts.

Testing
Tasks

Injects Web3 1.x into the Hardhat Runtime Environment

Web3.js
Testing
Tasks
Scripts

Integration with TruffleContract from Truffle 5

Truffle
Testing

Automatically export Solidity contract ABIs on compilation

Compiling
ABI

Hardhat plugin for deploying and managing upgradeable contracts.

Security
Upgrades
OpenZeppelin

Automatically run Hardhat actions on file changes.

Tasks
Testing

Easily run solhint to lint your Solidity code

Solhint
Linter

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

Debuggin
Monitoring
Alerting
Tasks
Scripts

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

Solidity
Preprocessor

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

smock is a utility package that can generate mock Solidity contracts written entirely in JavaScript.

Testing
Mocking
Buidler plugin

Generate a static documentation site from NatSpec comments

Documentation
NatSpec

Hardhat plugin for managing Ganache

Ganache
Testing network

See emitted events during your hardhat tests in the console

Events
Logs
Trace
Console
Testing

Automatically run the solpp preprocessor before each compilation

Solpp
Preprocessor

Compile Solidity sources directly from NPM dependencies

Compiling
Dependencies

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

Optimism
ethers.js
OVM

Automatically compiles your Solidity contracts with the OVM compiler.

Optimism
Solidity
Compiler
OVM

Adds support to compile Vyper smart contracts

Vyper
Compiler

Allow loading network configs for Hardhat projects in home file

Networks
Config

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
React
Deploy
Typechain
Frontend
Web3modal

Exporting solidity contract storage layout

solidity
storage-layout

Buidler plugin for Aragon App development

Aragon
Apps
Buidler plugin

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

Testing

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

explorer
debugging
development-tool

Provide tasks to integrate Circom and SnarkJS

Circom
Snarkjs
Preprocessor
Compiling
Tasks
Scripts

Automatically fetch contract ABI from Etherscan

Etherscan
ABI

Allows changing the current network in Hardhat.

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

A Buidler plugin to generate a descriptor of your Solidity source code

Compiling
Documentation
Buidler plugin
Last Updated: 5/13/2020, 5:40:53 PM