Skip to content

Conversation

@oooLowNeoNooo
Copy link
Contributor

Problem

The TryFrom<AnyTransactionReceipt> implementation for FoundryTxReceipt uses () as the error type, which provides no information about conversion failures. When an unknown transaction receipt type is encountered, callers receive an uninformative error that makes debugging difficult.

Solution

Replace the unit error type with ConversionError from alloy_rpc_types, matching the pattern used in TryFrom<AnyRpcTransaction>. The error now includes the unknown transaction type in the message (e.g., "Unknown transaction receipt type: 0x05"), improving error diagnostics and maintainability.

@onbjerg onbjerg added this pull request to the merge queue Dec 15, 2025
Merged via the queue into foundry-rs:master with commit ff5f0a9 Dec 15, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this to Done in Foundry Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants