Add Uint/Int 256 support for Stellar (Soroban) target (#1831) #1832
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Soroban contracts increasingly require 256-bit arithmetic compatibility with Solidity. This PR brings Solang’s Soroban backend to parity for 256-bit types, enabling broader contract portability and correctness.
Implementation -
Encoding/Decoding
int256
Host Functions
ObjToU256LoLo
,ObjToU256LoHi
,ObjToU256HiLo
,ObjToU256HiHi
,ObjFromU256Pieces
ObjToI256LoLo
,ObjToI256LoHi
,ObjToI256HiLo
,ObjToI256HiHi
,ObjFromI256Pieces
ObjTo*
:(i64) -> i64
ObjFrom*Pieces
:(i64, i64, i64, i64) -> i64
Fixes #1831