Feature/382 contract migration tools#433
Merged
Xhristin3 merged 5 commits intorinafcode:mainfrom Apr 28, 2026
Merged
Conversation
|
@Oluwasuyi-Timilehin 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! 🚀 |
…ting scripts - Implemented progress tracking script (progress.sh) for monitoring migration status, generating reports, and cleaning up artifacts. - Created rollback script (rollback.sh) for automated and manual rollback functionalities, including validation checks and emergency procedures. - Developed validation script (validate.sh) for comprehensive pre and post-migration checks, ensuring contract connectivity, versioning, and network health. - Introduced test suite (test_tools.sh) to validate the functionality and structure of migration tools, including syntax checks and configuration validation.
Contributor
|
@Oluwasuyi-Timilehin resolve conflicts. |
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 #382
📋 Description
This pull request improves the TeachLink contract migration workflow by hardening upgrade initialization, adding migration metadata validation, and improving rollback test coverage.
Contract:
contracts/teachlink/src/upgrade.rsnow enforces valid state and migration hashes, auto-initializes upgrade state when absent, and includes stronger rollback expiry behavior.contracts/teachlink/src/lib.rsnow initializes the upgrade subsystem during bridge contract initialization.🎯 Type of Change
📝 Changes Made
upgrade::ContractUpgrader::initialize(&env)?toTeachLinkBridge::initialize(...)incontracts/teachlink/src/lib.rs.contracts/teachlink/src/upgrade.rs:prepare_upgradeandexecute_upgradenow auto-initialize upgrade storage ifUPGRADE_VERSIONis missing.prepare_upgraderejects an emptystate_hash.execute_upgraderejects an emptymigration_hash.test_prepare_upgrade_auto_initializes.test_rollback_window_expiryto move the ledger past the rollback window, confirm rollback is rejected, and verify rollback availability is cleared.🔗 Related Issue(s)
🧪 Testing
Recommended commands
Notes
cargowas unavailable in the editor terminal environment used for file edits, so please run the commands locally to verify the build and test pass.🔍 Review Checklist
💥 Breaking Changes
🚀 Deployment Notes
Ready for Review: yes
#closes