alloy_zksync/network/
mod.rs

1//! Definition of the ZKsync network type.
2
3use alloy::network::Network;
4
5pub mod header;
6pub mod header_response;
7pub mod receipt_envelope;
8pub mod receipt_response;
9pub mod transaction_request;
10pub mod transaction_response;
11pub mod tx_envelope;
12pub mod tx_type;
13pub mod unsigned_tx;
14
15/// ZKsync Network implementation.
16///
17/// Defines main types used in the network:
18/// - [TxType](self::tx_type::TxType)
19/// - [TxEnvelope](self::tx_envelope::TxEnvelope)
20/// - [UnsignedTx](self::unsigned_tx::TypedTransaction)
21/// - [ReceiptEnvelope](self::receipt_envelope::ReceiptEnvelope)
22/// - [Header](self::header::Header)
23/// - [TransactionRequest](self::transaction_request::TransactionRequest)
24/// - [TransactionResponse](self::transaction_response::TransactionResponse)
25/// - [ReceiptResponse](self::receipt_response::ReceiptResponse)
26/// - [HeaderResponse](self::header_response::HeaderResponse)
27/// - [BlockResponse](alloy::rpc::types::Block)
28#[derive(Debug, Clone, Copy)]
29pub struct Zksync {
30    _private: (),
31}
32
33impl Network for Zksync {
34    type TxType = self::tx_type::TxType;
35
36    type TxEnvelope = self::tx_envelope::TxEnvelope;
37
38    type UnsignedTx = self::unsigned_tx::TypedTransaction;
39
40    type ReceiptEnvelope = self::receipt_envelope::ReceiptEnvelope;
41
42    type Header = self::header::Header;
43
44    type TransactionRequest = self::transaction_request::TransactionRequest;
45
46    type TransactionResponse = self::transaction_response::TransactionResponse;
47
48    type ReceiptResponse = self::receipt_response::ReceiptResponse;
49
50    type HeaderResponse = self::header_response::HeaderResponse;
51
52    type BlockResponse = alloy::rpc::types::Block<Self::TransactionResponse, Self::HeaderResponse>;
53}