Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: serde for transactions #1630

Merged
merged 3 commits into from
Nov 7, 2024
Merged

fix: serde for transactions #1630

merged 3 commits into from
Nov 7, 2024

Conversation

klkvr
Copy link
Member

@klkvr klkvr commented Nov 7, 2024

Motivation

Makes all transactions to always serialize to: null instead of omitting the field.

Adds deprecated gaaPrice field to RPC transaction which is only serialized if inner tx does not have its own gasPrice

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

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.

lgtm, could use some additional test cases from hive

Comment on lines +277 to +278
/// Helper struct which will be flattened into the transaction and will only contain `gasPrice`
/// field if inner [`TxEnvelope`] did not consume it.
Copy link
Member

Choose a reason for hiding this comment

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

is this a serde flatten hack?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep, it relies on it being deserialized after the inner tx. if it was just a field it would always be deserialized and consumed before

@klkvr klkvr merged commit ae9ac3b into main Nov 7, 2024
26 checks passed
@klkvr klkvr deleted the klkvr/fix-serde branch November 7, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants