Skip to content

Conversation

patricios-space
Copy link
Collaborator

@patricios-space patricios-space commented Oct 9, 2025

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.

@patricios-space patricios-space changed the title feat: upgrade handlers [NONEVM-2496] Oct 16, 2025
@patricios-space patricios-space changed the title [NONEVM-2496] [NONEVM-2496] Adopt Upgradable in all contracts Oct 16, 2025
@patricios-space patricios-space marked this pull request as ready for review October 16, 2025 17:05
@patricios-space patricios-space requested a review from a team as a code owner October 16, 2025 17:05
@Copilot Copilot AI review requested due to automatic review settings October 16, 2025 17:05
Copy link
Contributor

@Copilot Copilot AI left a 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.

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.

1 participant