-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
Description
Overview
Add functions to query platform-wide statistics including total quests, total rewards distributed, active users, etc.
Background
Analytics provide insights into platform growth and help with business intelligence.
Specifications
Modules to Create:
- Platform statistics struct
- Counter tracking
- Aggregation functions
Tasks:
- Track total quests created
- Count total submissions
- Calculate total rewards distributed
- Track active user count
- Implement get_platform_stats() function
- Add per-creator statistics
- Write comprehensive stats tests
Impacted Files:
- contracts/earn-quest/src/stats.rs (new)
- contracts/earn-quest/src/types.rs (update)
- contracts/earn-quest/src/lib.rs (update)
- contracts/earn-quest/src/storage.rs (update)
- contracts/earn-quest/tests/test_stats.rs (new)
Labels: contract, analytics, statistics, priority-low
Acceptance Criteria
- Platform-wide stats accurately tracked
- Statistics updated on relevant actions
- Query functions return correct data
- Per-creator stats available
- Counters increment atomically
- All stat calculations tested
🙌Contribution Guidelines:
Assignment required before PR submission
Timeframe: 24-48 hours
PR description must include: Close #[issue-number]
Star the repo⭐
For more context, please refer to the contract README 🚀
Reactions are currently unavailable