Skip to content

# fix(vault): bind admin in storage migration and align ForceUpgrade checkpoints (#1633) - #1690

Open
Awosdot wants to merge 1 commit into
Junirezz:mainfrom
Awosdot:feature/issue-1633-fix-storage-migration-admin-force-upgrade
Open

Awosdot wants to merge 1 commit into
Junirezz:mainfrom
Awosdot:feature/issue-1633-fix-storage-migration-admin-force-upgrade

Conversation

@Awosdot

@Awosdot Awosdot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Fixed the unbound admin scope in run_storage_migration (contracts/vault/src/lib.rs), ensuring admin is properly assigned before admin.clone() event emission[cite: 13].
  • Aligned ForceUpgrade logic with upgrade(), ensuring forced upgrades execute storage version checkpoints and migration routines[cite: 13].
  • Added event emissions for both upgrade() and ForceUpgrade containing the old and new WASM hash alongside storage version data[cite: 13].
  • Updated upgrade test suites to cover WASM hash and storage version event emissions under normal and forced upgrades[cite: 13].

Why

run_storage_migration referenced an out-of-scope admin variable, causing target build failures during WASM compilation[cite: 13]. Additionally, ForceUpgrade bypassed version checkpoints and storage migrations entirely while emitting zero upgrade audit events[cite: 13].

How tested

  • Verified WASM compilation using cargo build --target wasm32-unknown-unknown[cite: 13].
  • Executed cargo test -p vault to confirm all upgrade and storage migration test suites pass cleanly[cite: 13].

Closes

Closes #1633

@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@Awosdot 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

This branch has not been deployed

No deployments
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] Fix run_storage_migration unbound admin and align ForceUpgrade with the upgrade checkpoint

1 participant