Community plugins


Community plugins

The following plugins were created by the community and tested on zkSync Era. Feel free to suggest new plugins by creating a issue(feat request) at this pageopen in new window.

Supported plugins

Example project

Here is a template project configured with all plugins mentioned belowopen in new window. You can use it as a starting template for your projects.

hardhat-deploy

Multiple tasks for advanced deployments.

This plugin was updated to support zkSync Eraopen in new window on version 0.11.26.

More informationopen in new window

typechain/hardhat

Automatically generate TypeScript bindings for smart contracts.

More informationopen in new window

openzeppelin/hardhat-upgrades

Plugin used to deploy and update upgradable smart contracts (proxies). Use the hardhat-zksync-upgradable plugin which provides an easy-to-use interface for interacting with the OpenZeppelin Upgrades Plugins within a Hardhat environment on zkSync.

hardhat-chai-matchers

Adds capabilities to make your smart contract tests easy to write and read.

More informationopen in new window

hardhat-contract-sizer

More informationopen in new window

hardhat-abi-exporter

Different options to export smart contract ABIs.

More informationopen in new window

hardhat-gas-reporter

Although this plugin works out of the box, zkSync Era has a different fee model than Ethereum. Users should consider this when analysing the report generated by this plugin.

In addition, make sure to read about local testing.

More informationopen in new window

hardhat-preprocessor

This plugin enables the pre-processing of contract source code prior to compilation.

CACHE_BREAKER Field Issue

The hardhat-preprocessor plugin adds the CACHE_BREAKER field to the list of libraries, which can lead to failed verification when using hardhat-zksync-verify plugin. To prevent this, please include the --no-compile flag: yarn hardhat verify --no-compile .

More informationopen in new window

Unsupported plugins

nomicfoundation/hardhat-network-helpers

This plugin adds new methods that interact with the Hardhat network used for testing.

However, we do not recommend using the Hardhat network for testing contracts that will be deployed on zkSync Era. We recommend instead using the in-memory node or the docker setup to test your contracts as they will give you the same results as our testnet/mainnet.

Note

The additional methods provided by this plugin are not compatible with the zkSync Era in-memory node or docker setup yet. Currently, we are working on adapting our in-memory node to ensure compatibility with hardhat-network-helpers.