Context
contracts/stream/src/lib.rs supports top_up, extend_duration, and top_up_and_extend (lines 427-620) but nothing that adjusts rate_per_second after initialize. Compare to governor's set_max_rate, which lets the protocol-wide cap change post-deployment.
Why it matters
A sender who wants to change a running stream's payout rate (e.g. a payroll stream adjusting for a raise) currently has no path other than cancelling and recreating the stream, which resets start_time/loses continuity and requires a fresh factory deployment + fee.
Suggested approach
Add a change_rate(env: Env, caller: Address, new_rate_per_second: i128) -> Result<(), Error> guarded by require_sender_or_operator, re-validating the overflow/InvalidAmount checks initialize already performs, and emitting a new rate_changed event.
Context
contracts/stream/src/lib.rssupportstop_up,extend_duration, andtop_up_and_extend(lines 427-620) but nothing that adjustsrate_per_secondafterinitialize. Compare togovernor'sset_max_rate, which lets the protocol-wide cap change post-deployment.Why it matters
A sender who wants to change a running stream's payout rate (e.g. a payroll stream adjusting for a raise) currently has no path other than cancelling and recreating the stream, which resets
start_time/loses continuity and requires a fresh factory deployment + fee.Suggested approach
Add a
change_rate(env: Env, caller: Address, new_rate_per_second: i128) -> Result<(), Error>guarded byrequire_sender_or_operator, re-validating the overflow/InvalidAmountchecksinitializealready performs, and emitting a newrate_changedevent.