Add min_value and max_value helpers to 256-bit numbers#1823
Merged
mootz12 merged 5 commits intorelease/v26-previewfrom Apr 7, 2026
Merged
Add min_value and max_value helpers to 256-bit numbers#1823mootz12 merged 5 commits intorelease/v26-previewfrom
min_value and max_value helpers to 256-bit numbers#1823mootz12 merged 5 commits intorelease/v26-previewfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds missing boundary helpers for the Soroban SDK’s 256-bit numeric wrapper types, improving parity with expectations for integer APIs (per #1740).
Changes:
- Add
U256::{min_value,max_value}helpers. - Add
I256::max_valuehelper (and move/normalizemin_valueplacement). - Add unit tests covering the new min/max helpers.
jayz22
approved these changes
Apr 6, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
bfbd22f to
51c8eaf
Compare
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 7, 2026
### What * Update soroban-env dependencies to p26 * Add support for CAP-78 host functions to perform limited TTL extensions on contract data and code entries (#1807) * Add support for CAP-82 host functions to perform checked math on 256-bit integer types (#1801) * Add `min_value` and `max_value` functions on 256-bit integer types (#1823) * Add support for CAP-79 (muxed address strkey conversion host functions) and CAP-80 (Additional BN254 and BLS12-381 host functions) (#1745) * Add support for CAP-73 Stellar Asset Contract `trust()` function (#1801) ### Why Update SDK to support new features in protocol 26. ### Known limitations None --------- Co-authored-by: Siddharth Suresh <siddharth@stellar.org> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sisuresh <5050166+sisuresh@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Dmytro Kozhevin <dmytro@stellar.org> Co-authored-by: Jay Geng <jay@stellar.org> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds
min_valueandmax_valuehelpers to 256-bit numbers.Why
These functions were missing for 256-bit numbers.
Closes #1740
Known limitations
None