docs(vesting): add VestingWallet API reference and correct released/init event schemas - #427
Merged
ritaifeoluwa merged 1 commit intoSep 27, 2026
Conversation
✅ Deploy Preview for sdcontracts ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@Dinma179 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! 🚀 |
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.
Documentation follow-up for #407, #408, #409 and #410. The contract work for all four landed in #425 (merged); these issues were reopened afterwards, so this PR documents what is now in
main— and fixes two real errors in the published event schema.New:
docs/vesting-api.mdA single reference for the
vesting-walletcontract that a client or indexeractually needs:
start_ledger(not the cliff) in ledger sequence numbers, not wall-clock time;get_vesting_overview()is theone call a dashboard should use for schedule and progress;
VestingOverviewandVestingSchedulefield tables, including whyreleasable_amountsaturates instead of going negative afteremergency_withdraw;release_all, including why it takes nobeneficiaryargument — thebeneficiary is read from storage and is the account that must authorize, and a
parameter would either be ignored or let a third party force a release at a
moment the beneficiary did not choose;
Fixed:
docs/events.mdThe registry states that "off-chain indexers rely on these definitions", so two
errors in it are real defects rather than cosmetic gaps:
releasedwas documented with two payload fields. The contract has alwayspublished three —
(beneficiary, releasable, released + releasable). An indexerbuilt from the table would mis-parse the tuple and could not track cumulative
progress, which is the outcome [bug] vesting-wallet: release doesn't emit event #408 exists to prevent. The third field is now
documented, with a note to track
released_totalrather than summing per-callamounts.
initevent was undocumented.initializeemits it, and it wasabsent from the registry entirely — an indexer had no schema for the event
that marks a schedule's creation.
Both corrections are documentation-only; no contract behaviour changed, and the
registry remains the source of truth alongside the new reference.
Closes #407
Closes #408
Closes #409
Closes #410