feat(contracts): add dispute resolution for contested cancellations (… - #934
feat(contracts): add dispute resolution for contested cancellations (…#934alexitsejames-cpu wants to merge 2 commits into
Conversation
…itik4ever#689) - Add contracts/src/disputes.rs with Dispute struct, DisputeKey storage, file_dispute and resolve_dispute entry points, get_dispute query - Recipient can dispute a cancellation within a 7-day window - Funds stay locked in escrow pending admin arbitration - Admin can release to recipient, return to sender, or split - Emit DisputeFiled and DisputeResolved events - Add DisputeWindowExpired and DisputeAlreadyFiled error variants to errors.rs - Wire pub mod disputes into lib.rs with three contractimpl entry points
|
@alexatsejames-alt is attempting to deploy a commit to the ritik4ever's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 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. Comment |
|
@alexitsejames-cpu 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! 🚀 |
feat(contracts): dispute resolution for contested cancellations (#689)
Adds
disputes.rs
so recipients can contest a sender cancellation.
What changed
file_dispute — recipient calls within 7 days of cancellation; funds stay locked in escrow
resolve_dispute — admin-only; releases funds to recipient, sender, or a split
get_dispute — read-only query
DisputeFiled / DisputeResolved events emitted on each action
Two new error variants: DisputeWindowExpired, DisputeAlreadyFiled
Wired into lib.rs as three contractimpl entry points
Acceptance criteria met
7-day window enforced; returns DisputeWindowExpired if missed
Funds remain locked until admin resolves
resolve_dispute checks DataKey::Admin; returns Unauthorized otherwise
fixes #689