Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions crates/primitives/src/network/receipt.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use alloy_consensus::{Receipt, TxReceipt};
use alloy_network::{AnyReceiptEnvelope, AnyTransactionReceipt, ReceiptResponse};
use alloy_primitives::{Address, B256, BlockHash, TxHash, U64};
use alloy_rpc_types::{Log, TransactionReceipt};
use alloy_rpc_types::{ConversionError, Log, TransactionReceipt};
use alloy_serde::WithOtherFields;
use derive_more::AsRef;
use op_alloy_consensus::{OpDepositReceipt, OpDepositReceiptWithBloom};
Expand Down Expand Up @@ -77,7 +77,7 @@ impl ReceiptResponse for FoundryTxReceipt {
}

impl TryFrom<AnyTransactionReceipt> for FoundryTxReceipt {
type Error = ();
type Error = ConversionError;

fn try_from(receipt: AnyTransactionReceipt) -> Result<Self, Self::Error> {
let WithOtherFields {
Expand Down Expand Up @@ -150,7 +150,12 @@ impl TryFrom<AnyTransactionReceipt> for FoundryTxReceipt {
logs_bloom: receipt_with_bloom.logs_bloom,
})
}
_ => return Err(()),
_ => {
let tx_type = r#type;
return Err(ConversionError::Custom(format!(
"Unknown transaction receipt type: 0x{tx_type:02X}"
)));
}
},
},
other,
Expand Down
Loading