Skip to content

feat(vault): add permissionless vault unlock operation - #90

Merged
Nabeelahh merged 1 commit into
Vaulty-X:mainfrom
coderDom-x:feature/permissionless-vault-unlock
Jul 29, 2026
Merged

feat(vault): add permissionless vault unlock operation#90
Nabeelahh merged 1 commit into
Vaulty-X:mainfrom
coderDom-x:feature/permissionless-vault-unlock

Conversation

@coderDom-x

Copy link
Copy Markdown
Contributor

Summary

This PR introduces a permissionless unlock_vault operation that allows anyone to unlock a vault once it reaches its maturity timestamp, enabling users and indexers to observe vault maturity without requiring a withdrawal.

Changes

  • Added a new unlock_vault operation to the vault contract.
  • Ensured the operation only succeeds after the configured unlock timestamp.
  • Implemented a one-time state transition from Locked to Unlocked.
  • Emitted the documented vault unlock event upon successful unlock.
  • Preserved vault ownership, balances, and asset configuration during unlock.
  • Updated shared types, errors, events, and utilities where required.
  • Added unit tests covering unlock behaviour before, at, and after the maturity timestamp.
  • Updated the contract README with the new operation and expected behaviour.

Testing

  • Verified unlocking before the maturity timestamp fails.
  • Verified unlocking at the maturity timestamp succeeds.
  • Verified unlocking after maturity succeeds.
  • Confirmed the vault transitions from Locked to Unlocked exactly once.
  • Verified the unlock event is emitted.
  • Confirmed ownership, balances, and asset configuration remain unchanged.

Closes #82

@Nabeelahh
Nabeelahh merged commit 3e424bc into Vaulty-X:main Jul 29, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Contract] Add an explicit permissionless vault-unlock operation

2 participants