-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
Description
Description
Implement batch operations for common actions like issuing multiple tokens, logging multiple attendance records, or managing multiple user roles to improve gas efficiency and user experience.
Files to Modify
contracts/manage_hub/src/lib.rs- Add batch operation endpointscontracts/manage_hub/src/membership_token.rs- Add batch token operationscontracts/manage_hub/src/attendance_log.rs- Add batch attendance loggingcontracts/access_control/src/lib.rs- Add batch role managementcontracts/access_control/src/access_control.rs- Implement batch role logiccontracts/common_types/src/types.rs- Add batch operation data structures
Key Changes Required
- Batch Data Structures - Create batch request structures in
common_types/src/types.rsfor different operation types - Batch Token Operations - Add batch functions to
membership_token.rswith proper validation and size limits - Batch Attendance Logging - Implement batch attendance operations in
attendance_log.rswith optimized storage patterns - Batch Role Management - Add batch role operations to
access_control.rswith proper authorization checks - Gas Optimization - Implement batch size limits and gas estimation functions to prevent transaction failures
- Partial Success Handling - Design the batch operations to handle scenarios where some operations succeed and others fail
- Batch Events - Emit appropriate events for batch operations including success/failure counts
Acceptance Criteria
- Add batch_issue_tokens function with max 50 tokens per batch
- Add batch_log_attendance function with max 100 entries per batch
- Add batch_set_roles function with max 25 roles per batch
- Implement proper validation for batch operations
- Add gas estimation functions for batch operations
- Include comprehensive batch operation tests
- Add partial success handling (some operations succeed, others fail)
- Implement batch operation events and logging
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program