@@ -6,18 +6,18 @@ use alloy_consensus::{
66 eip4844:: { TxEip4844 , TxEip4844Variant , TxEip4844WithSidecar } ,
77 TxEip7702 ,
88 } ,
9- AnyReceiptEnvelope , Receipt , ReceiptEnvelope , ReceiptWithBloom , Signed , Transaction , TxEip1559 ,
10- TxEip2930 , TxEnvelope , TxLegacy , TxReceipt ,
9+ Receipt , ReceiptEnvelope , ReceiptWithBloom , Signed , Transaction , TxEip1559 , TxEip2930 ,
10+ TxEnvelope , TxLegacy , TxReceipt ,
1111} ;
1212use alloy_eips:: eip2718:: { Decodable2718 , Eip2718Error , Encodable2718 } ;
13- use alloy_network:: { AnyRpcTransaction , AnyTxEnvelope } ;
13+ use alloy_network:: { AnyReceiptEnvelope , AnyRpcTransaction , AnyTransactionReceipt , AnyTxEnvelope } ;
1414use alloy_primitives:: {
1515 Address , Bloom , Bytes , Log , PrimitiveSignature , TxHash , TxKind , B256 , U256 , U64 ,
1616} ;
1717use alloy_rlp:: { length_of_length, Decodable , Encodable , Header } ;
1818use alloy_rpc_types:: {
19- request:: TransactionRequest , trace:: otterscan:: OtsReceipt , AccessList , AnyTransactionReceipt ,
20- ConversionError , Transaction as RpcTransaction , TransactionReceipt ,
19+ request:: TransactionRequest , trace:: otterscan:: OtsReceipt , AccessList , ConversionError ,
20+ Transaction as RpcTransaction , TransactionReceipt ,
2121} ;
2222use alloy_serde:: { OtherFields , WithOtherFields } ;
2323use bytes:: BufMut ;
@@ -1109,7 +1109,7 @@ pub struct TransactionInfo {
11091109
11101110#[ derive( Debug , Serialize , Deserialize , Clone , PartialEq , Eq ) ]
11111111#[ serde( rename_all = "camelCase" ) ]
1112- pub struct DepositReceipt < T = alloy_primitives:: Log > {
1112+ pub struct DepositReceipt < T = Receipt < alloy_primitives:: Log > > {
11131113 #[ serde( flatten) ]
11141114 pub inner : ReceiptWithBloom < T > ,
11151115 #[ serde( default , with = "alloy_serde::quantity::opt" ) ]
@@ -1136,7 +1136,7 @@ impl DepositReceipt {
11361136 /// Encodes the receipt data.
11371137 fn encode_fields ( & self , out : & mut dyn BufMut ) {
11381138 self . receipt_rlp_header ( ) . encode ( out) ;
1139- self . inner . receipt . status . encode ( out) ;
1139+ self . inner . status ( ) . encode ( out) ;
11401140 self . inner . receipt . cumulative_gas_used . encode ( out) ;
11411141 self . inner . logs_bloom . encode ( out) ;
11421142 self . inner . receipt . logs . encode ( out) ;
@@ -1161,7 +1161,7 @@ impl DepositReceipt {
11611161 let status = Decodable :: decode ( b) ?;
11621162 let cumulative_gas_used = Decodable :: decode ( b) ?;
11631163 let logs_bloom = Decodable :: decode ( b) ?;
1164- let logs = Decodable :: decode ( b) ?;
1164+ let logs: Vec < Log > = Decodable :: decode ( b) ?;
11651165 let deposit_nonce = remaining ( b) . then ( || alloy_rlp:: Decodable :: decode ( b) ) . transpose ( ) ?;
11661166 let deposit_nonce_version =
11671167 remaining ( b) . then ( || alloy_rlp:: Decodable :: decode ( b) ) . transpose ( ) ?;
@@ -1207,7 +1207,7 @@ impl alloy_rlp::Decodable for DepositReceipt {
12071207
12081208#[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize ) ]
12091209#[ serde( tag = "type" ) ]
1210- pub enum TypedReceipt < T = alloy_primitives:: Log > {
1210+ pub enum TypedReceipt < T = Receipt < alloy_primitives:: Log > > {
12111211 #[ serde( rename = "0x0" , alias = "0x00" ) ]
12121212 Legacy ( ReceiptWithBloom < T > ) ,
12131213 #[ serde( rename = "0x1" , alias = "0x01" ) ]
@@ -1248,8 +1248,8 @@ impl<T> From<TypedReceipt<T>> for ReceiptWithBloom<T> {
12481248 }
12491249}
12501250
1251- impl From < TypedReceipt < alloy_rpc_types:: Log > > for OtsReceipt {
1252- fn from ( value : TypedReceipt < alloy_rpc_types:: Log > ) -> Self {
1251+ impl From < TypedReceipt < Receipt < alloy_rpc_types:: Log > > > for OtsReceipt {
1252+ fn from ( value : TypedReceipt < Receipt < alloy_rpc_types:: Log > > ) -> Self {
12531253 let r#type = match value {
12541254 TypedReceipt :: Legacy ( _) => 0x00 ,
12551255 TypedReceipt :: EIP2930 ( _) => 0x01 ,
@@ -1258,7 +1258,7 @@ impl From<TypedReceipt<alloy_rpc_types::Log>> for OtsReceipt {
12581258 TypedReceipt :: EIP7702 ( _) => 0x04 ,
12591259 TypedReceipt :: Deposit ( _) => 0x7E ,
12601260 } as u8 ;
1261- let receipt = ReceiptWithBloom :: < alloy_rpc_types:: Log > :: from ( value) ;
1261+ let receipt = ReceiptWithBloom :: < Receipt < alloy_rpc_types:: Log > > :: from ( value) ;
12621262 let status = receipt. status ( ) ;
12631263 let cumulative_gas_used = receipt. cumulative_gas_used ( ) as u64 ;
12641264 let logs = receipt. logs ( ) . to_vec ( ) ;
@@ -1282,7 +1282,7 @@ impl TypedReceipt {
12821282 }
12831283}
12841284
1285- impl From < ReceiptEnvelope < alloy_rpc_types:: Log > > for TypedReceipt < alloy_rpc_types:: Log > {
1285+ impl From < ReceiptEnvelope < alloy_rpc_types:: Log > > for TypedReceipt < Receipt < alloy_rpc_types:: Log > > {
12861286 fn from ( value : ReceiptEnvelope < alloy_rpc_types:: Log > ) -> Self {
12871287 match value {
12881288 ReceiptEnvelope :: Legacy ( r) => Self :: Legacy ( r) ,
@@ -1439,7 +1439,7 @@ impl Decodable2718 for TypedReceipt {
14391439 }
14401440}
14411441
1442- pub type ReceiptResponse = TransactionReceipt < TypedReceipt < alloy_rpc_types:: Log > > ;
1442+ pub type ReceiptResponse = TransactionReceipt < TypedReceipt < Receipt < alloy_rpc_types:: Log > > > ;
14431443
14441444pub fn convert_to_anvil_receipt ( receipt : AnyTransactionReceipt ) -> Option < ReceiptResponse > {
14451445 let WithOtherFields {
0 commit comments