Skip to content

Conversation

@arr00
Copy link
Contributor

@arr00 arr00 commented Dec 2, 2025

The freezer role was removed during the last release cycle, but some of the docs accompanying it remained--this PR removed docs mentioning the freezer role.

Summary by CodeRabbit

  • Documentation
    • Clarified token freezing mechanism documentation to reflect internal implementation approach and updated associated guarantees.

✏️ Tip: You can customize this high-level summary in your review settings.

@arr00 arr00 requested a review from a team as a code owner December 2, 2025 14:27
@netlify
Copy link

netlify bot commented Dec 2, 2025

Deploy Preview for confidential-tokens ready!

Name Link
🔨 Latest commit 607680c
🔍 Latest deploy log https://app.netlify.com/projects/confidential-tokens/deploys/692ef76c86e3e500083c6588
😎 Deploy Preview https://deploy-preview-264--confidential-tokens.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

Walkthrough

The pull request updates documentation and NatSpec comments in the ERC7984Freezable contract to reflect a shift from external freeze/unfreeze capabilities to internal-only functions. The freezing mechanism is now documented as managed by inheriting contracts via the internal _setConfidentialFrozen function rather than through an authorized account.

Changes

Cohort / File(s) Change Summary
Documentation Updates
CHANGELOG.md, contracts/token/ERC7984/extensions/ERC7984Freezable.sol
Updated documentation and NatSpec comments to reflect that the freezing mechanism is now internal-only, managed via calls to _setConfidentialFrozen in inheriting contracts. Revised guarantee statement from owner-centric language to generalized description of token transferability restrictions.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Changes are limited to NatSpec and CHANGELOG documentation updates with no logic modifications
  • Simple comment rewording from external API to internal mechanism

Possibly related PRs

Suggested reviewers

  • james-toussaint

Poem

🐰 Freeze the tokens, keep them tight,
Internal paths, now done right,
No more external calls to make,
Just whispered functions in their wake! 🥶

Pre-merge checks and finishing touches

✅ 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 accurately describes the main change: removing mentions of the freezer role from documentation in ERC7984Freezable. The changes confirm this by updating NatSpec comments to reflect internal function management instead of authorized account-based freezing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/fix-freezable-docs

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c718cc3 and 607680c.

📒 Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • contracts/token/ERC7984/extensions/ERC7984Freezable.sol (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: james-toussaint
Repo: OpenZeppelin/openzeppelin-confidential-contracts PR: 160
File: test/token/ERC7984/extensions/ERC7984Rwa.test.ts:474-479
Timestamp: 2025-09-22T09:21:34.470Z
Learning: For force transfers in ERC7984Freezable, the frozen balance should be reset to the new balance if the transfer amount exceeded the available balance. If the transfer amount was within the available balance, the frozen amount behavior needs clarification from the user.
Learnt from: james-toussaint
Repo: OpenZeppelin/openzeppelin-confidential-contracts PR: 160
File: test/token/ERC7984/extensions/ERC7984Rwa.test.ts:474-479
Timestamp: 2025-09-22T09:21:34.470Z
Learning: In ERC7984Freezable force transfers, the frozen balance is reset to the new balance only when the transferred amount exceeds the available balance (balance - frozen). If the transferred amount is within the available balance, the frozen amount remains unchanged. This is implemented via FHE.select(FHE.gt(encryptedAmount, confidentialAvailable(account)), confidentialBalanceOf(account), frozen).
📚 Learning: 2025-09-22T09:21:34.470Z
Learnt from: james-toussaint
Repo: OpenZeppelin/openzeppelin-confidential-contracts PR: 160
File: test/token/ERC7984/extensions/ERC7984Rwa.test.ts:474-479
Timestamp: 2025-09-22T09:21:34.470Z
Learning: In ERC7984Freezable force transfers, the frozen balance is reset to the new balance only when the transferred amount exceeds the available balance (balance - frozen). If the transferred amount is within the available balance, the frozen amount remains unchanged. This is implemented via FHE.select(FHE.gt(encryptedAmount, confidentialAvailable(account)), confidentialBalanceOf(account), frozen).

Applied to files:

  • contracts/token/ERC7984/extensions/ERC7984Freezable.sol
  • CHANGELOG.md
📚 Learning: 2025-09-22T09:21:34.470Z
Learnt from: james-toussaint
Repo: OpenZeppelin/openzeppelin-confidential-contracts PR: 160
File: test/token/ERC7984/extensions/ERC7984Rwa.test.ts:474-479
Timestamp: 2025-09-22T09:21:34.470Z
Learning: For force transfers in ERC7984Freezable, the frozen balance should be reset to the new balance if the transfer amount exceeded the available balance. If the transfer amount was within the available balance, the frozen amount behavior needs clarification from the user.

Applied to files:

  • contracts/token/ERC7984/extensions/ERC7984Freezable.sol
  • CHANGELOG.md
📚 Learning: 2025-09-15T14:43:25.644Z
Learnt from: arr00
Repo: OpenZeppelin/openzeppelin-confidential-contracts PR: 186
File: contracts/token/ERC7984/extensions/ERC7984Omnibus.sol:140-167
Timestamp: 2025-09-15T14:43:25.644Z
Learning: In ERC7984Omnibus callback functions like confidentialTransferFromAndCallOmnibus, the encrypted sender and recipient addresses are not passed to the callback recipient - only the standard transfer parameters (omnibusFrom, omnibusTo, amount, data) are passed. The ACL grants for the encrypted addresses are for omnibus event emission and future access, not for callback usage.

Applied to files:

  • CHANGELOG.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: boostsecurity - boostsecurityio/semgrep-pro
  • GitHub Check: slither
  • GitHub Check: tests
  • GitHub Check: coverage
🔇 Additional comments (3)
contracts/token/ERC7984/extensions/ERC7984Freezable.sol (2)

12-17: Documentation update correctly shifts to internal-only freezing control.

The updated NatSpec documentation now correctly reflects that freezing is managed internally via _setConfidentialFrozen in inheriting contracts, removing references to the deprecated external freezer role.


15-17: Guarantee statement appropriately generalized.

The updated guarantee now focuses on the invariant (a specific confidential amount held by an account won't be transferable until unfrozen) rather than on external role control, which aligns with the shift to internal-only freezing.

CHANGELOG.md (1)

18-18: Changelog entry accurately reflects internal-only freezing capability.

The updated entry now correctly describes ERC7984Freezable as implementing internal functions for freeze/unfreeze, removing any reference to external freezer role control and aligning with the contract documentation changes.


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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants