Skip to content

feat(contracts): add dispute resolution for contested cancellations (… - #934

Open
alexitsejames-cpu wants to merge 2 commits into
ritik4ever:mainfrom
alexitsejames-cpu:feat/689-contract-dispute-resolution
Open

feat(contracts): add dispute resolution for contested cancellations (…#934
alexitsejames-cpu wants to merge 2 commits into
ritik4ever:mainfrom
alexitsejames-cpu:feat/689-contract-dispute-resolution

Conversation

@alexitsejames-cpu

@alexitsejames-cpu alexitsejames-cpu commented Aug 30, 2026

Copy link
Copy Markdown

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

…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
@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

@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.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 322193af-bc04-4bc8-b32a-35d24831167a


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.

@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@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! 🚀

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

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add contract dispute resolution for contested cancellations

2 participants