Skip to content

Remove backwards compatibility from Batcher#321

Merged
arr00 merged 2 commits intomasterfrom
chore/batcher-remove-backwards-comp
Mar 10, 2026
Merged

Remove backwards compatibility from Batcher#321
arr00 merged 2 commits intomasterfrom
chore/batcher-remove-backwards-comp

Conversation

@arr00
Copy link
Copy Markdown
Member

@arr00 arr00 commented Mar 6, 2026

Summary by CodeRabbit

  • Refactor

    • Streamlined batch dispatch logic by optimizing internal implementation.
  • Documentation

    • Added clarification regarding compatibility considerations with ERC7984ERC20Wrapper versions during batch operations.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 6, 2026

Deploy Preview for confidential-tokens ready!

Name Link
🔨 Latest commit b9778dc
🔍 Latest deploy log https://app.netlify.com/projects/confidential-tokens/deploys/69af077e75eb83000854051d
😎 Deploy Preview https://deploy-preview-321--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
Copy Markdown
Contributor

coderabbitai bot commented Mar 6, 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: 2dd6e1ff-9aa9-4044-90d7-857734158ad3

📥 Commits

Reviewing files that changed from the base of the PR and between d7ecc2c and b9778dc.

📒 Files selected for processing (1)
  • contracts/finance/BatcherConfidential.sol

Walkthrough

The BatcherConfidential contract is refactored to inline the _calculateUnwrapAmount helper function directly into the dispatchBatch method. Explanatory comments are added regarding ERC7984ERC20Wrapper compatibility and potential dispatch failures.

Changes

Cohort / File(s) Summary
Function Inlining & Documentation
contracts/finance/BatcherConfidential.sol
Removes internal _calculateUnwrapAmount(euint64) helper function and inlines its logic into dispatchBatch. Adds clarifying comments about ERC7984ERC20Wrapper compatibility concerns.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 One helper function, now set free,
Its logic flows where it should be,
Inlined with care in dispatch's call,
Cleaner code, and notes for all,
Comments bright—now nothing's small! ✨

🚥 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 'Remove backwards compatibility from Batcher' is concise and directly reflects the main change—removing the _calculateUnwrapAmount internal function and consolidating unwrap logic inline in dispatchBatch, eliminating legacy compatibility patterns.
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
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/batcher-remove-backwards-comp

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

@arr00 arr00 marked this pull request as ready for review March 9, 2026 17:48
@arr00 arr00 requested a review from a team as a code owner March 9, 2026 17:48
@arr00 arr00 requested a review from james-toussaint March 9, 2026 20:23
@arr00 arr00 merged commit 60c00db into master Mar 10, 2026
16 checks passed
@arr00 arr00 deleted the chore/batcher-remove-backwards-comp branch March 10, 2026 14:05
arr00 added a commit that referenced this pull request Mar 11, 2026
* Remove backwards compatibility from Batcher

* Apply suggestion from @arr00
arr00 added a commit that referenced this pull request Apr 1, 2026
* Start release candidate

* Fix local docs generation (#320)

* remove properties symlink

* add properties.js

* lint fix

* Remove backwards compatibility from Batcher (#321)

* Remove backwards compatibility from Batcher

* Apply suggestion from @arr00

* Validate `fromToken` and `toToken` on construction (#322)

* Validate `fromToken` on construction

* use `ERC165Checker`

* check toToken as well

* directly validate to and from token

* Add additional functions to `IERC7984ERC20Wrapper` (#323)

* remove incorrect docs on `unwrap` function

* add finalize unwrap and rate to wrapper interface

* update batcher to use unwrap request ids instead of unwrap amounts

* add `unwrapAmount` to wrapper interface for unwrap request introspection

* additional docs

* call getter for `unwrapAmount` in `finalizeUnwrap`

* update events and errors appropriately

* remove `ERC7984ERC20Wrapper` import

* fix import order

* Move events to interface from `ERC7984ERC20Wrapper`

* add note on request id for `unwrap`

* change mapping to be of `bytes32` identifiers

* add changeset

* Allow claiming on behalf of another account in batcher (#324)

* Allow claiming on behalf of another account in batcher

* revert on claim if users not part of the batch

* add error on quit too

* Add additional warnings to the batcher (#325)

* Return a bytes32 unwrap id from the `_unwrap` function in `BatcherConfidential` (#326)

* Return a bytes32 unwrap id from the `_unwrap` function in `BatcherConfidential`

* modify warning

* Document possible rounding down of user deposits (#327)

* Document possible rounding down of user deposits

* add contract level comment as well

* up

* Release v0.4.0 (rc) (#318)

* Release v0.4.0 (rc)

* update changelog

* update changelog

* Apply suggestion from @james-toussaint

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>
Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

* Update node version to 24.x in CI (#328)

* Exit release candidate

* Release v0.4.0 (#335)

* Release v0.4.0

* update changelog

* remove changelog duplicate

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>
Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>
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