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

Provide library functions to convert numbers into BE-ordered byte strings #3606

Open
roman-khimov opened this issue Oct 11, 2024 · 0 comments
Labels
feature Completely new functionality I3 Minimal impact S4 Routine U4 Nothing urgent

Comments

@roman-khimov
Copy link
Member

Is your feature request related to a problem? Please describe.

I'm always frustrated when contracts have to write code to deal with simple problems. BE-serialized integers are useful because of their ordering characteristics, but default int->bytes conversion is LE in the VM.

Describe the solution you'd like

Provide methods to obtain fixed-width byte string from integer in BE format.

Additional context

nspcc-dev/neofs-contract#438

@roman-khimov roman-khimov added feature Completely new functionality I3 Minimal impact U4 Nothing urgent S4 Routine labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Completely new functionality I3 Minimal impact S4 Routine U4 Nothing urgent
Projects
None yet
Development

No branches or pull requests

1 participant