Skip to content

docs(vesting): add VestingWallet API reference and correct released/init event schemas - #427

Merged
ritaifeoluwa merged 1 commit into
SmartDropLabs:mainfrom
Dinma179:docs/vesting-api-and-event-schemas
Sep 27, 2026
Merged

ritaifeoluwa merged 1 commit into
SmartDropLabs:mainfrom
Dinma179:docs/vesting-api-and-event-schemas

Conversation

@Dinma179

@Dinma179 Dinma179 commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

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.md

A single reference for the vesting-wallet contract that a client or indexer
actually needs:

  • the linear-with-cliff formula, explicitly noting vesting runs from
    start_ledger (not the cliff) in ledger sequence numbers, not wall-clock time;
  • every read entry point, plus the guidance that get_vesting_overview() is the
    one call a dashboard should use for schedule and progress;
  • VestingOverview and VestingSchedule field tables, including why
    releasable_amount saturates instead of going negative after
    emergency_withdraw;
  • every write entry point with its authorization requirement;
  • release_all, including why it takes no beneficiary argument — the
    beneficiary 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;
  • all four VestingWallet events and the deployment front-running caveat.

Fixed: docs/events.md

The registry states that "off-chain indexers rely on these definitions", so two
errors in it are real defects rather than cosmetic gaps:

  1. released was documented with two payload fields. The contract has always
    published three — (beneficiary, releasable, released + releasable). An indexer
    built 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_total rather than summing per-call
    amounts.
  2. The init event was undocumented. initialize emits it, and it was
    absent 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

@netlify

netlify Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for sdcontracts ready!

Name Link
🔨 Latest commit 193f6c7
🔍 Latest deploy log https://app.netlify.com/projects/sdcontracts/deploys/6ab970cd33abe6000819855f
😎 Deploy Preview https://deploy-preview-427--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.

@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

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

Learn more about application limits

@ritaifeoluwa
ritaifeoluwa merged commit dd9be4e into SmartDropLabs:main Sep 27, 2026
4 of 5 checks passed
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