Use Web3.js to interact with the ZKsync Era network.
Please refer to the comprehensive API documentation for a complete overview of this plugin's capabilities. Usage documentation that includes explanations and code samples is available as part of the official Web3.js plugin for ZKsync SDK docs.
- RPC methods:
The
RpcMethods
class implements the ZKsync JSON-RPC API. - Constants: The
constants
package includes well-known addresses, such as the address of the L1 ETH token. - Types: The
types
package defines enums, interfaces, and types that are used for interacting with the ZKsync Era network. - Utilities: The
utils
package exposes helpful functions and contract definitions that can be used with the Web3.js plugin for ZKsync. - Wallet: The
ZKSyncWallet
class allows developers to create, manage, and use ZKsync accounts. - Paymasters: The plugin includes a number of
helpful utilities for working with
ZKsync paymasters,
including a
getPaymasterParams
function for generating paymaster parameters to add to a transaction. - Smart contracts: The
ContractFactory
class can be used to deploy smart contracts to the ZKsync Era network. The return type of theContractFactory.deploy
method is the standard Web3.js Contract class. - Smart accounts: The
SmartAccount
class can be used to create ZKsync smart accounts with custom logic for building and signing transactions. There are factory functions for creating ECDSA smart accounts and multi-signature ECDSA smart accounts.
Pull requests are welcome. Please make sure to update tests as appropriate. For major changes, please open an Issue first to discuss what you would like to change.
This plugin was created using the Web3.js Plugin Template.