Skip to content

Conversation

@patricios-space
Copy link
Collaborator

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

@patricios-space patricios-space force-pushed the feat/notify-sender branch 4 times, most recently from 45a2bcc to 42798d1 Compare November 3, 2025 20:54
@patricios-space patricios-space marked this pull request as ready for review November 4, 2025 17:40
@patricios-space patricios-space requested a review from a team as a code owner November 4, 2025 17:40
Copilot AI review requested due to automatic review settings November 4, 2025 17:40
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 implements sender notification functionality for CCIP message routing, allowing the router to notify senders about the success or failure of their CCIP send operations via acknowledgment (ACK) or negative acknowledgment (NACK) messages.

Key changes:

  • Added new message types MessageSent, MessageRejected, CCIPSendACK, and CCIPSendNACK for sender notifications
  • Implemented error handling path with ExecutorFinishedWithError and MessageValidationFailed messages
  • Updated the OnRamp to notify the Router upon successful or failed message processing, which then notifies the original sender

Reviewed Changes

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

Show a summary per file
File Description
pkg/ccip/bindings/router/router.go Added router message structures for sender notifications (MessageSent, MessageRejected, CCIPSendACK, CCIPSendNACK)
pkg/ccip/bindings/onramp/onramp.go Added ExecutorFinishedWithError message type for error handling
pkg/ccip/bindings/feequoter/fee_quoter.go Removed MessageValidated opcode (moved to executor)
pkg/ccip/bindings/ccipsendexecutor/ccipsendexecutor.go Added MessageValidated and MessageValidationFailed message types
pkg/ton/debug/decoders/ccip/router/router.go Added decoder support for new router message types
pkg/ton/debug/decoders/ccip/feequoter/feequoter.go Removed MessageValidated decoder (moved to executor)
pkg/ton/debug/decoders/ccip/ccipsendexecutor/ccipsendexecutor.go Added decoders for executor validation messages
contracts/wrappers/ccip/Router.ts Added TypeScript wrappers and codecs for new message types
contracts/wrappers/ccip/OnRamp.ts Added wrapper methods for executor finish messages and updated opcode
contracts/wrappers/ccip/FeeQuoter.ts Added opcodes for validation messages
contracts/contracts/ccip/router/contract.tolk Implemented onSendACK and onSendNACK handlers
contracts/contracts/ccip/onramp/contract.tolk Implemented replyWithError handler and sender notification logic
contracts/contracts/ccip/fee_quoter/contract.tolk Added try-catch for fee validation with error response
contracts/contracts/ccip/ccipsend_executor/contract.tolk Implemented validation failure handling and error exit logic
contracts/tests/ccip/CCIPRouter.spec.ts Added tests for sender notifications and balance management
docs/contracts/ccip/flow/onramp/*.md Updated documentation to reflect new message names

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

Comment on lines +139 to 143
// if (msg.fee > self.originalBalance) {
// self.exitWithError(CCIPSendExecutor_Error.InsufficientFunds as int, sender);
// return;
// }

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be address in a different PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants