-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Labels
ETA - less than 12 hrsenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededsmart-contract
Description
Description:
Allow users to place multiple bets (different events or outcomes) in a single transaction to save gas and improve UX.
Requirements and Context:
- Must be secure, tested, and documented
- Should add
place_bets(bets: Vec<(event_id, outcome, amount)>)(or equivalent) - Should validate each bet and either apply all or none (atomic)
- Should emit events per bet or batch event
- Must enforce same rules as single
place_bet(limits, deadline, balance) - Should be gas-efficient (avoid redundant storage reads where possible)
Suggested Execution:
-
Fork the repo and create a branch
git checkout -b feature/batch-bet-placement
-
Implement changes
- Write contract:
src/lib.rs(addplace_bets) - Update validation and storage
- Add documentation and NatSpec-style comments
- Write contract:
-
Test and commit
- Run tests; cover full success, partial failure (atomic revert), limits
- Include test output and security notes
Example Commit Message:
feat: implement batch bet placement in a single transaction
Guidelines:
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 72 hours
Metadata
Metadata
Assignees
Labels
ETA - less than 12 hrsenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededsmart-contract