-
Notifications
You must be signed in to change notification settings - Fork 792
Re-enable the transaction.other field for optimism feature #2622
Conversation
6493841
to
cc01eb1
Compare
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
optimism
feature.Anvil uses the
other
field to pass back additional information: https://github.com/foundry-rs/foundry/blob/49007938138ae26379e7a19bf3b2ec2ba6822017/crates/anvil/src/eth/api.rs#L1801-L1812Solution
Remove the
optimism
feature opt-out from theother
field. This also makes it consistent with theBlock
struct:ethers-rs/ethers-core/src/types/block.rs
Lines 109 to 112 in 70e5f02
and the
TransactionReceipt
struct:ethers-rs/ethers-core/src/types/transaction/response.rs
Lines 531 to 534 in 70e5f02
PR Checklist