Skip to content

fix: repair main's broken build and a negative-releasable bug across … - #432

Merged
ritaifeoluwa merged 1 commit into
SmartDropLabs:mainfrom
OlolaJaco:fix/build-breaks-vesting-factory-farming-pool
Sep 27, 2026
Merged

ritaifeoluwa merged 1 commit into
SmartDropLabs:mainfrom
OlolaJaco:fix/build-breaks-vesting-factory-farming-pool

Conversation

@OlolaJaco

Copy link
Copy Markdown
Contributor

Closes #415 (vesting-wallet re-init guard) — vesting-wallet/src/lib.rs initialize() already rejects a second call.
Closes #416 (factory pool_count_by_asset index) — AssetPoolCount index already implemented and maintained in create_pool_inner.
Closes #417 (farming-pool lock-period bypass) — unlock_assets already enforces the lock unconditionally for partial and full withdrawals.
Closes #418 (factory transfer_admin event test) — test_transfer_admin_emits_event_with_old_and_new_admin already exists and passes.

…factory/farming-pool/vesting-wallet

main did not compile or pass tests against the pinned soroban-sdk 25.3.1 due to
several unrelated, recently-merged bugs:

- farming-pool: duplicate `PoolInfo` import broke the crate (and anything
  depending on its WASM output, i.e. factory).
- vesting-wallet: `Address::default()` doesn't exist in this SDK; switched to
  the zero-address strkey pattern already used elsewhere in the codebase.
- vesting-wallet: `releasable`/`releasable_amount` used `i128::saturating_sub`,
  which only guards overflow, not negativity. After `emergency_withdraw`,
  `release()` could attempt to transfer a negative token amount. Clamped with
  `.max(0)`.
- factory: a bad merge left two versions of `create_pool` concatenated (with
  an unclosed brace and dead code), and silently regressed
  `min_stake_amount == 0` from "default to minimum" to "reject". Rewrote it as
  a thin delegate to `create_pool_inner`, matching `create_pools_batch` and the
  already-tested behavior.
- factory: added the missing `RefreshPoolTtlsResponse` type.
- Several tests asserted on `events().all()` as if it accumulated across
  multiple top-level calls; it only reflects the most recent one. Fixed
  assertions in vesting-wallet and factory tests to match actual semantics
  (and the pattern already used elsewhere in farming-pool's own tests).
- farming-pool tests: removed stale `.unwrap()` calls on getters that return
  plain values (not `Result`) via the generated client.
- factory's integration test: updated stale `unstake(user)` call sites for
  `unstake`'s new `amount` parameter, and regenerated the checked-in
  `farming_pool.wasm` fixture per its own documented procedure.

354/354 tests now pass across factory (83 unit + 9 integration),
farming-pool (202), and vesting-wallet (60), and the release WASM builds
cleanly for the whole workspace.
@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

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

@netlify

netlify Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for sdcontracts ready!

Name Link
🔨 Latest commit 7c664d9
🔍 Latest deploy log https://app.netlify.com/projects/sdcontracts/deploys/6ab98702f22c140008da5990
😎 Deploy Preview https://deploy-preview-432--sdcontracts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ritaifeoluwa
ritaifeoluwa merged commit 9a644c8 into SmartDropLabs:main Sep 27, 2026
4 checks passed
Awwal-dev34 pushed a commit to Awwal-dev34/smartdrop-contracts that referenced this pull request Oct 12, 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