Managing and deploying smart contracts with ZKsync.

The zksync-ethers library leverages the existing ethers.Contract class for smart contract management, ensuring full compatibility out of the box. For convenience, this class is re-exported within the library.

Deploying smart contracts

Deploying smart contracts on ZKsync differs slightly from Ethereum. To accommodate these differences, a specific ContractFactory method is provided. This method supports the same interface as ethers.ContractFactory.


The ContractFactory method facilitates the deployment of smart contracts on the ZKsync network. This method is essential due to the unique requirements of deploying contracts on ZKsync compared to Ethereum.

Paying with ERC20 tokens

To pay for smart contract interactions using ERC20 tokens, the customData override should be utilized. This feature allows for more flexible payment options within the ZKsync network.

For more details on accessing ZKsync-specific features, refer to the ZKsync Era Features.

Made with ❤️ by the ZKsync Community