-
Notifications
You must be signed in to change notification settings - Fork 784
Re-enable the transaction.other field for optimism feature #2622
Conversation
6493841 to
cc01eb1
Compare
mattsse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is opting out required here required for optimism?
|
My understanding is that Anvil uses the If we enable the |
cc01eb1 to
a307c9f
Compare
|
for example, in my anvil branch that adds op deposit tx support, i've had to disable usage of the |
| #[cfg(not(any(feature = "celo")))] | ||
| #[serde(flatten)] | ||
| pub other: crate::types::OtherFields, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, I think this is reasonable to always enable this because this is also useful for other chains that include additional fields
|
I'm holding off on merging until we have a foundry companion PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed, this is reasonable to capture anything else, regardless of the optimism feature,
does not impact foundry but makes it possible to capture OP fields
Motivation
I'm in the process of adding op-stack deposit tx support to anvil. This requires enabling the
optimismfeature.Anvil uses the
otherfield to pass back additional information: https://github.com/foundry-rs/foundry/blob/49007938138ae26379e7a19bf3b2ec2ba6822017/crates/anvil/src/eth/api.rs#L1801-L1812Solution
Remove the
optimismfeature opt-out from theotherfield. This also makes it consistent with theBlockstruct:ethers-rs/ethers-core/src/types/block.rs
Lines 109 to 112 in 70e5f02
and the
TransactionReceiptstruct:ethers-rs/ethers-core/src/types/transaction/response.rs
Lines 531 to 534 in 70e5f02
PR Checklist