Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Conversation

@anikaraghu
Copy link
Contributor

@anikaraghu anikaraghu commented Nov 20, 2023

Motivation

The is_system_tx field is not being renamed to camel case version like the other fields, and is causing issues since it is renamed in a different part of the code:

#[serde(default, rename = "isSystemTx")]

Solution

Rename to camel case. It brings up a question though which is why we dont by default rename all fields in the struct? I can make this change if that's preferred.
By making this change, it allows the tests in this PR to pass: foundry-rs/foundry#6073

cc @mattsse

PR Checklist

  • Added Tests (in foundry PR)
  • Added Documentation
  • Breaking changes


/// If true, the transaction does not interact with the L2 block gas pool.
/// Note: boolean is disabled (enforced to be false) starting from the Regolith upgrade.
#[serde(rename = "isSystemTx")]
Copy link
Contributor Author

@anikaraghu anikaraghu Nov 20, 2023

Choose a reason for hiding this comment

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

out of curiosity, why do we not just use #[serde(rename_all = "camelCase")] at the top?

Copy link
Collaborator

Choose a reason for hiding this comment

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

good question, this could have been avoided by using rename_all yes

@anikaraghu anikaraghu marked this pull request as ready for review November 20, 2023 23:38
Copy link
Collaborator

@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.

nice find


/// If true, the transaction does not interact with the L2 block gas pool.
/// Note: boolean is disabled (enforced to be false) starting from the Regolith upgrade.
#[serde(rename = "isSystemTx")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

good question, this could have been avoided by using rename_all yes

@mattsse mattsse merged commit 4a38a95 into gakonst:master Nov 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants