Skip to content

docs: add rustdoc to DisputeManager public API#570

Merged
greatest0fallt1me merged 2 commits into
Predictify-org:masterfrom
michaelvic123:task/disputes-rustdoc
May 27, 2026
Merged

docs: add rustdoc to DisputeManager public API#570
greatest0fallt1me merged 2 commits into
Predictify-org:masterfrom
michaelvic123:task/disputes-rustdoc

Conversation

@michaelvic123
Copy link
Copy Markdown
Contributor

@michaelvic123 michaelvic123 commented May 27, 2026

Closes #552


Summary

Completes rustdoc coverage for disputes.rs. Every public item now has a /// doc block.

What changed

DisputeManager methods

  • claim_dispute_winnings: replaced inline invariant comments with a proper doc block — auth requirement, payout formula, and all error variants
  • 9 timeout methods (set_dispute_timeout, check_dispute_timeout, auto_resolve_dispute_on_timeout, determine_timeout_outcome, emit_timeout_event, get_dispute_timeout_status, extend_dispute_timeout, get_dispute_votes, validate_dispute_resolution_conditions): expanded one-liner stubs with auth requirements and typed error variants

Structs / enums

  • DisputeTimeout, DisputeTimeoutStatus, DisputeTimeoutOutcome, TimeoutStats, TimeoutAnalytics: replaced minimal one-liners with concise descriptions linking to related functions

Helper structs

  • DisputeValidator, DisputeUtils, DisputeAnalytics: replaced one-liners with short role descriptions

DisputeUtils methods

  • All one-liner stubs replaced with accurate single-sentence descriptions
  • has_user_claimed_dispute, set_user_claimed_dispute, emit_dispute_vote_event, emit_fee_distribution_event, emit_dispute_escalation_event: had no docs at all — added

Acceptance criteria

  • Every public item in disputes.rs has a /// doc block
  • Documented errors match the actual return Err(...) paths in each function
  • Auth requirements documented where require_auth() is called
  • No new logic changes — docs only

Complete the rustdoc coverage for disputes.rs:

- claim_dispute_winnings: replace inline invariant comments with a
  proper doc block listing auth requirement and all error variants
- DisputeManager timeout methods (set_dispute_timeout,
  check_dispute_timeout, auto_resolve_dispute_on_timeout,
  determine_timeout_outcome, emit_timeout_event,
  get_dispute_timeout_status, extend_dispute_timeout): expand
  one-liner stubs to include parameter intent, auth requirements,
  and typed error variants
- get_dispute_votes / validate_dispute_resolution_conditions: expand
  stubs with error documentation
- DisputeTimeout, DisputeTimeoutStatus, DisputeTimeoutOutcome,
  TimeoutStats, TimeoutAnalytics: replace minimal one-liners with
  concise descriptions linking to related functions
- DisputeValidator, DisputeUtils, DisputeAnalytics structs: replace
  one-liners with short descriptions of their role and caller context
- All DisputeUtils methods: replace one-liner stubs with accurate
  single-sentence descriptions; add missing docs to
  has_user_claimed_dispute, set_user_claimed_dispute,
  emit_dispute_vote_event, emit_fee_distribution_event,
  emit_dispute_escalation_event
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 27, 2026

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

@greatest0fallt1me greatest0fallt1me merged commit 301f6ae into Predictify-org:master May 27, 2026
1 check failed
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.

Add NatSpec-style /// rustdoc to all public functions in disputes.rs DisputeManager

2 participants