Background
Game-facing prize pool views need richer visibility into who has contributed to the pool and whether the next draw is adequately funded before triggering round transitions.
Feature Focus
Add contributor breakdown and next-draw funding snapshot accessors to the jackpot pool contract.
Where to Implement (Exact Targets)
contracts/jackpot-pool/src/lib.rs
contracts/jackpot-pool/src/storage.rs
contracts/jackpot-pool/src/types.rs
contracts/jackpot-pool/src/test.rs
What to Implement
- Add a read method that summarizes total contributions, contributor count, and top contributor share metrics.
- Add a funding snapshot accessor for next draw minimum target, current funded amount, and shortfall.
- Ensure snapshot outputs remain stable across rounds and after payout resets.
- Keep accessors efficient enough for repeated UI refreshes.
Interface / Endpoint / Method Details
- Use structured response objects for contributor summary and funding status.
- Reuse existing accounting state to avoid introducing redundant counters unless needed.
- Define zero-state behavior when the pool has not been seeded.
Acceptance Criteria
- Frontend can render funding progress and contributor health from public contract reads.
- Round resets do not corrupt historical or current snapshot data.
- Empty and seeded pool states are both supported.
Required Tests
- Unit tests for empty pool, partially funded pool, funded pool, and post-payout reset states.
- Assertions for contributor count and funding shortfall calculations.
Definition of Done
- New accessors are implemented and covered by tests.
- Public docs include the added jackpot pool read methods.
Background
Game-facing prize pool views need richer visibility into who has contributed to the pool and whether the next draw is adequately funded before triggering round transitions.
Feature Focus
Add contributor breakdown and next-draw funding snapshot accessors to the jackpot pool contract.
Where to Implement (Exact Targets)
contracts/jackpot-pool/src/lib.rscontracts/jackpot-pool/src/storage.rscontracts/jackpot-pool/src/types.rscontracts/jackpot-pool/src/test.rsWhat to Implement
Interface / Endpoint / Method Details
Acceptance Criteria
Required Tests
Definition of Done