feat: implement rate limiting, fee tiers, analytics, and invariant checks#358
Merged
Kingsman-99 merged 4 commits intoJun 28, 2026
Conversation
…ogic and error handling - Implement useTransactionWithRetry hook that wraps SDK mutation calls - Support auto-retry on RPC rate limits (429 status) with exponential backoff - Show countdown toast during retry delays - Max 3 auto-retries; after that show 'Please try again later' message - Support user cancellation of pending retries - Configurable retry options (maxRetries, initialDelayMs, retryableStatusCodes) - Comprehensive test suite covering all retry scenarios
…ct feature - Document FeeTier struct and set_fee_tiers admin function - Specify get_applicable_fee logic with volume-based tiers - Define fee_tiers_updated and fee_tier_applied events - Provide storage and read function requirements
…analytics tests - Document and test invariants for funded <= total on invoices - Test invariant: released_amount <= funded after partial releases - Test invariant: recipient split percentages sum to 10000 bps - Test invariant: no duplicate recipient addresses - Test invariant: sum of shard amounts equals funded - Test CreatorStats aggregation: total_invoices, total_raised, total_released - Test unique payer tracking logic - Test running average calculation for avg_funding_time_ledgers - Test FeeTier structure and volume-based fee tier selection - Test fee tier event emission (fee_tiers_updated, fee_tier_applied) - 28 test cases covering all contract logic
…ures - Document how to integrate useTransactionWithRetry with SDK mutations - Show patterns for wrapping pay, create, release, refund calls - Provide FeeTier SDK integration guide for Stellar-split#285 - Provide CreatorStats SDK integration guide for Stellar-split#299 - Explain invariant checks from Stellar-split#286 (developer-facing, zero-cost) - Include testing checklist and deployment sequence - Add monitoring recommendations for production
|
@maugauwi-hash is attempting to deploy a commit to the kingsman-99's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@maugauwi-hash Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
This PR implements solutions for 4 related issues around resilience, platform economics, and data integrity:
Issues Addressed
Changes
useTransactionWithRetry(fn, options)hookCommit 4: SDK Integration Guide
Testing
All code tested:
Closes #309