-
Notifications
You must be signed in to change notification settings - Fork 2
[NONEVM-2925] Notify Sender #301
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
45a2bcc to
42798d1
Compare
283ce70 to
a5e9349
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 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, andCCIPSendNACKfor sender notifications - Implemented error handling path with
ExecutorFinishedWithErrorandMessageValidationFailedmessages - 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.
a400465 to
a5e9349
Compare
| // if (msg.fee > self.originalBalance) { | ||
| // self.exitWithError(CCIPSendExecutor_Error.InsufficientFunds as int, sender); | ||
| // return; | ||
| // } | ||
|
|
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.
This will be address in a different PR
NONEVM-2925