Skip to content

fix(contracts): n-01 typographical errors#312

Open
0xisk wants to merge 1 commit into
mainfrom
fix/n-01
Open

fix(contracts): n-01 typographical errors#312
0xisk wants to merge 1 commit into
mainfrom
fix/n-01

Conversation

@0xisk
Copy link
Copy Markdown
Member

@0xisk 0xisk commented Apr 10, 2026

Types of changes

What types of changes does your code introduce to OpenZeppelin Midnight Contracts?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Partially OpenZeppelin/compact-contracts#434

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 of new methods and any new behavior or changes to existing behavior
  • CI Workflows Are Passing

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Summary by CodeRabbit

  • Documentation

    • Corrected grammar in function documentation
    • Updated internal documentation references
  • Refactor

    • Updated internal circuit identifiers and naming conventions

@0xisk 0xisk requested a review from andrew-fleming April 10, 2026 11:50
@0xisk 0xisk self-assigned this Apr 10, 2026
@0xisk 0xisk requested review from a team as code owners April 10, 2026 11:50
@0xisk 0xisk moved this from Backlog to Needs Review in OZ Development for Midnight Apr 10, 2026
@0xisk 0xisk added the audit Issues noted by the audit label Apr 10, 2026
@0xisk 0xisk linked an issue Apr 10, 2026 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eaa766fe-1352-4c4a-9280-f83989535945

📥 Commits

Reviewing files that changed from the base of the PR and between 7e09763 and a87e84f.

📒 Files selected for processing (2)
  • contracts/src/math/Bytes8.compact
  • contracts/src/math/Uint128.compact

Walkthrough

Internal circuit naming refactored in Bytes8.compact (_vector8ToUint64_toUint64) with corresponding call site updates. Documentation corrections applied across Uint128.compact, including typo fixes and witness function name alignment in comments.

Changes

Cohort / File(s) Summary
Internal Circuit Refactoring
contracts/src/math/Bytes8.compact
Renamed internal pure circuit from _vector8ToUint64 to _toUint64 and updated both toUint64(vec) and toUint64(bytes) to reference the new circuit identifier.
Documentation Updates
contracts/src/math/Uint128.compact
Fixed documentation phrasing in eq() method ("equal than" → "equal to"), renumbered comment steps in _div circuit, and updated witness function name reference in _sqrt circuit comments from wit_sqrtU128Locally to wit_sqrtU128.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A refactor light, a name made clean,
Bytes and units, a queenly scheme,
Comments aligned with witness calls true,
No logic changed, just polish anew! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title references 'n-01 typographical errors' which aligns with the actual changes—documentation improvements and naming corrections in Bytes8 and Uint128 contracts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/n-01

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit Issues noted by the audit

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

N-01: Typographical Errors

1 participant