pub type RpcBlock<T> = Block<RpcTransaction<T>, RpcHeader<T>>;
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>
impl<T> Block<T>
pub fn from_consensus(
block: Block<T>,
total_difficulty: Option<Uint<256, 4>>,
) -> Block<T>where
T: Encodable,
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>
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>
impl<T, H> Block<T, H>
pub const fn empty(header: 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>
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>,
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>
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>
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>
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>>>
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>
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>>>
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>
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>
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>
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>,
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>,
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>
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>
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,
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,
impl<T, H> Block<T, H>where
T: TransactionResponse,
pub fn into_full_block(self, txs: Vec<T>) -> Block<T, H>
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,
impl<T, H> Block<T, Header<H>>where
H: Sealable + Encodable,
pub fn uncle_from_header(header: H) -> Block<T, Header<H>>
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,
impl<T, H> BlockResponse for Block<T, H>where
T: TransactionResponse,
§type Transaction = T
type Transaction = T
§fn transactions(&self) -> &BlockTransactions<T>
fn transactions(&self) -> &BlockTransactions<T>
§fn transactions_mut(
&mut self,
) -> &mut BlockTransactions<<Block<T, H> as BlockResponse>::Transaction>
fn transactions_mut( &mut self, ) -> &mut BlockTransactions<<Block<T, H> as BlockResponse>::Transaction>
§fn other_fields(&self) -> Option<&OtherFields>
fn other_fields(&self) -> Option<&OtherFields>
other
field from WithOtherFields
type.§impl<'de, T, H> Deserialize<'de> for Block<T, H>where
T: Deserialize<'de>,
H: Deserialize<'de>,
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>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Block<T, H>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§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
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
Source§fn protocol_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn protocol_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_protocolVersion
Handler for: eth_coinbase
Source§fn block_number(&self) -> RpcResult<U256>
fn block_number(&self) -> RpcResult<U256>
Handler for: eth_blockNumber
Source§fn chain_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn chain_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_chainId
Source§fn block_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: B256,
full: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcBlock<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: B256,
full: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcBlock<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getBlockByHash
Source§fn block_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
full: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcBlock<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
full: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcBlock<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getBlockByNumber
Source§fn block_transaction_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_transaction_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getBlockTransactionCountByHash
Source§fn block_transaction_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_transaction_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getBlockTransactionCountByNumber
Source§fn block_uncles_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_uncles_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getUncleCountByBlockHash
Source§fn block_uncles_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_uncles_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getUncleCountByBlockNumber
Source§fn block_receipts<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<RpcReceipt<T::NetworkTypes>>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_receipts<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<RpcReceipt<T::NetworkTypes>>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getBlockReceipts
Source§fn uncle_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: B256,
index: Index,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcBlock<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn uncle_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: B256,
index: Index,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcBlock<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getUncleByBlockHashAndIndex
Source§fn uncle_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcBlock<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn uncle_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcBlock<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getUncleByBlockNumberAndIndex
Source§fn raw_transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn raw_transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getRawTransactionByHash
Source§fn transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcTransaction<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcTransaction<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getTransactionByHash
Source§fn raw_transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: B256,
index: Index,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn raw_transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: B256,
index: Index,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getRawTransactionByBlockHashAndIndex
Source§fn transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: B256,
index: Index,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcTransaction<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: B256,
index: Index,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcTransaction<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getTransactionByBlockHashAndIndex
Source§fn raw_transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn raw_transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getRawTransactionByBlockNumberAndIndex
Source§fn transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcTransaction<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcTransaction<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getTransactionByBlockNumberAndIndex
Source§fn transaction_by_sender_and_nonce<'life0, 'async_trait>(
&'life0 self,
sender: Address,
nonce: U64,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcTransaction<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction_by_sender_and_nonce<'life0, 'async_trait>(
&'life0 self,
sender: Address,
nonce: U64,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcTransaction<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getTransactionBySenderAndNonce
Source§fn transaction_receipt<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcReceipt<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction_receipt<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcReceipt<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getTransactionReceipt
Source§fn balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getBalance
Source§fn storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
index: JsonStorageKey,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<B256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
index: JsonStorageKey,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<B256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getStorageAt
Source§fn transaction_count<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction_count<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getTransactionCount
Source§fn get_code<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_code<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getCode
Source§fn header_by_number<'life0, 'async_trait>(
&'life0 self,
block_number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcHeader<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn header_by_number<'life0, 'async_trait>(
&'life0 self,
block_number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcHeader<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getHeaderByNumber
Source§fn header_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcHeader<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn header_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<RpcHeader<T::NetworkTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getHeaderByHash
Source§fn simulate_v1<'life0, 'async_trait>(
&'life0 self,
payload: SimulatePayload,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<SimulatedBlock<RpcBlock<T::NetworkTypes>>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn simulate_v1<'life0, 'async_trait>(
&'life0 self,
payload: SimulatePayload,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<SimulatedBlock<RpcBlock<T::NetworkTypes>>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_simulateV1
Source§fn call<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_overrides: Option<StateOverride>,
block_overrides: Option<Box<BlockOverrides>>,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn call<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_overrides: Option<StateOverride>,
block_overrides: Option<Box<BlockOverrides>>,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_call
Source§fn call_many<'life0, 'async_trait>(
&'life0 self,
bundles: Vec<Bundle>,
state_context: Option<StateContext>,
state_override: Option<StateOverride>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<Vec<EthCallResponse>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn call_many<'life0, 'async_trait>(
&'life0 self,
bundles: Vec<Bundle>,
state_context: Option<StateContext>,
state_override: Option<StateOverride>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<Vec<EthCallResponse>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_callMany
Source§fn create_access_list<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_override: Option<StateOverride>,
) -> Pin<Box<dyn Future<Output = RpcResult<AccessListResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_access_list<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_override: Option<StateOverride>,
) -> Pin<Box<dyn Future<Output = RpcResult<AccessListResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_createAccessList
Source§fn estimate_gas<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_override: Option<StateOverride>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn estimate_gas<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_override: Option<StateOverride>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_estimateGas
Source§fn gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_gasPrice
Source§fn get_account<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Account>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Account>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getAccount
Source§fn max_priority_fee_per_gas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn max_priority_fee_per_gas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_maxPriorityFeePerGas
Source§fn blob_base_fee<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn blob_base_fee<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_blobBaseFee
Source§fn fee_history<'life0, 'async_trait>(
&'life0 self,
block_count: U64,
newest_block: BlockNumberOrTag,
reward_percentiles: Option<Vec<f64>>,
) -> Pin<Box<dyn Future<Output = RpcResult<FeeHistory>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fee_history<'life0, 'async_trait>(
&'life0 self,
block_count: U64,
newest_block: BlockNumberOrTag,
reward_percentiles: Option<Vec<f64>>,
) -> Pin<Box<dyn Future<Output = RpcResult<FeeHistory>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_feeHistory
Source§fn is_mining<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_mining<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_mining
Source§fn hashrate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn hashrate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_hashrate
Source§fn get_work<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Work>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_work<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Work>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getWork
Source§fn submit_hashrate<'life0, 'async_trait>(
&'life0 self,
_hashrate: U256,
_id: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_hashrate<'life0, 'async_trait>(
&'life0 self,
_hashrate: U256,
_id: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_submitHashrate
Source§fn submit_work<'life0, 'async_trait>(
&'life0 self,
_nonce: B64,
_pow_hash: B256,
_mix_digest: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_work<'life0, 'async_trait>(
&'life0 self,
_nonce: B64,
_pow_hash: B256,
_mix_digest: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_submitWork
Source§fn send_transaction<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<B256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_transaction<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<B256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_sendTransaction
Source§fn send_raw_transaction<'life0, 'async_trait>(
&'life0 self,
tx: Bytes,
) -> Pin<Box<dyn Future<Output = RpcResult<B256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_raw_transaction<'life0, 'async_trait>(
&'life0 self,
tx: Bytes,
) -> Pin<Box<dyn Future<Output = RpcResult<B256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_sendRawTransaction
Source§fn sign<'life0, 'async_trait>(
&'life0 self,
address: Address,
message: Bytes,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign<'life0, 'async_trait>(
&'life0 self,
address: Address,
message: Bytes,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_sign
Source§fn sign_transaction<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign_transaction<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_signTransaction
Source§fn sign_typed_data<'life0, 'async_trait>(
&'life0 self,
address: Address,
data: TypedData,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign_typed_data<'life0, 'async_trait>(
&'life0 self,
address: Address,
data: TypedData,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_signTypedData
Source§fn get_proof<'life0, 'async_trait>(
&'life0 self,
address: Address,
keys: Vec<JsonStorageKey>,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<EIP1186AccountProofResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_proof<'life0, 'async_trait>(
&'life0 self,
address: Address,
keys: Vec<JsonStorageKey>,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<EIP1186AccountProofResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for: eth_getProof