Feat/four tasks - #548
Merged
Merged
Conversation
- Add RecipientShare struct with locked flag to types.rs - Add RecipientNotFound error variant (discriminant 36) - Add lock_recipient_share/unlock_recipient_share admin-only methods - Accumulate locked-recipient shares in UnreleasedFunds storage key - Add release_locked_funds for unlocking accumulated shares - Emit RecipientShareLocked/RecipientShareUnlocked events - Add withdraw_contribution for Pending-status invoices - Record per-payer contributions in _pay for withdrawal support - Emit ContributionWithdrawn event - Fix corrupted recipient_address_rotated event body
- Build WASM in release mode and verify size ≤ 64 KB threshold - Fails CI if deployed binary exceeds defined byte limit
- Add [profile.release] with opt-level='z', lto=true, codegen-units=1 - Enable panic='abort' and strip='symbols' for minimal binary size - Reduces deployment cost and speeds contract loading on validators
- Add create_env() returning Env with mock auth enabled - Add create_token() for Stellar asset contract setup - Add create_invoice_defaults() and create_invoice_custom() helpers - Add fund_invoice() and deploy_contract() utilities - Reduces boilerplate duplication across integration test files
… in withdraw - Fix locked-recipient accumulation to use computed proportional share instead of raw amount (moved lock check after proportional computation) - Fix withdraw_contribution to accept payer Address parameter instead of incorrectly using env.current_contract_address()
|
@Sundayabel222 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! 🚀 |
6 tasks
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.
Closes #498
Closes #499
Closes #500
Closes #501
The test suite lacks a consistent mock environment setup, leading to boilerplate duplication across test files. A shared test harness using soroban_sdk::testutils should provide a standard environment, token client, and invoice factory that all integration tests reuse.
Technical Context
Create tests/helpers.rs (or tests/common/mod.rs) with functions create_env() -> Env, create_token(env, admin) -> Address, and create_invoice_defaults(env, contract) -> u64. Use soroban_sdk::testutils::{Address as _, MockAuth, MockAuthInvoke} throughout. Update existing tests in tests/ to import and use the helpers.