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

Integration with TruffleContract from Truffle 4

Truffle
Testing

Integration with TruffleContract from Truffle 5

Truffle
Testing

Injects Web3 1.x into the Hardhat Runtime Environment

Web3.js
Testing
Tasks
Scripts

Injects Web3 0.20.x into the Hardhat Runtime Environment

Web3.js
Legacy
Testing
Tasks
Scripts

Automatically verify contracts on Etherscan

Etherscan
Verification

Hardhat plugin for managing Ganache

Ganache
Testing network

Automatically run the solpp preprocessor before each compilation

Solpp
Preprocessor

Easily run solhint to lint your Solidity code

Solhint
Linter

Adds support to compile Vyper smart contracts

Vyper
Compiler

Hardhat plugin for Deployments

Deployment
Testing

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

Solidity
Preprocessor

A hardhat-deploy plugin for Ethers.js v5

Ethers.js
hardhat-deploy

Generate TypeChain type definitions for smart contracts.

Testing
Tasks

Automatically prepend local Solidity source files with an SPDX License Identifier

License

Automatically export Solidity contract ABIs on compilation

Compiling
ABI

Calculate compiled contract sizes

Compiling
Bytecode

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

Logging
Console
Deployment

Code coverage for Solidity

Testing
Coverage
Buidler plugin

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

Testing
Gas
Buidler plugin

Buidler plugin for Aragon App development

Aragon
Apps
Buidler plugin

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

Compiling
Documentation
Buidler plugin

Allow loading network configs for Buidler projects in home file

Networks
Config
Buidler plugin

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

Testing
Mocking
Buidler plugin

Allows users to specify a custom compiler path. This makes it possible to compile your contracts with the custom Optimism Solidity compiler.

Optimism
Compiler
OVM
Buidler plugin

Replaces the VM object with our own custom ethereumjs-vm fork. Add useOvm to your buidler config object to enable OVM execution.

Optimism
Buidler EVM
OVM
Buidler plugin
Last Updated: 5/13/2020, 5:40:53 PM