Type Alias RpcBlock

pub type RpcBlock<T> = Block<<T as RpcTypes>::Transaction, <T as RpcTypes>::Header>;
Expand description

Adapter for network specific block type.

Aliased Type§

struct RpcBlock<T> {
    pub header: <T as RpcTypes>::Header,
    pub uncles: Vec<FixedBytes<32>>,
    pub transactions: BlockTransactions<<T as RpcTypes>::Transaction>,
    pub withdrawals: Option<Withdrawals>,
}

Fields§

§header: <T as RpcTypes>::Header

Header of the block.

§uncles: Vec<FixedBytes<32>>

Uncles’ hashes.

§transactions: BlockTransactions<<T as RpcTypes>::Transaction>

Block Transactions. In the case of an uncle block, this field is not included in RPC responses, and when deserialized, it will be set to BlockTransactions::Uncle.

§withdrawals: Option<Withdrawals>

Withdrawals in the block.

Layout§

Note: Encountered an error during type layout; the type failed to be normalized.

Implementations

§

impl<T> Block<T>

pub fn from_consensus( block: Block<T>, total_difficulty: Option<Uint<256, 4>>, ) -> Block<T>
where T: Encodable,

Constructs block from a consensus block and total_difficulty.

pub fn into_consensus(self) -> Block<T>

Consumes the block and returns the [alloy_consensus::Block].

This has two caveats:

  • The returned block will always have empty uncles.
  • If the block’s transaction is not BlockTransactions::Full, the returned block will have an empty transaction vec.
§

impl<T, H> Block<T, H>

pub const fn empty(header: H) -> Block<T, H>

Creates a new empty block (without transactions).

pub const fn new(header: H, transactions: BlockTransactions<T>) -> Block<T, H>

Creates a new Block with the given header and transactions.

Note: This does not set the withdrawals for the block.

use alloy_eips::eip4895::Withdrawals;
use alloy_network_primitives::BlockTransactions;
use alloy_rpc_types_eth::{Block, Header, Transaction};
let block = Block::new(
    Header::new(alloy_consensus::Header::default()),
    BlockTransactions::<Transaction>::Full(vec![]),
)
.with_withdrawals(Some(Withdrawals::default()));

pub fn apply<F>(self, f: F) -> Block<T, H>
where F: FnOnce(Block<T, H>) -> Block<T, H>,

Apply a function to the block, returning the modified block.

pub fn with_transactions( self, transactions: BlockTransactions<T>, ) -> Block<T, H>

Sets the transactions for the block.

pub fn with_withdrawals(self, withdrawals: Option<Withdrawals>) -> Block<T, H>

Sets the withdrawals for the block.

pub fn with_uncles(self, uncles: Vec<FixedBytes<32>>) -> Block<T, H>

Sets the uncles for the block.

pub fn try_into_transactions( self, ) -> Result<Vec<T>, ValueError<BlockTransactions<T>>>

Tries to convert inner transactions into a vector of full transactions

Returns an error if the block contains only transaction hashes or if it is an uncle block.

pub fn into_transactions_vec(self) -> Vec<T>

Consumes the type and returns the transactions as a vector.

Note: if this is an uncle or hashes, this will return an empty vector.

pub fn try_into_block_body( self, ) -> Result<BlockBody<T, H>, ValueError<Block<T, H>>>

Converts this block into a [BlockBody].

Returns an error if the transactions are not full or if the block has uncles.

pub fn into_block_body_unchecked(self) -> BlockBody<T, H>

Converts this block into a [BlockBody]

Caution: The body will have empty transactions unless the block’s transactions are BlockTransactions::Full. This will disregard ommers/uncles and always return an empty ommers vec.

pub fn map_header<U>(self, f: impl FnOnce(H) -> U) -> Block<T, U>

Converts the block’s header type by applying a function to it.

pub fn try_map_header<U, E>( self, f: impl FnOnce(H) -> Result<U, E>, ) -> Result<Block<T, U>, E>

Converts the block’s header type by applying a fallible function to it.

pub fn convert_transactions<U>(self) -> Block<U, H>
where U: From<T>,

Converts the block’s transaction type to the given alternative that is From<T>

pub fn try_convert_transactions<U>( self, ) -> Result<Block<U, H>, <U as TryFrom<T>>::Error>
where U: TryFrom<T>,

Converts the block’s transaction to the given alternative that is TryFrom<T>

Returns the block with the new transaction type if all conversions were successful.

pub fn map_transactions<U>(self, f: impl FnMut(T) -> U) -> Block<U, H>

Converts the block’s transaction type by applying a function to each transaction.

Returns the block with the new transaction type.

