Skip to content

Feat/four tasks - #548

Merged
Kingsman-99 merged 6 commits into
Stellar-split:mainfrom
Sundayabel222:feat/four-tasks
Jul 29, 2026
Merged

Feat/four tasks#548
Kingsman-99 merged 6 commits into
Stellar-split:mainfrom
Sundayabel222:feat/four-tasks

Conversation

@Sundayabel222

Copy link
Copy Markdown
Contributor

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.

- 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()
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@Kingsman-99
Kingsman-99 merged commit a897507 into Stellar-split:main Jul 29, 2026
1 of 4 checks passed
@grantfox-oss grantfox-oss Bot mentioned this pull request Jul 29, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants