Contracts
Contracts
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 opcode.
- Deploy smart contracts using CREATE2 opcode.
- Deploy smart accounts using CREATE and CREATE2 opcode
Contracts interfaces
The contracts
package provides zkSync Era system contracts.