Expand description
The declaration of the most primitive types used in ZKsync network.
Most of them are just re-exported from the web3 crate.
Re-exports§
pub use ethabi;
Modules§
- basic_
fri_ types - Basic types for FRI prover.
- bytecode
- Bytecode-related types and utils.
- commitment
- network
- The network where the ZKsync resides.
- protocol_
version - prover_
dal - Types exposed by the prover DAL for general-purpose use.
- pubdata_
da - Types related to data availability.
- secrets
- serde_
wrappers - Generic
serdehelpers. - settlement
- tee_
types - url
- vm
- Basic VM types that shared widely enough to not put them in the
multivmcrate. - web3
- Selected Web3 types copied from the
web3crate.
Structs§
- Account
Tree Id - Account place in the global state tree is uniquely identified by its address. Binary this type is represented by 160 bit big-endian representation of account address.
- Bloom
- Bloom hash type with 256 bytes (2048 bits) size.
- H64
- H128
- Fixed-size uninterpreted hash type with 16 bytes (128 bits) size.
- H160
- Fixed-size uninterpreted hash type with 20 bytes (160 bits) size.
- H256
- Fixed-size uninterpreted hash type with 32 bytes (256 bits) size.
- H512
- Fixed-size uninterpreted hash type with 64 bytes (512 bits) size.
- H520
- L1Batch
Number - ZKsync L1 batch sequential index.
- L1Block
Number - Ethereum network block sequential index.
- L1Chain
Id - ChainId in the Ethereum network.
IMPORTANT: Please, use this method when exactly the L1 chain id is required.
Note, that typically this is not the case and the majority of methods need to work
with settlement layer chain id, which is represented by
SLChainId. - L2Block
Number - ZKsync network block sequential index.
- L2Chain
Id - ChainId in the ZKsync network.
- Nonce
- ZKsync account nonce.
- Priority
OpId - Unique identifier of the priority operation in the ZKsync network.
- SLChain
Id - ChainId of a settlement layer.
- U64
- Little-endian large integer type Unsigned 64-bit integer.
- U128
- Little-endian large integer type 128-bit unsigned integer.
- U256
- Little-endian large integer type 256-bit unsigned integer.
Enums§
Functions§
- address_
to_ h256 - address_
to_ u256 - ceil_
div_ u256 - Computes
ceil(a / b). - h256_
to_ address - Converts
H256value into anAddress. - h256_
to_ u256 - parse_
h160 - Parses H160 from a slice of bytes.
- parse_
h256 - Parses H256 from a slice of bytes.
- parse_
h256_ opt - Parses H256 from an optional slice of bytes.
- u256_
to_ address - Converts
U256value into anAddress. - u256_
to_ h256