Skip to content

refactor(utils): deprecate UINT128_MAX in favor of Uint128.MAX_UINT128 (10/13) - #1145

Draft
pepebndc wants to merge 1 commit into
docs/math-09-changelogfrom
refactor/math-10-uint128-max
Draft

pepebndc wants to merge 1 commit into
docs/math-09-changelogfrom
refactor/math-10-uint128-max

Conversation

@pepebndc

@pepebndc pepebndc commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Part 10 of 13 of the math library migration from midnight-apps contracts/src/math. Refs #213.

Stack: #1125 → #1126 → #1127 → #1128 → #1140 → #1141 → #1142 → #1143 → #1144 → #1145 → #1146 → #1147 → #1148. Merge in order.

Summary

Utils.UINT128_MAX was a stand-in until a math module had the constant. It is now deprecated in favor of Uint128.MAX_UINT128, which returns the same value and type. Doc comment only: the circuit and its callers in token and multisig do not change.

Changes

  • The @deprecated note, the CHANGELOG line under Deprecated and the guide mentions (478abbc0).

Validation

Types of changes

  • Bugfix
  • New feature
  • Breaking change
  • Documentation update

PR Checklist

  • I have read the Contributing Guide
  • I have added tests that prove my fix is effective or that my feature works
  • I have added documentation for new methods or changes to existing method behavior
  • CI Workflows Are Passing

@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Utils.UINT128_MAX carried a TODO to remove it once a math module provides
the constant. Uint128.MAX_UINT128 now returns the same Uint<128> value.
Mark Utils.UINT128_MAX as deprecated and point to it. Doc comment only:
the circuit, its callers in token and multisig, and their ZKIR do not
change. Add the CHANGELOG line and the guide mentions.
@pepebndc
pepebndc force-pushed the refactor/math-10-uint128-max branch from 8a3d6bd to 478abbc Compare October 15, 2026 09:25

This branch has not been deployed

No deployments
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