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

ethapi/receipt: Use hexutil for JSON marshalling #315

Merged
merged 1 commit into from
May 15, 2024

Conversation

trianglesphere
Copy link
Contributor

Description

This switches *big.Int to *hexutil.Big and *uint32 to *hexutil.Uint64 for marshalling the post-ecotone fields. Hexutil is what is expected on the read side.

I had to switch from uint32 to uint64 for the scalar fields in the JSON because there is no hexutil.Uint32. This conversion is safe & internally it still uses a uint32 type.

Tests

Tested locally

This switches *big.Int to *hexutil.Big and *uint32 to *hexutil.Uint64 for
marshalling the post-ecotone fields. Hexutil is what is expected on the read side.

I had to switch from uint32 to uint64 for the scalar fields in the JSON because
there is no hexutil.Uint32. This conversion is safe & internally it still uses
a uint32 type.
@trianglesphere trianglesphere marked this pull request as ready for review May 15, 2024 18:16
@trianglesphere trianglesphere requested a review from a team as a code owner May 15, 2024 18:16
@trianglesphere trianglesphere requested review from tynes and removed request for a team May 15, 2024 18:16
@trianglesphere trianglesphere merged commit 6b2bf0f into optimism May 15, 2024
10 checks passed
@trianglesphere trianglesphere deleted the jg/fix_receipts branch May 15, 2024 19:09
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