Component
network, json-rpc, providers, pubsub
Describe the feature you would like
#190 replaced the provider with a network-parameterized provider, but block responses are still just Ethereum headers and Ethereum transactions. We need a Block type generic for networks.
We have one in alloy-network but we need to check that it is correct and use it in alloy-providers:
|
pub enum TransactionList<T> { |
|
/// Hashes only. |
|
Hashes(Vec<B256>), |
|
/// Hydrated tx objects. |
|
Hydrated(Vec<T>), |
|
/// Special case for uncle response |
|
Uncled, |
|
} |
|
|
|
/// A block response |
|
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)] |
|
pub struct BlockResponse<N: Network> { |
|
#[serde(flatten)] |
|
header: N::HeaderResponse, |
|
transactions: TransactionList<N::TransactionResponse>, |
|
} |
Additional context
No response
Component
network, json-rpc, providers, pubsub
Describe the feature you would like
#190 replaced the provider with a network-parameterized provider, but block responses are still just Ethereum headers and Ethereum transactions. We need a
Blocktype generic for networks.We have one in
alloy-networkbut we need to check that it is correct and use it inalloy-providers:alloy/crates/network/src/lib.rs
Lines 36 to 51 in 63af0c4
Additional context
No response