hardhat-zksync
The hardhat-zksync plugin provides a convenient method for bundling and accessing a range of ZKsync-related Hardhat plugins. This approach simplifies the process of utilizing these plugins and promotes ease of use.
List of contained plugins:
- hardhat-zksync-solc
- hardhat-zksync-deploy
- hardhat-zksync-upgradable
- hardhat-zksync-verify
- hardhat-zksync-node
- hardhat-zksync-ethers
Prerequisite
To use hardhat-zksync
in your project, ensure the following:
- Node.js version 18 or higher is installed.
- Hardhat version 2.18.0 or higher is installed as a dependency.
Installation
Add the latest version of this plugin to your project with the following command:
yarn add -D @matterlabs/hardhat-zksync
Usage
After installing it, add the plugin to your Hardhat config:
import "@matterlabs/hardhat-zksync";
With the hardhat-zksync
plugin installed and imported, you will have access to all of the supported plugins
and will be able to use them as needed in your project.
This plugin enables access to all commands available for each specific plugin, making them readily accessible with just the usage of this plugin.
For certain tasks present in the plugins encompassed by this plugin, it overrides them with new features and parameters. These tasks streamline common functionalities into a simplified workflow.
Here is a list of overriden tasks where this plugin adds new optional parameter --verify
:
deploy-zksync:contract
deploy-zksync:proxy
upgrade-zksync:proxy
deploy-zksync:beacon
upgrade-zksync:beacon
The --verify
parameter allow the task to immediately verify all deployed and upgraded contracts when task is called.
To check other parameters present in these tasks, please check the documentation pages for hardhat-zksync-deploy and hardhat-zksync-upgradable.