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

feat: serialize integers higher than u32 in hex format #65

Merged
merged 5 commits into from
Oct 18, 2024

Conversation

glihm
Copy link
Collaborator

@glihm glihm commented Oct 18, 2024

Most of interop required by Cainome data are JavaScript clients.

JavaScript uses the IEEE 754 standard for floating-point arithmetic, which can safely represent integers up to 2^53 - 1.

Hence, any integer greater than u32 are serialized using lower hex format.

Current support if for single value and tuple. In a tuple, if one value is subject to be serialized with hex, all the values are actually required to support lower hex format.

This might be a limitation in some situations though.

@glihm glihm merged commit 8b8ca8e into main Oct 18, 2024
3 checks passed
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.

1 participant