feat: dispute resolution flow with payout freeze (#129)#249
Open
Jemiiah wants to merge 1 commit intoNetwalls:mainfrom
Open
feat: dispute resolution flow with payout freeze (#129)#249Jemiiah wants to merge 1 commit intoNetwalls:mainfrom
Jemiiah wants to merge 1 commit intoNetwalls:mainfrom
Conversation
…Netwalls#129) Add dispute resolution flow: resolve_dispute (creator-only) to uphold or dismiss disputes, freeze claim_winnings during DISPUTED state, and 5 new contract tests covering the full dispute lifecycle. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
resolve_disputefunction — creator-only endpoint to uphold (→ CANCELLED + refund stake) or dismiss (→ RESOLVED, stake kept) a disputeclaim_winningsnow panics with "Market has active dispute - payouts frozen" when market is in DISPUTED stateDisputeResolvedEvent— emits market_id, upheld, and timestamp on resolutionCloses #129
Test plan
test_resolve_dispute_upheld— dispute upheld → state = CANCELLED, stake refundedtest_resolve_dispute_dismissed— dispute dismissed → state = RESOLVED, stake kepttest_claim_winnings_frozen_during_dispute— claim panics during active disputetest_claim_winnings_after_dispute_dismissed— claim succeeds after dispute dismissedtest_resolve_dispute_unauthorized— non-creator cannot resolve disputes