Skip to content

Conversation

@vicentevieytes
Copy link
Collaborator

@vicentevieytes vicentevieytes commented Dec 29, 2025

Adds the following message paths to freeze deployable contracts when messages are not finalizing:
OffRamp_FreezeMerkleRoot -> MerkleRoot_Freeze
OffRamp_FreeezeReceiveExecutor -> ReceiveExecutor_Freeze

@vicentevieytes vicentevieytes requested a review from a team as a code owner December 29, 2025 14:57
Copilot AI review requested due to automatic review settings December 29, 2025 14:57
@github-actions
Copy link

👋 vicentevieytes, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

Copy link
Contributor

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 PR adds functionality to freeze merkle roots in the OffRamp contract, allowing the owner to freeze a merkle root and retrieve its funds.

Key changes:

  • Added freezeMerkleRoot opcode and message handling to OffRamp contract
  • Implemented sendFreeze method in MerkleRoot contract to handle freeze operations
  • Added comprehensive test coverage for both authorized and unauthorized freeze attempts

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
contracts/wrappers/ccip/OffRamp.ts Added freezeMerkleRoot opcode, message type, codec, and sendFreezeMerkleRoot method
contracts/wrappers/ccip/MerkleRoot.ts Added freeze opcode and sendFreeze method
contracts/tests/ccip/OffRamp.spec.ts Added tests for freezing merkle roots by owner and non-owner scenarios
contracts/contracts/ccip/offramp/messages.tolk Added OffRamp_FreezeMerkleRoot message struct and updated message type union
contracts/contracts/ccip/offramp/contract.tolk Added onFreezeMerkleRoot handler to process freeze requests
contracts/contracts/ccip/merkle_root/messages.tolk Added MerkleRoot_Freeze message struct
contracts/contracts/ccip/merkle_root/contract.tolk Added onFreeze handler to destroy contract and return funds

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vicentevieytes vicentevieytes changed the title OffRamp: add method to freeze merkle root [M2] A malicious receiver could prevent the OffRamp from receiving funds from the MerkleRoot Jan 5, 2026
@vicentevieytes vicentevieytes force-pushed the vv/freeze-merklerroot-message branch 2 times, most recently from 9b8a1b8 to 4bd6754 Compare January 5, 2026 17:58
@patricios-space
Copy link
Collaborator

These cost are covered in the fee.

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.

2 participants