Skip to content

feat: enhance ObligationEscrow with lastBeneficiary and lastHolder tracking - #74

Merged
rongquan1 merged 4 commits into
beta-boefrom
feature/endorsement-chain-fix
Aug 13, 2026
Merged

feat: enhance ObligationEscrow with lastBeneficiary and lastHolder tracking#74
rongquan1 merged 4 commits into
beta-boefrom
feature/endorsement-chain-fix

Conversation

@manishdex25

@manishdex25 manishdex25 commented Aug 13, 2026

Copy link
Copy Markdown

Summary

What is the background of this pull request?

Changes

  • What are the changes made in this pull request?
  • Change this and that, etc...

Issues

What are the related issues or stories?

Releases

Channels: latest
ETA: Any target release date

Summary by CodeRabbit

  • New Features
    • Escrow records now preserve the last beneficiary and holder after deactivation or shredding.
    • The Shred event includes the preserved beneficiary and holder addresses.
    • Added read-only access to retrieve these addresses after an escrow ends.
  • Bug Fixes
    • Improved lifecycle tracking for rejected, discharged, and returned-to-issuer escrows.

- Introduced mintBlock and shredBlock variables to track the block numbers for minting and shredding actions.
- Updated the IObligationEscrow interface to include new functions for retrieving these block numbers.
- Enhanced tests to verify the correct functionality of mintBlock and shredBlock during contract operations.
…acking

- Added lastBeneficiary and lastHolder state variables to store the addresses before deactivation.
- Updated the Shred event to include lastBeneficiary and lastHolder for better tracking.
- Modified the _deactivate function to set lastBeneficiary and lastHolder upon contract deactivation.
- Updated IObligationEscrow interface to expose new lastBeneficiary and lastHolder functions.
- Enhanced tests to verify the correct functionality of lastBeneficiary and lastHolder during contract operations.
@manishdex25 manishdex25 self-assigned this Aug 13, 2026
@manishdex25
manishdex25 requested a review from rongquan1 August 13, 2026 05:28
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 329434d0-d992-4c60-aa12-ecf8ad1265f5

📥 Commits

Reviewing files that changed from the base of the PR and between 154d5e7 and 51f3e8c.

📒 Files selected for processing (4)
  • contracts/ObligationEscrow.sol
  • contracts/interfaces/IObligationEscrow.sol
  • src/constants/contract-interfaces.ts
  • test/ObligationEscrow.test.ts

📝 Walkthrough

Walkthrough

The escrow contract now preserves the beneficiary and holder during deactivation. The Shred event and interface expose these addresses. Client bindings and lifecycle tests cover initialization, rejection, discharge, and return-to-issuer flows.

Changes

Escrow ownership history

Layer / File(s) Summary
Contract state and Shred contract
contracts/ObligationEscrow.sol, contracts/interfaces/IObligationEscrow.sol
The contract stores the last beneficiary and holder before clearing active ownership. The Shred event and view interface expose these addresses.
Bindings and lifecycle validation
src/constants/contract-interfaces.ts, test/ObligationEscrow.test.ts
Client bindings include the new view methods. Tests verify zero-value initialization, retained ownership, and updated Shred event arguments across terminal flows.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 51f3e

This localized tracking change has no actionable merge-blocking risk remaining beyond normal checks and review.

Possibly related PRs

Suggested reviewers: rongquan1

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes all required headings but retains template placeholder text and does not provide actual background, changes, issues, or release details. Replace the placeholder text with the PR background, specific changes, related issues or stories, and the target release ETA.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: tracking the last beneficiary and holder in ObligationEscrow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/endorsement-chain-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

…ub.com:TradeTrust/token-registry into feature/endorsement-chain-fix
@manishdex25 manishdex25 changed the title Feature/endorsement chain fix feat: enhance ObligationEscrow with lastBeneficiary and lastHolder tracking Aug 13, 2026
@rongquan1
rongquan1 merged commit 2dab3f9 into beta-boe Aug 13, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 5.6.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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