diff --git a/crates/rpc-types-trace/src/otterscan.rs b/crates/rpc-types-trace/src/otterscan.rs index a56ed47366ea..e8fff7313ff5 100644 --- a/crates/rpc-types-trace/src/otterscan.rs +++ b/crates/rpc-types-trace/src/otterscan.rs @@ -102,17 +102,17 @@ pub struct InternalIssuance { /// Custom `Block` struct that includes transaction count for Otterscan responses #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct OtsBlock { +pub struct OtsBlock { /// The block information. #[serde(flatten)] - pub block: Block, + pub block: Block, /// The number of transactions in the block. #[doc(alias = "tx_count")] pub transaction_count: usize, } -impl From for OtsBlock { - fn from(block: Block) -> Self { +impl From> for OtsBlock { + fn from(block: Block) -> Self { Self { transaction_count: block.transactions.len(), block } } } @@ -138,8 +138,8 @@ pub struct OtsSlimBlock { pub transaction_count: usize, } -impl From for OtsSlimBlock { - fn from(block: Block) -> Self { +impl From> for OtsSlimBlock { + fn from(block: Block) -> Self { Self { header: block.header, uncles: block.uncles, @@ -162,8 +162,8 @@ pub struct BlockDetails { pub total_fees: U256, } -impl From> for BlockDetails { - fn from(rich_block: Rich) -> Self { +impl From>> for BlockDetails { + fn from(rich_block: Rich>) -> Self { Self { block: rich_block.inner.into(), issuance: Default::default(), @@ -174,7 +174,7 @@ impl From> for BlockDetails { impl BlockDetails { /// Create a new `BlockDetails` struct. - pub fn new(rich_block: Rich, issuance: InternalIssuance, total_fees: U256) -> Self { + pub fn new(rich_block: Rich>, issuance: InternalIssuance, total_fees: U256) -> Self { Self { block: rich_block.inner.into(), issuance, total_fees } } } @@ -220,9 +220,9 @@ pub struct OtsReceipt { /// Custom struct for otterscan `getBlockTransactions` RPC response #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] -pub struct OtsBlockTransactions { +pub struct OtsBlockTransactions { /// The full block information with transaction count. - pub fullblock: OtsBlock, + pub fullblock: OtsBlock, /// The list of transaction receipts. pub receipts: Vec, } @@ -232,10 +232,10 @@ pub struct OtsBlockTransactions { #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] #[doc(alias = "TxWithReceipts")] -pub struct TransactionsWithReceipts { +pub struct TransactionsWithReceipts { /// The list of transactions. #[doc(alias = "transactions")] - pub txs: Vec, + pub txs: Vec, /// The list of transaction receipts. pub receipts: Vec, /// Indicates if this is the first page of results.