You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Converting to/from integer types can be a huge source of bugs, and the use of xdr.Int128Parts will be prolific in the Soroban world as the de-facto way to represent amounts.
What would you like to see?
A new package, support/i128, that deals with everything 128-bit related. This (non-exhaustive) list includes:
doing math on the value
correctly representing negative values in the unsigned "halves" of the XDR struct
safely converting to/from int64 values which represent
conversions to/from strings with varying degrees of decimal precision/representation
It's likely that there are libraries out there we can leverage or at least borrow code from, but it will still need to be custom to some degree to adapt specifically to the xdr.Int128Parts structure.
What alternatives are there?
Chug along until it becomes a bigger problem.
The text was updated successfully, but these errors were encountered:
What problem does your feature solve?
Converting to/from integer types can be a huge source of bugs, and the use of
xdr.Int128Parts
will be prolific in the Soroban world as the de-facto way to represent amounts.What would you like to see?
A new package,
support/i128
, that deals with everything 128-bit related. This (non-exhaustive) list includes:int64
values which representIt's likely that there are libraries out there we can leverage or at least borrow code from, but it will still need to be custom to some degree to adapt specifically to the
xdr.Int128Parts
structure.What alternatives are there?
Chug along until it becomes a bigger problem.
The text was updated successfully, but these errors were encountered: