Contracts
Methods and interfaces for deploying smart contracts on ZKsync Era
The usual way to deploy a contract with the geth
library is to use abigen
with the provided --bin
option,
which generates a function that deploys the smart contract. Since the deployment of a smart contract requires
an EIP-712 transaction, the deployment function generated with the abigen
tool does not work. In this matter,
the Deploy
interface is created, which provides methods for the deployment of smart contracts and smart
accounts. There are the following objects that implement the Deploy
interface:
Contract instantiation is the same as in the
geth
library. For examples of how to deploy and instantiate contracts and accounts, refer to the following:
- Deploy smart contracts using
CREATE
method
- Deploy smart contracts using
CREATE2
method
- Deploy smart accounts using
CREATE
method
- Deploy smart accounts using
CREATE2
method
Contracts interfaces
The contracts
package provides ZKsync Era system contracts.