#![doc = include_str!("../README.md")] #![doc( html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg", html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico" )] #![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use linera_alloy_consensus::TxReceipt; use linera_alloy_eips::eip2718::{Eip2718Envelope, Eip2718Error}; use linera_alloy_json_rpc::RpcObject; use linera_alloy_primitives::Address; use core::fmt::{Debug, Display}; mod transaction; pub use transaction::{ BuildResult, NetworkSigner, TransactionBuilder, TransactionBuilderError, TxSigner, TxSignerSync, Unbuilt, }; mod ethereum; pub use ethereum::{Ethereum, EthereumSigner}; mod any; pub use any::AnyNetwork; pub use linera_alloy_eips::eip2718; /// A receipt response. /// /// This is distinct from [`TxReceipt`], since this is for JSON-RPC receipts. /// /// [`TxReceipt`]: linera_alloy_consensus::TxReceipt pub trait ReceiptResponse { /// Address of the created contract, or `None` if the transaction was not a deployment. fn contract_address(&self) -> Option
; } /// Captures type info for network-specific RPC requests/responses. /// /// Networks are only containers for types, so it is recommended to use ZSTs for their definition. // todo: block responses are ethereum only, so we need to include this in here too, or make `Block` // generic over tx/header type pub trait Network: Debug + Clone + Copy + Sized + Send + Sync + 'static { // -- Consensus types -- /// The network transaction type enum. /// /// This should be a simple `#[repr(u8)]` enum, and as such has strict type /// bounds for better use in error messages, assertions etc. type TxType: Into