-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
Description:
Allow a user to claim winnings for multiple resolved events in a single transaction to save gas and improve UX.
Requirements and Context:
- Must be secure, tested, and documented
- Should add
claim_winnings_batch(user, event_ids: Vec<Symbol>)(or equivalent) - Should validate each event is resolved and user is winner; claim all or none (atomic)
- Should emit events per claim or batch
- Must enforce same rules as single claim_winnings (no double claim)
- Should be gas-efficient
Suggested Execution:
-
Fork the repo and create a branch
git checkout -b feature/batch-claim-winnings
-
Implement changes
- Write contract:
src/lib.rs(addclaim_winnings_batch) - Update storage and events; add documentation and NatSpec-style comments
- Write contract:
-
Test and commit
- Run tests; cover full success, partial failure (atomic revert), double claim
- Include test output and security notes
Example Commit Message:
feat: implement batch claim winnings for multiple events in one transaction
Guidelines:
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 48 hours
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels