refactor(forge-vesting): deprecate get_config() in favour of get_vest…#298
Merged
Austinaminu2 merged 1 commit intoAustinaminu2:mainfrom Mar 30, 2026
Conversation
…ing_schedule() + get_status() Fixes Austinaminu2#244. get_config() exposes the admin address and cancelled flag publicly, which is a privacy concern and creates confusion about which read function integrators should use. Changes: - Add deprecation notice to get_config() doc comment pointing to get_vesting_schedule() and get_status() as preferred alternatives; note it is retained for admin tooling and backward compatibility - Add test_schedule_and_status_provide_full_ui_info_without_get_config verifying that get_vesting_schedule() + get_status() together cover all UI-facing data needs without requiring get_config() - Document the three-function distinction in README
|
@zeekman 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.
What does this PR do?
get_config()returns the fullVestingConfigincluding the admin addressand internal
cancelledflag. Exposing the admin address publicly is aprivacy concern, and having three read functions with no guidance creates
confusion about which one integrators should use.
The contract already has cleaner alternatives —
get_vesting_schedule()forschedule parameters and
get_status()for live claimable state. This PRadds a deprecation notice to
get_config()pointing to those, documentsthe distinction in the README, and adds a test proving the two preferred
functions together cover all UI-facing data needs.
No behaviour changes.
get_config()is retained for admin tooling andbackward compatibility.
Related issue
Testing done
Added
test_schedule_and_status_provide_full_ui_info_without_get_config:initializes a vesting schedule, advances past the cliff, and asserts that
get_vesting_schedule()+get_status()together expose token, beneficiary,amounts, timing, cliff status, and claimable amount — without needing
get_config().Checklist
cargo fmt(or equivalent formatter)cargo clippy(or equivalent linter)Closes #244