-
Notifications
You must be signed in to change notification settings - Fork 2
[NONEVM-2496] Adopt Upgradable in all contracts #237
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
base: main
Are you sure you want to change the base?
Conversation
ref: move lib under versioning
6def8d7
to
80a3a65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces a unified upgradeability mechanism across all CCIP contracts and refactors existing upgrade patterns. The changes standardize upgrade logic with version verification, add explicit migration methods, and implement a reusable test framework for upgradeable contracts.
- Replaces class-based upgradeable implementations with function-based approach using structured builders
- Adds version mismatch protection requiring
fromVersion
parameter in upgrade messages - Introduces comprehensive test specification framework for consistent upgradeable contract testing
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
docs/contracts/overview/libraries/upgradeable.md | Documents new version verification features and test framework |
contracts/wrappers/libraries/versioning/Upgradeable.ts | New function-based upgradeable implementation with version checking |
contracts/wrappers/libraries/upgrades/Upgradeable.ts | Refactored from class-based to function-based approach |
contracts/wrappers/libraries/TypeAndVersion.ts | Converted from class to functional interface |
contracts/wrappers/examples/versioning/*.ts | Updated counter examples with new upgradeable patterns |
contracts/tests/lib/versioning/UpgradeableSpec.ts | New reusable test specification framework |
contracts/tests/examples/versioning/UpgradeableCounter.spec.ts | Updated tests using new test framework |
contracts/contracts/lib/versioning/upgradeable.tolk | Core upgradeable implementation with version verification |
contracts/contracts/ccip/*/contract.tolk | Added upgrade support to all CCIP contracts |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
NONEVM-2496
This pull request introduces a unified, robust upgradeability mechanism across all core CCIP contracts. It standardizes upgrade logic, adds explicit migration/versioning methods, and cleans up legacy versioning code. All major CCIP contracts now support owner-controlled upgrades with version checks, and the upgradeable framework is refactored and improved for clarity and safety.
Furthermore, a upgradeable spec test suite was incorporated to easily test new implementations.