Skip to content

Conversation

ongyimeng
Copy link
Contributor

Motivation

Closes #11496

Solution

Builds on top of @TropicalDog17 PR to add special handling for TypedReceipt::Deposit variants to prevent runtime panics when processing L2/Optimism deposit transactions.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@ongyimeng
Copy link
Contributor Author

@mattsse for your review ser

EIP7702(ReceiptWithBloom<T>),
#[serde(rename = "0x7E", alias = "0x7e")]
Deposit(DepositReceipt<T>),
Deposit(OpDepositReceiptWithBloom),
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a type alias for ReceiptWithBloom<OpDepositReceipt<T>>

imo, in this case, we either make T the generic for the log type, or we just ditch T entirely and make the other ReceiptWithBloom<T> concrete: ReceiptWithBloom<Receipt<Log>>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sflr just saw this, I agree. Probably leaning towards making the others concrete. I will make the changes soon

Comment on lines +1215 to +1216
.iter()
.cloned()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.iter()
.cloned()
.into_iter()

we consume the receipt here, so no need to clone

@onbjerg onbjerg self-assigned this Sep 15, 2025
@onbjerg onbjerg changed the title Refactor(anvil): Replace duplicate DepositReceipt with op-alloy's refactor(anvil): replace DepositReceipt withl op-alloy's Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Replace duplicate DepositReceipt with op-alloy's
3 participants