feat(vesting): add upgrade and admin lock mechanisms - #431
Merged
zachyo merged 3 commits intoAug 3, 2026
Conversation
|
@MJ-RWA 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! 🚀 |
Contributor
|
Hi @MJ-RWA , kindly fix conflicts |
Contributor
Author
|
@zachyo Conflict Resolved |
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.
Closes #362
Add Upgradeability and Admin Lock Controls to Vesting Contract
Summary
This PR adds an upgrade path to the vesting contract, bringing it in line with the token contract's upgrade capabilities and enabling future remediation of deployed vesting contracts.
The implementation mirrors the token contract's upgrade flow, including validation, admin authorization, lock-state enforcement, and upgrade event emission. It also introduces admin revocation and locking functionality, allowing vesting contracts to become permanently immutable once vesting schedules are finalized.
Additionally, the AdminPanel UI is extended to support upgrades for both token and vesting contracts.
Changes
Smart Contract
upgrade(new_wasm_hash: BytesN<32>)to the vesting contract.revoke_adminfunctionality.AdminPanel
Motivation
The vesting contract currently lacks any upgrade mechanism, making deployed instances permanently fixed to their original implementation.
Recent findings identified multiple issues affecting the vesting module, including:
Without an upgrade path, remediation requires manual migration of users and vesting schedules to entirely new contracts. This PR provides a controlled and auditable upgrade mechanism while preserving the ability to permanently lock contracts once finalized.
Testing
Security Considerations
Impact
Closes:Vesting: the contract is not upgradeable while the token is #362