-
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
Add functionality to renew membership tokens before they expire, including automatic renewal options and grace periods for expired tokens.
Files to Modify
contracts/manage_hub/src/membership_token.rs- Add renewal functionscontracts/manage_hub/src/lib.rs- Add renewal endpointscontracts/manage_hub/src/types.rs- Add renewal data structurescontracts/manage_hub/src/errors.rs- Add renewal-specific errorscontracts/common_types/src/types.rs- Add renewal status enum
Key Changes Required
- Renewal Data Structures - Add renewal tracking structures to
types.rsandcommon_types/src/types.rs - Token Renewal Logic - Implement renewal functions in
membership_token.rswith grace period handling - Renewal Configuration - Add configurable renewal settings (grace periods, fees, limits) with admin management
- Payment Integration - Integrate renewal fees with the existing payment system in the subscription module
- Renewal History - Track all renewal attempts and history for each token with proper storage management
- Auto-Renewal System - Implement automatic renewal checking and processing capabilities
- Renewal Validation - Add comprehensive validation for renewal eligibility and limits
Acceptance Criteria
- Add renew_token function to membership contract
- Implement grace period for expired tokens (configurable, default 7 days)
- Add automatic renewal configuration and checking
- Include payment validation for renewals with configurable fees
- Add renewal history tracking with renewal count limits
- Update tests for renewal scenarios including edge cases
- Add renewal eligibility checking functions
- Implement renewal notification events
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program