Description
contracts/predictify-hybrid/src/queries.rs carries an in-code "Gap Analysis (2026-04-23)" doc-comment listing getters that are missing or inconsistent versus the published API spec (for example get_oracle_resolution, get_dispute_stats, list_proposals, get_config, and the stubbed query_contract_state metrics). API_DOCUMENTATION.md does not clearly mark which of these are implemented today. This issue reconciles the two so integrators know exactly what is callable.
Requirements and context
- Source of truth in code: the Gap Analysis block at the top of
contracts/predictify-hybrid/src/queries.rs and the actual pub fn set on QueryManager (e.g. query_admin_role, query_has_permission, query_user_balance, query_market_pool, query_contract_state, the paged variants get_all_markets_paged / query_user_bets_paged).
API_DOCUMENTATION.md has a "Query Functions" section (line ~249) that must be updated to mark each listed getter as Implemented / Stubbed / Planned, matching reality.
- Where a getter exists in
disputes.rs, oracles.rs, or governance.rs but is not surfaced via QueryManager, note the actual call path so integrators are not misled.
- Cross-link the stubbed-metrics items (
query_user_balance, query_market_pool, query_contract_state) to their implementation issue.
- Non-functional: documentation must be accurate at time of writing; include the verification method (grep against source) so it can be re-checked.
Acceptance criteria
Suggested execution
1. Fork the repo and create a branch — git checkout -b feature/query-api-reconciliation.
2. Implement changes — update API_DOCUMENTATION.md and the Gap Analysis doc-comment in contracts/predictify-hybrid/src/queries.rs.
3. Write/extend tests — documentation only; verify each name with grep -n "pub fn <name>" contracts/predictify-hybrid/src.
4. Test and commit
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test -p predictify-hybrid
Example commit message
docs: reconcile query API documentation with QueryManager gap analysis
Guidelines
Documentation must cover every getter named in the Gap Analysis with a verifiable status. Keep doc-comments and API_DOCUMENTATION.md (Query Functions) in sync. Timeframe: 96 hours.
Description
contracts/predictify-hybrid/src/queries.rscarries an in-code "Gap Analysis (2026-04-23)" doc-comment listing getters that are missing or inconsistent versus the published API spec (for exampleget_oracle_resolution,get_dispute_stats,list_proposals,get_config, and the stubbedquery_contract_statemetrics).API_DOCUMENTATION.mddoes not clearly mark which of these are implemented today. This issue reconciles the two so integrators know exactly what is callable.Requirements and context
contracts/predictify-hybrid/src/queries.rsand the actualpub fnset onQueryManager(e.g.query_admin_role,query_has_permission,query_user_balance,query_market_pool,query_contract_state, the paged variantsget_all_markets_paged/query_user_bets_paged).API_DOCUMENTATION.mdhas a "Query Functions" section (line ~249) that must be updated to mark each listed getter as Implemented / Stubbed / Planned, matching reality.disputes.rs,oracles.rs, orgovernance.rsbut is not surfaced viaQueryManager, note the actual call path so integrators are not misled.query_user_balance,query_market_pool,query_contract_state) to their implementation issue.Acceptance criteria
API_DOCUMENTATION.md"Query Functions" marks each getter from the Gap Analysis as Implemented, Stubbed, or Planned.QueryManagerare documented with their real call path.queries.rsGap Analysis doc-comment is updated to match the reconciled documentation (or dated/superseded).Suggested execution
1. Fork the repo and create a branch —
git checkout -b feature/query-api-reconciliation.2. Implement changes — update
API_DOCUMENTATION.mdand the Gap Analysis doc-comment incontracts/predictify-hybrid/src/queries.rs.3. Write/extend tests — documentation only; verify each name with
grep -n "pub fn <name>" contracts/predictify-hybrid/src.4. Test and commit
cargo fmt --all -- --check cargo clippy --all-targets --all-features -- -D warnings cargo test -p predictify-hybridExample commit message
Guidelines
Documentation must cover every getter named in the Gap Analysis with a verifiable status. Keep doc-comments and
API_DOCUMENTATION.md(Query Functions) in sync. Timeframe: 96 hours.