-
Notifications
You must be signed in to change notification settings - Fork 4
[M2] A malicious receiver could prevent the OffRamp from receiving funds from the MerkleRoot #477
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
Conversation
|
👋 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! |
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 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
freezeMerkleRootopcode and message handling to OffRamp contract - Implemented
sendFreezemethod 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.
9b8a1b8 to
4bd6754
Compare
… vv/freeze-merklerroot-message
… vv/freeze-merklerroot-message
|
These cost are covered in the fee. |
Adds the following message paths to freeze deployable contracts when messages are not finalizing:
OffRamp_FreezeMerkleRoot -> MerkleRoot_Freeze
OffRamp_FreeezeReceiveExecutor -> ReceiveExecutor_Freeze