Repository navigation
feat: implement batch recurring payments execution (#772) - #868
Merged
Merged
Conversation
- Add configurable batch size limit for recurring payment execution - Add set_recurring_payment_batch_limit and get_recurring_payment_batch_limit admin functions - Add execute_recurring_payments_batch function to process multiple subscriptions in one transaction - Add BatchRecurringPaymentResult struct for individual item results - Failures on individual items do not revert the entire batch - Default batch limit is 50, configurable up to 100 by admin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Payment Feature Enhancements
Summary
This PR implements batch execution for recurring payments, allowing keepers to process multiple due subscriptions efficiently in a single transaction. This is the first implementation of a multi-issue feature set focused on improving the payment contract's subscription management capabilities.
Technical Details
Batch Processing Flow:
execute_recurring_payment()for eachError Code Mapping:
0: Success1-9: Basic errors (Unauthorized, InvalidInput, NotFound)10-19: Subscription errors (NotFound, NotActive, PaymentNotDue, etc.)20-29: Feature errors (SpendLimitExceeded)999: Unknown errorBreaking Changes
None. This PR only adds new functions and does not modify existing behavior.
Next Steps
After this PR is merged, subsequent PRs will implement:
Closes #772
Closes #773
Closes #754
Closes #793