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

Increase handling of JSON Number large numbers (vs. string) #77

Merged
merged 3 commits into from
Aug 28, 2024

Conversation

peterbroadhurst
Copy link
Contributor

@peterbroadhurst peterbroadhurst commented Aug 27, 2024

Builds on #76 to cover some additional important cases where consumers of this library use types that need to support:

  • Scientific notation in JSON structure
  • The possibility of JSON Number encoded (vs. string) large numbers

The code does cause errors in some previously ignored scenarios that would result in bad numbers:

  • Attempting to parse a HexUint64 from a number larger than 18446744073709551615
  • Attempting to parse a HexUint64 from a fractional number like 1.2345

Copy link
Contributor

@EnriqueL8 EnriqueL8 left a comment

Choose a reason for hiding this comment

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

Looks good but spotted a problem

pkg/abi/inputparsing.go Show resolved Hide resolved
@matthew1001
Copy link
Contributor

Thanks for covering these cases that I didn't in the original PR @peterbroadhurst. They look good to me with the exception of @EnriqueL8 's comment. I'll leave him to approve it once that comment has been resolved.

Copy link
Contributor

@EnriqueL8 EnriqueL8 left a comment

Choose a reason for hiding this comment

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

Looks good

@EnriqueL8 EnriqueL8 merged commit 27d2240 into main Aug 28, 2024
2 checks passed
@peterbroadhurst peterbroadhurst deleted the more-json-number-support branch August 28, 2024 14:13
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.

3 participants