Skip to content

docs: rustdoc on resolution public entrypoints (closes #871) - #1050

Merged
greatest0fallt1me merged 2 commits into
Predictify-org:masterfrom
David-Adegboyega:task/resolution-rustdoc
Jul 27, 2026
Merged

docs: rustdoc on resolution public entrypoints (closes #871)#1050
greatest0fallt1me merged 2 commits into
Predictify-org:masterfrom
David-Adegboyega:task/resolution-rustdoc

Conversation

@David-Adegboyega

@David-Adegboyega David-Adegboyega commented Jul 27, 2026

Copy link
Copy Markdown

Closes #871

Summary

Add ///-style rustdoc documentation to all public functions in the resolution module.

Changes

Documented 40+ public functions across 10 structs in contracts/predictify-hybrid/src/resolution.rs:

  • OracleResolutionManager (8 functions): try_fetch_from_config, fetch_oracle_result, get_oracle_resolution, validate_oracle_resolution, calculate_oracle_confidence, set_median_config, get_median_config, resolve_with_median
  • ResolutionOutcomeCache (5 functions): invalidate, compute_winning_total_for_market, refresh, get, require
  • MarketResolutionManager (13 functions): resolve_market, finalize_market, get_market_resolution, validate_market_resolution, confidence_to_weight, simple_median, collect_included_sorted, weighted_median, average_included_price, price_variance, aggregate_confidence, set_median_config, get_median_config
  • OracleResolutionValidator (2 functions): validate_market_for_oracle_resolution, validate_oracle_resolution
  • MarketResolutionValidator (4 functions): validate_market_for_resolution, validate_admin_permissions, validate_outcome, validate_market_resolution
  • OracleResolutionAnalytics (2 functions): calculate_confidence_score, get_oracle_stats
  • MarketResolutionAnalytics (4 functions): determine_resolution_method, calculate_confidence_score, calculate_resolution_analytics, update_resolution_analytics
  • ResolutionUtils (5 functions): get_resolution_state, can_resolve_market, get_resolution_eligibility, calculate_resolution_time, validate_resolution_parameters
  • ResolutionTesting (4 functions): create_test_oracle_resolution, create_test_market_resolution, validate_resolution_structure, simulate_resolution_process
  • OracleCallbackResolver (1 function): process_authenticated_callback

Each function includes:

  • Description of purpose and behavior
  • Arguments with types and descriptions
  • Return values with types and descriptions
  • Error conditions
  • Cross-references to related functions/types where appropriate
  • Notes for placeholder implementations

Testing

  • Code compiles successfully: cargo check -p predictify-hybrid passes for resolution.rs
  • No new warnings in resolution.rs

Closes

Closes #871

…#871)

Add ///-style rustdoc documentation to all public functions in the resolution module:

- OracleResolutionManager: try_fetch_from_config, fetch_oracle_result, get_oracle_resolution, validate_oracle_resolution, calculate_oracle_confidence, set_median_config, get_median_config, resolve_with_median
- ResolutionOutcomeCache: invalidate, compute_winning_total_for_market, refresh, get, require
- MarketResolutionManager: resolve_market, finalize_market, get_market_resolution, validate_market_resolution, confidence_to_weight, simple_median, collect_included_sorted, weighted_median, average_included_price, price_variance, aggregate_confidence, set_median_config, get_median_config
- OracleResolutionValidator: validate_market_for_oracle_resolution, validate_oracle_resolution
- MarketResolutionValidator: validate_market_for_resolution, validate_admin_permissions, validate_outcome, validate_market_resolution
- OracleResolutionAnalytics: calculate_confidence_score, get_oracle_stats
- MarketResolutionAnalytics: determine_resolution_method, calculate_confidence_score, calculate_resolution_analytics, update_resolution_analytics
- ResolutionUtils: get_resolution_state, can_resolve_market, get_resolution_eligibility, calculate_resolution_time, validate_resolution_parameters
- ResolutionTesting: create_test_oracle_resolution, create_test_market_resolution, validate_resolution_structure, simulate_resolution_process
- OracleCallbackResolver: process_authenticated_callback

Each function now includes:
- Description of purpose and behavior
- Arguments with types and descriptions
- Return values with types and descriptions
- Error conditions
- Cross-references to related functions/types where appropriate
- Examples where relevant
@greatest0fallt1me
greatest0fallt1me merged commit c0c37cc into Predictify-org:master Jul 27, 2026
0 of 2 checks passed
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 rustdoc on resolution public entrypoints (buffer #15)

2 participants