Skip to content

Fix/issues 1172 1173 1174 1175 - #1239

Merged
Hexstar-labs merged 5 commits into
BrainTease:mainfrom
Yebom3220:fix/issues-1172-1173-1174-1175
Sep 28, 2026
Merged

Hexstar-labs merged 5 commits into
BrainTease:mainfrom
Yebom3220:fix/issues-1172-1173-1174-1175

Conversation

@Yebom3220

Copy link
Copy Markdown
Contributor

Summary

This PR addresses four related maintenance, refactoring, and test-coverage issues across the Soroban contracts.

Changes

#1172 — Clippy cleanup

  • Addressed the identified Clippy-related issues and compilation/lint blockers.
  • Restored and corrected the shared contract infrastructure required by the affected workspace components.
  • Updated the affected shared/token/royalty components where necessary to bring the code back into a consistent buildable state.
  • Kept the changes focused on resolving the existing workspace issues rather than introducing new application behavior.

#1173 — Scholarship fund disbursement edge-case tests

Added coverage for scholarship fund disbursement boundaries, including:

  • Partial fund disbursement.
  • Full fund disbursement.
  • Attempted disbursement beyond the available balance.
  • Fund depletion and zero-balance behavior.
    The tests verify that valid disbursements succeed while insufficient-fund scenarios are rejected correctly.

#1174 — Buyback calculation refactor

  • Refactored the buyback calculation to use the shared checked multiplication/division math helper.
  • Removed duplicated arithmetic logic from the buyback contract.
  • Keeps the calculation implementation consistent with the shared math utilities used across the contracts.

#1175 — Token restriction compliance tests

Expanded token restriction test coverage for the major transfer-compliance paths, including:

  • Blacklisted sender.
  • Blacklisted receiver.
  • Both parties being blacklisted.
  • Whitelist requirements.
  • Partial whitelist authorization.
  • Blacklist precedence.
  • Emergency override behavior.
  • Approval-based transfers.
  • Transfer limits.
  • Transfers without configured limits.
  • Existing whitelist/blacklist independence behavior.

Scope

This PR is intentionally limited to the work associated with issues #1172–#1175. No new product functionality is introduced.

Verification

The implementation and tests were added for the affected contracts. Full workspace verification is currently affected by an existing Soroban SDK version mismatch between workspace members, so that environment issue has not been resolved as part of this PR.

Issues

Closes #1172
Closes #1173
Closes #1174
Closes #1175

…es, Cargo.toml names, test imports, symbol compliance
…ull disbursement, over-withdrawal, fund-depletion boundary
…st/blacklist/emergency/limit combinations
@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@Yebom3220 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

@Hexstar-labs
Hexstar-labs merged commit bdc0f34 into BrainTease:main Sep 28, 2026
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