Skip to content

feat: implement state snapshot and reporting APIs for analytics and UI #333

@greatest0fallt1me

Description

@greatest0fallt1me

Description:

Provide read-only APIs that return a snapshot of key state (e.g., all active event IDs, total pool per event, total fees) for analytics and dashboards.

Requirements and Context:

  • Must be secure, tested, and documented
  • Should add functions such as get_active_events(), get_platform_stats(), get_event_snapshot(id)
  • Should be gas-efficient (bounded result size, pagination if needed)
  • Should not expose private user data beyond what is already queryable
  • Should document response shape and pagination
  • Must not change state

Suggested Execution:

  1. Fork the repo and create a branch

    git checkout -b feature/state-snapshot-reporting
  2. Implement changes

    • Write contract: src/lib.rs (add snapshot/reporting functions)
    • Update queries or add reporting module; add documentation and NatSpec-style comments
  3. Test and commit

    • Run tests; cover snapshot correctness, pagination, gas
    • Include test output

Example Commit Message:

feat: implement state snapshot and reporting APIs for analytics and UI

Guidelines:

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 72 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions