feat: Implement streaming enhancements for issues #481-#484 - #533
Merged
Chuks-coderr merged 5 commits intoAug 30, 2026
Merged
Conversation
…SoroStream#481 & SoroStream#484 Add ramp_duration and pause_ledger fields to Stream struct: - ramp_duration: Supports gradual rate increase from zero to target over specified ledgers - pause_ledger: Records ledger number when stream is paused for accurate accrual calculations These fields enable: 1. Ramp-up mode implementation (issue SoroStream#481) 2. Correct accrual calculation across pause/resume (issue SoroStream#484) Closes SoroStream#481 Closes SoroStream#484
Add read-only get_accrued_balance function to contract interface. This enables: - Real-time withdrawable balance computation at current ledger without state mutation - Front-end display of current balance without simulating transactions - Query-only operation suitable for indexers and analytics Closes SoroStream#482
…unction Implement infrastructure for all 4 streaming enhancements: 1. Initialize ramp_duration and pause_ledger in all stream creation functions 2. Implement get_accrued_balance read-only function for real-time balance queries 3. Support for ramp-up mode and pause/resume accrual tracking Changes include: - Updated all 6 stream creation paths to initialize new fields - Implemented get_accrued_balance with support for all stream types: * Milestone-gated streams * Step-vesting/tranche streams * Curve-based vesting (Linear and TimeDecay) * Standard continuous-rate streams Closes SoroStream#481 Closes SoroStream#482 Closes SoroStream#484
…roStream#481-SoroStream#484 Implement comprehensive test coverage for all 4 streaming features: Issue SoroStream#481 - Ramp-up Mode: - test_ramp_up_mode_zero_duration: Verify no ramp-up when duration=0 - test_ramp_up_mode_linear_increase: Test linear rate progression - test_ramp_up_with_cliff: Verify interaction with cliff time Issue SoroStream#482 - getAccruedBalance View Function: - test_get_accrued_balance_basic: Basic accrual computation - test_get_accrued_balance_after_cliff: Cliff time handling - test_get_accrued_balance_readonly: Verify read-only semantics Issue SoroStream#483 - topUp Extends end_time: - test_top_up_extends_end_time: Verify end_time extension - test_top_up_extends_deposit_and_end_time: Combined deposit/duration update - test_top_up_multiple_times: Progressive extension with multiple topUps Issue SoroStream#484 - pauseStream Records pause_ledger: - test_pause_stream_records_ledger: Verify ledger recording - test_pause_resume_calculates_correct_accrual: Accrual accounting across pause - test_pause_resume_clear_pause_ledger: Pause ledger lifecycle - test_pause_resume_multiple_times: Multiple pause/resume cycles Closes SoroStream#481 Closes SoroStream#482 Closes SoroStream#483 Closes SoroStream#484
|
@owennashdev-ctrl 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
Comprehensive implementation of 4 streaming feature enhancements:
Changes
Infrastructure
ramp_durationfield to Stream struct (supports gradual rate increase)pause_ledgerfield to Stream struct (tracks pause timing for accrual)Implementation
get_accrued_balanceread-only function supporting:Testing
Commits
Closes #481
Closes #482
Closes #483
Closes #484