Crate alloy_zksync

Source
Expand description

§alloy-zksync

Implementation of the ZKsync network support for the alloy ecosystem.

§Overview

This crate is designed to be a plug-in for alloy. If you’re not familiar with it, the great entrypoint would be the alloy book and examples.

alloy-zksync project has two main goals:

  • Everything that works in alloy should work in alloy-zksync as well, even if the underlying implementation of functionality is different.
  • ZKsync-specific features are supported.

Main entrypoints are:

  • ZksyncProvider and zksync_provider. The provider is used whenever you need to access the node API.
  • ZksyncWallet. The wallet represents a provider with an account attached, and thus can be used to sign transactions.
  • Zksync network: a network definition. Most likely you won’t need to interact with it directly, but the Network trait implementation is useful to look at if you want to see main data types.

§Examples

Check out the examples directory for more examples.

Modules§

contracts
This module contains contract definitions and utilities for different contracts in the ZKsync network.
network
Definition of the ZKsync network type.
node_bindings
anvil-zksync bindings.
provider
ZKsync provider.
types
ZKsync-specific type definitions.
utils
Helper utilities.
wallet
ZKsync wallet.