Add vesting schedule getter, pool aggregate credits, and create_pool failure docs - #239
Merged
ritaifeoluwa merged 2 commits intoAug 28, 2026
Conversation
vesting-wallet: add get_vesting_schedule() returning all schedule parameters (beneficiary, token, total_amount, start/cliff/end ledger, revocable) in one call for frontends (SmartDropLabs#224) farming-pool: add total_distributed_credits() aggregation counter that grows as credits are banked on checkpoint/checkpoint_position, spanning both the flexible-stake and locked-position systems (SmartDropLabs#221) farming-pool: document that get_credits and checkpoint share the same multiplier-based accrual path, with a regression test proving an un-checkpointed read equals the next checkpointed amount after a global multiplier change (SmartDropLabs#223) factory: document that create_pool emits no event on failure since the reverted invocation discards contract events; callers must handle the returned FactoryError (SmartDropLabs#222)
|
@ScriptedBro 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! 🚀 |
✅ Deploy Preview for sdcontracts ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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
Four improvements across the vesting-wallet, farming-pool, and factory contracts.
vesting-wallet (#224)
Adds
get_vesting_schedule()which returns all schedule parameters (beneficiary,token,total_amount,start_ledger,cliff_ledger,end_ledger,revocable) in a single call, so frontends no longer need a series of individual getters. ReturnsNotInitializedon an uninitialized wallet.farming-pool (#221)
Adds
total_distributed_credits()— a protocol-wide aggregate of credits committed to users since pool initialization. The counter grows as credits are banked at each checkpoint (stake, lock, unlock, unstake, boost) across both the flexible-stake and locked-position systems, and is initialized at pool creation.farming-pool (#223)
Documents the multiplier-source behavior shared by
get_creditsandcheckpoint: accrual since the last checkpoint is split across the stake's recorded multiplier snapshot (pre-change) and the current global multiplier (post-change), so both paths read from the same multiplier source. Adds a regression test proving an un-checkpointed read equals exactly what the next checkpointing operation banks after a global multiplier change.factory (#222)
Documents that
create_poolemits no event on failure: a validation failure reverts the invocation, and Soroban discards contract events published by reverted calls. Callers must handle the returnedFactoryErrordirectly; off-chain monitors can detect failed creation attempts via failed-transaction diagnostics.Testing
cargo build --workspace --target wasm32v1-none --releasepasses.test_compute_vested_is_safe_at_maximum_duration_and_ceiling) that also fails onmain(storage TTL overflow at maximum duration) and is unrelated to these changes.main(a set of pre-existing failures where unit-test assets are generated addresses that do not passvalidate_asset; unrelated to this PR).Closes #221
Closes #222
Closes #223
Closes #224