Skip to content

Feat/escrow#836

Open
nafiuishaaq wants to merge 3 commits into
DistinctCodes:mainfrom
nafiuishaaq:feat/escrow
Open

Feat/escrow#836
nafiuishaaq wants to merge 3 commits into
DistinctCodes:mainfrom
nafiuishaaq:feat/escrow

Conversation

@nafiuishaaq
Copy link
Copy Markdown
Contributor

Updated Escrow Contract

Implemented the escrow release/dispute flow in escrow.rs:

  • Added initialize(env, admin) and admin storage via DataKey::Admin
  • Added EscrowStatus::Released, Disputed, Resolved
  • Added dispute_reason to Escrow
  • Added new methods:
    • release_escrow(env, escrow_id) — buyer or admin can release active escrow
    • dispute_escrow(env, escrow_id, reason) — buyer or seller can raise a dispute
    • resolve_dispute(env, escrow_id, release_to_recipient) — admin resolves dispute
  • Updated confirm_release to transition escrow to Released
  • Added event emission for escrow_released and dispute_raised

Added Tests

Updated test.rs with coverage for:

  • buyer releasing escrow
  • dispute creation and admin resolution
  • unauthorized non-party release failing
  • confirm release path
  • cancellation path

Validation

  • Checked escrow.rs and test.rs for diagnostics: no errors found.

Made changes.

Closes #813
Closes #817

@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

@nafiuishaaq is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@nafiuishaaq Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant