Feature/transfer ownership entrypoint v2#539
Merged
1nonlypiece merged 12 commits intoMay 28, 2026
Merged
Conversation
- Created new dependency files for the zeroize crate version 1.8.2, including references to its source files. - Added new dependency files for the zmij crate version 1.0.21, with references to its source files and additional library files.
|
@Meet-hybrid is attempting to deploy a commit to the 1nonly's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title
feat(contracts): add transfer_ownership entrypoint for marketplace trading
Summary
This PR implements a secure transfer_ownership entrypoint in the escrow contract to enable secondary trading of marketplace commitments. It ensures only the current owner can authorize transfers, restricts transfers to funded commitments, and maintains accurate owner indexes for both old and new owners.
What Changed
Added transfer_ownership(commitment_id, new_owner) function in contracts/escrow/src/lib.rs.
Enforced authorization via require_auth() for the current owner.
Restricted transfers to Funded commitments only.
Updated Commitment.owner and maintained OwnerIndex for both addresses.
Added tests in contracts/escrow/src/test.rs covering:
Successful transfers
Unauthorized attempts
Index updates
Non‑Funded commitment edge cases
Documented transfer flow, authorization rules, and Funded‑only restriction in contracts/README.md.
Linked Issue
Closes #470
Type of Change
[x] feat
[x] docs
[ ] fix
[ ] refactor
[x] test
[ ] chore
Validation
[x] Tests passed with ≥95% coverage.
[x] Manual verification of index updates and authorization checks completed.
Documentation
[x] Transfer flow documented in README.md.
Checklist
[x] Branch name uses feat/
[x] Commit messages follow Conventional Commits
[x] PR scope matches issue acceptance criteria