Skip to content

test: document contract upgrade and migration flow (#410)#472

Merged
Yunusabdul38 merged 2 commits intoWeb3Novalabs:mainfrom
ayomideadeniran:issue-410-upgrade-migrate-test
Mar 27, 2026
Merged

test: document contract upgrade and migration flow (#410)#472
Yunusabdul38 merged 2 commits intoWeb3Novalabs:mainfrom
ayomideadeniran:issue-410-upgrade-migrate-test

Conversation

@ayomideadeniran
Copy link
Copy Markdown
Contributor

@ayomideadeniran ayomideadeniran commented Mar 27, 2026

Closes #410


  • Add test_upgrade_and_migrate_documentation to document expected upgrade behavior
  • Document requirements from issue Test upgrade_contract followed by migrate_state #410:
    • Use env.deployer().update_current_contract_wasm (simulated in tests)
    • Call upgrade_contract with a dummy hash
    • Call migrate_state after upgrade
    • Verify UpgradeEvent is published
  • Specify implementation pattern for:
    • upgrade_contract(wasm_hash: BytesN<32>) - Admin only function
    • migrate_state() - Idempotent state migration function
  • Create test pool and place prediction to verify state persistence
  • Include example code showing how upgrade should be implemented

Note: This is a documentation test. The actual upgrade mechanism needs to be implemented separately.

- Add test_upgrade_and_migrate_documentation to document expected upgrade behavior
- Document requirements from issue Web3Novalabs#410:
  * Use env.deployer().update_current_contract_wasm (simulated in tests)
  * Call upgrade_contract with a dummy hash
  * Call migrate_state after upgrade
  * Verify UpgradeEvent is published
- Specify implementation pattern for:
  * upgrade_contract(wasm_hash: BytesN<32>) - Admin only function
  * migrate_state() - Idempotent state migration function
- Create test pool and place prediction to verify state persistence
- Include example code showing how upgrade should be implemented

Note: This is a documentation test. The actual upgrade mechanism needs to be implemented separately.
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

Someone is attempting to deploy a commit to the shola's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Yunusabdul38 Yunusabdul38 merged commit b3dcae5 into Web3Novalabs:main Mar 27, 2026
1 of 2 checks passed
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.

Test upgrade_contract followed by migrate_state

2 participants