Skip to content

Return amount actually unwrapped in wrapper contract#288

Merged
arr00 merged 4 commits intomasterfrom
feat/return-burnt-amount-wrapper
Jan 15, 2026
Merged

Return amount actually unwrapped in wrapper contract#288
arr00 merged 4 commits intomasterfrom
feat/return-burnt-amount-wrapper

Conversation

@arr00
Copy link
Copy Markdown
Member

@arr00 arr00 commented Jan 8, 2026

For contracts intergrating with the wrapper, it would make it much easier to track unwrap requests if the amount unwrapped (burntAmount) was returned on calls to unwrap.

Summary by CodeRabbit

  • New Features
    • Unwrap operations now return the amount of tokens unwrapped, providing users with direct confirmation of transaction results. This enhances transparency and eliminates the need for additional queries to verify the exact quantity of tokens removed.

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

@arr00 arr00 requested a review from a team as a code owner January 8, 2026 22:24
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 8, 2026

Deploy Preview for confidential-tokens ready!

Name Link
🔨 Latest commit ac2f8b2
🔍 Latest deploy log https://app.netlify.com/projects/confidential-tokens/deploys/6967b183474fde0008331bff
😎 Deploy Preview https://deploy-preview-288--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 Jan 8, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This PR modifies the unwrap() methods in ERC7984ERC20Wrapper to return the burnt amount as euint64. Both public unwrap overloads and the internal _unwrap() method signature are updated to return euint64, allowing callers to receive the burntAmount value.

Changes

Cohort / File(s) Summary
Unwrap Return Value Addition
contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol
Updates both public unwrap() method overloads to return euint64; internal _unwrap() now returns euint64; return statements added to propagate burntAmount through unwrap flow

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • Amxx
  • james-toussaint

Poem

🐰 The unwrap now returns with pride,
Where burntAmount cannot hide,
Through method calls it flows so bright,
Encrypted tokens set alight!

🚥 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 accurately summarizes the main change: the unwrap functions now return the amount actually unwrapped, which aligns with the modifications to method signatures and implementation.
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 feat/return-burnt-amount-wrapper

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

@arr00 arr00 requested a review from james-toussaint January 9, 2026 15:47
Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>
@arr00 arr00 merged commit 62b5e75 into master Jan 15, 2026
16 checks passed
@arr00 arr00 deleted the feat/return-burnt-amount-wrapper branch January 15, 2026 02:22
@github-actions github-actions bot mentioned this pull request Mar 5, 2026
@github-actions github-actions bot mentioned this pull request Mar 20, 2026
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.

2 participants