Skip to content

Conversation

@mablr
Copy link
Contributor

@mablr mablr commented Dec 15, 2025

Motivation

Last stage of the foundry_primitives integration: receipts.

Solution

  • Leverage FoundryReceiptEnvelope generic to replace TypedReceiptRpc
  • Use the ReceiptResponse trait in Anvil instead of former anvil-core helpers
  • Removed alloy-network and op-alloy-consensus deps in anvil-core as everything was moved to primitives
  • Removed useless impls for FoundryReceiptEnvelope

More conversion sugar could be added later.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

- Enhanced `FoundryReceiptEnvelope` with a new method to convert logs for RPC compatibility.
- Updated various usages of receipt handling across the codebase to align with the new structure.
… conversions from rpc any

- Use the `ReceiptResponse` trait in Anvil instead of anvil-core helpers
- Removed alloy-network and op-alloy-consensus deps in anivil-core
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

#[serde(flatten)]
pub l1_block_info: L1BlockInfo,
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, AsRef)]
pub struct FoundryTxReceipt(WithOtherFields<TransactionReceipt<FoundryReceiptEnvelope<Log>>>);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo this makes sense

Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, makes sense, let's merge and we can followup should more needed. I guess next step for this effort would be to add sample of custom tempo txes with anvil

@grandizzy grandizzy added this pull request to the merge queue Dec 15, 2025
Copy link
Contributor Author

@mablr mablr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess next step for this effort would be to add sample of custom tempo txes with anvil

Exactly 😎

Merged via the queue into foundry-rs:master with commit 1e0184b 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.

3 participants