pub fn try_map_transactions<U, E>( self, f: impl FnMut(T) -> Result<U, E>, ) -> Result<Block<U, H>, E>

Converts the block’s transaction type by applying a fallible function to each transaction.

Returns the block with the new transaction type if all transactions were mapped successfully.

pub fn calculate_transactions_root(&self) -> Option<FixedBytes<32>>
where T: Encodable2718,

Calculate the transaction root for the full transactions in this block type.

Returns None if the transactions is not the BlockTransactions::Full variant.

§

impl<T, H> Block<T, H>
where T: TransactionResponse,

pub fn into_full_block(self, txs: Vec<T>) -> Block<T, H>

Converts a block with Tx hashes into a full block.

§

impl<T, H> Block<T, Header<H>>
where H: Sealable + Encodable,

pub fn uncle_from_header(header: H) -> Block<T, Header<H>>

Constructs an “uncle block” from the provided header.

This function creates a new Block structure for uncle blocks (ommer blocks), using the provided alloy_consensus::Header.

Trait Implementations

§

impl<T, H> BlockResponse for Block<T, H>
where T: TransactionResponse,

§

type Header = H

Header type
§

type Transaction = T

Transaction type
§

fn header(&self) -> &<Block<T, H> as BlockResponse>::Header

Block header
§

fn transactions(&self) -> &BlockTransactions<T>

Block transactions
§

fn transactions_mut( &mut self, ) -> &mut BlockTransactions<<Block<T, H> as BlockResponse>::Transaction>

Mutable reference to block transactions
§

fn other_fields(&self) -> Option<&OtherFields>

Returns the other field from WithOtherFields type.
§

impl<T, H> Clone for Block<T, H>
where T: Clone, H: Clone,

§

fn clone(&self) -> Block<T, H>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<T, H> Debug for Block<T, H>
where T: Debug, H: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T, H> Default for Block<T, H>
where H: Default,

§

fn default() -> Block<T, H>

Returns the “default value” for a type. Read more
§

impl<'de, T, H> Deserialize<'de> for Block<T, H>
where T: Deserialize<'de>, H: Deserialize<'de>,

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Block<T, H>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl<T> EthApiServer<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Transaction, Block<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Transaction, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Receipt, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header> for T
where T: FullEthApi, ErrorObject<'static>: From<<T as EthApiTypes>::Error>,

§

fn protocol_version<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Uint<64, 1>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_protocolVersion

§

fn syncing(&self) -> Result<SyncStatus, ErrorObject<'static>>

Handler for: eth_syncing

§

fn author<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Address, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_coinbase

§

fn accounts(&self) -> Result<Vec<Address>, ErrorObject<'static>>

Handler for: eth_accounts

§

fn block_number(&self) -> Result<Uint<256, 4>, ErrorObject<'static>>

Handler for: eth_blockNumber

§

fn chain_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Uint<64, 1>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_chainId

§

fn block_by_hash<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, full: bool, ) -> Pin<Box<dyn Future<Output = Result<Option<Block<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Transaction, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getBlockByHash

§

fn block_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, full: bool, ) -> Pin<Box<dyn Future<Output = Result<Option<Block<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Transaction, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getBlockByNumber

§

fn block_transaction_count_by_hash<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getBlockTransactionCountByHash

§

fn block_transaction_count_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, ) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getBlockTransactionCountByNumber

§

fn block_uncles_count_by_hash<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getUncleCountByBlockHash

§

fn block_uncles_count_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, ) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getUncleCountByBlockNumber

§

fn block_receipts<'life0, 'async_trait>( &'life0 self, block_id: BlockId, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Receipt>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getBlockReceipts

§

fn uncle_by_block_hash_and_index<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, index: Index, ) -> Pin<Box<dyn Future<Output = Result<Option<Block<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Transaction, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getUncleByBlockHashAndIndex

§

fn uncle_by_block_number_and_index<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, index: Index, ) -> Pin<Box<dyn Future<Output = Result<Option<Block<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Transaction, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getUncleByBlockNumberAndIndex

§

fn raw_transaction_by_hash<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getRawTransactionByHash

§

fn transaction_by_hash<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Transaction>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getTransactionByHash

§

fn raw_transaction_by_block_hash_and_index<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, index: Index, ) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getRawTransactionByBlockHashAndIndex

§

fn transaction_by_block_hash_and_index<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, index: Index, ) -> Pin<Box<dyn Future<Output = Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Transaction>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getTransactionByBlockHashAndIndex

§

fn raw_transaction_by_block_number_and_index<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, index: Index, ) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getRawTransactionByBlockNumberAndIndex

§

fn transaction_by_block_number_and_index<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, index: Index, ) -> Pin<Box<dyn Future<Output = Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Transaction>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getTransactionByBlockNumberAndIndex

§

fn transaction_by_sender_and_nonce<'life0, 'async_trait>( &'life0 self, sender: Address, nonce: Uint<64, 1>, ) -> Pin<Box<dyn Future<Output = Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Transaction>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getTransactionBySenderAndNonce

§

fn transaction_receipt<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Receipt>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getTransactionReceipt

§

fn balance<'life0, 'async_trait>( &'life0 self, address: Address, block_number: Option<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getBalance

§

fn storage_at<'life0, 'async_trait>( &'life0 self, address: Address, index: JsonStorageKey, block_number: Option<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getStorageAt

§

fn transaction_count<'life0, 'async_trait>( &'life0 self, address: Address, block_number: Option<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getTransactionCount

§

fn get_code<'life0, 'async_trait>( &'life0 self, address: Address, block_number: Option<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getCode

§

fn header_by_number<'life0, 'async_trait>( &'life0 self, block_number: BlockNumberOrTag, ) -> Pin<Box<dyn Future<Output = Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getHeaderByNumber

§

fn header_by_hash<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getHeaderByHash

§

fn simulate_v1<'life0, 'async_trait>( &'life0 self, payload: SimulatePayload, block_number: Option<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<Vec<SimulatedBlock<Block<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Transaction, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_simulateV1

§

fn call<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, block_number: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, block_overrides: Option<Box<BlockOverrides>>, ) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_call

§

fn call_many<'life0, 'async_trait>( &'life0 self, bundle: Bundle, state_context: Option<StateContext>, state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<EthCallResponse>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_callMany

§

fn create_access_list<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, block_number: Option<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<AccessListResult, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_createAccessList

§

fn estimate_gas<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, block_number: Option<BlockId>, state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, ) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_estimateGas

§

fn gas_price<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_gasPrice

§

fn get_account<'life0, 'async_trait>( &'life0 self, address: Address, block: BlockId, ) -> Pin<Box<dyn Future<Output = Result<Option<TrieAccount>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getAccount

§

fn max_priority_fee_per_gas<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_maxPriorityFeePerGas

§

fn blob_base_fee<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_blobBaseFee

§

fn fee_history<'life0, 'async_trait>( &'life0 self, block_count: Uint<64, 1>, newest_block: BlockNumberOrTag, reward_percentiles: Option<Vec<f64>>, ) -> Pin<Box<dyn Future<Output = Result<FeeHistory, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_feeHistory

§

fn is_mining<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_mining

§

fn hashrate<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_hashrate

§

fn get_work<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Work, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getWork

§

fn submit_hashrate<'life0, 'async_trait>( &'life0 self, _hashrate: Uint<256, 4>, _id: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_submitHashrate

§

fn submit_work<'life0, 'async_trait>( &'life0 self, _nonce: FixedBytes<8>, _pow_hash: FixedBytes<32>, _mix_digest: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_submitWork

§

fn send_transaction<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, ) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_sendTransaction

§

fn send_raw_transaction<'life0, 'async_trait>( &'life0 self, tx: Bytes, ) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_sendRawTransaction

§

fn sign<'life0, 'async_trait>( &'life0 self, address: Address, message: Bytes, ) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_sign

§

fn sign_transaction<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, ) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_signTransaction

§

fn sign_typed_data<'life0, 'async_trait>( &'life0 self, address: Address, data: TypedData, ) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_signTypedData

§

fn get_proof<'life0, 'async_trait>( &'life0 self, address: Address, keys: Vec<JsonStorageKey>, block_number: Option<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<EIP1186AccountProofResponse, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Handler for: eth_getProof

§

fn into_rpc(self) -> RpcModule<Self>
where T: Send + Sync + 'static + Clone + Serialize, B: Send + Sync + 'static + Clone + Serialize, R: Send + Sync + 'static + Clone + Serialize, H: Send + Sync + 'static + Clone + Serialize,

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.
§

impl From<AnyRpcBlock> for Block<AnyRpcTransaction, Header<AnyHeader>>

§

fn from(value: AnyRpcBlock) -> Block<AnyRpcTransaction, Header<AnyHeader>>

Converts to this type from the input type.
§

impl<T, H> PartialEq for Block<T, H>
where T: PartialEq, H: PartialEq,

§

fn eq(&self, other: &Block<T, H>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<T, H> Serialize for Block<T, H>
where T: Serialize, H: Serialize,

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl<T, H> Eq for Block<T, H>
where T: Eq, H: Eq,

§

impl<T, H> StructuralPartialEq for Block<T, H>