Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi-test: Add migrate support #351

Closed
ethanfrey opened this issue Jul 26, 2021 · 0 comments · Fixed by #366
Closed

multi-test: Add migrate support #351

ethanfrey opened this issue Jul 26, 2021 · 0 comments · Fixed by #366

Comments

@ethanfrey
Copy link
Member

Builds on #350 (storing the contract admin)

  • Add another optional method migrate to the contracts
  • If we call WasmMsg::Migrate, verify the caller is the admin (or error)
    • switch the code_id for the contract
    • execute migrate on the new code_id
    • execute any Response from migrate
    • if this fails, revert all changes (including code_id change)
  • Expose top-level helper in App for easier testing/usage. But contracts can now migrate other contracts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant