feat: implement issues #187, #207, #208, #209#214
Merged
Chuks-coderr merged 2 commits intoJun 29, 2026
Conversation
…SoroStream#209 Closes SoroStream#187 Closes SoroStream#207 Closes SoroStream#208 Closes SoroStream#209 ## SoroStream#187 — Test: cancel_stream with zero withdrawals - Added test_cancel_stream_with_zero_withdrawals in test.rs - Asserts full deposit refunded to sender, recipient gets 0, stream storage entry removed, StreamCancelled event emitted with correct refund_amount and recipient_amount=0 ## SoroStream#207 — Upgradeable proxy contract - New contracts/proxy crate with ProxyContract - Stores implementation WASM hash + storage version in instance storage - upgrade(new_impl_hash, expected_version, new_version) enforces storage layout compatibility; reverts on StorageVersionMismatch - upgrade_proxy() upgrades the proxy's own WASM - migrate() forwards migrate(from, to) call to implementation contract - Admin-controlled via set_admin; emits ProxyInitialized / ProxyUpgraded / ProxyMigrated events - Includes unit tests for all upgrade paths including rollback ## SoroStream#208 — Protocol fee distribution with configurable treasury split - Treasury contract: add set_lp_pool, set_treasury_split, distribute() - distribute() splits accumulated fees between treasury wallet and LP reward pool according to treasury_bps (basis points); emits FeeDistributed - Stream contract: add fee exemption list (add_fee_exempt, remove_fee_exempt, is_fee_exempt); exempt recipients skip protocol fee deduction on withdrawal - Exemption check applied in withdraw, transfer_recipient, batch_withdraw ## SoroStream#209 — Emergency pause with guardian/governance asymmetry + auto-unpause - New pause() function: only guardian address may call; sets 72-hour auto-unpause expiry via set_pause_expiry; emits Paused(guardian, timestamp) - New unpause() function: only governance address may call; clears pause and expiry; emits Unpaused(governance, timestamp) - is_paused_or_auto_unpause() helper auto-clears paused state when expiry is reached — all entry-point guards use this instead of is_paused() - set_guardian / get_guardian / set_governance / get_governance admin ops - emergency_pause / emergency_resume (admin path) also set 72-hour expiry - errors.rs: fixed duplicate discriminant values (25/26/27/28/29/30) - types.rs: fixed duplicate use declarations - events.rs: fixed truncated stream_archived function body
|
@Lost-Z 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
Implements the following issues:
Changes
Testing
All changes verified with
cargo test.Closes #187
Closes #207
Closes #208
Closes #209