-
Notifications
You must be signed in to change notification settings - Fork 4
[NONEVM-3331] [M5] Missing OnRamp disabling logic and null handling in Router #476
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
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 addresses missing OnRamp disabling logic and null handling in the Router contract. The changes ensure that the Router properly handles disabled destination chains by checking both for missing OnRamp entries and zero addresses, rather than throwing exceptions that would fail transactions.
Key Changes:
- Modified Router to handle disabled chains gracefully by returning error messages instead of failing transactions
- Added zero address checks alongside missing OnRamp checks
- Refactored error handling logic into reusable helper functions
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| contracts/contracts/ccip/router/contract.tolk | Added zero address validation for OnRamps and extracted error handling into reusable helper functions |
| contracts/tests/ccip/router/Router.getFee.spec.ts | Updated tests to expect graceful error handling and added test for zero address scenario |
| contracts/tests/ccip/router/Router.ccipSend.spec.ts | Updated tests to expect graceful error handling and added test for zero address scenario |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3f04c6d to
dec966f
Compare
dec966f to
988aa9f
Compare
NONEVM-3331