fix: Switch CCTP service to use raw_message_dispatch#7742
Conversation
|
antigremlin
left a comment
There was a problem hiding this comment.
Please add a changeset. Would be nice to reference the other PR as well.
🦀 Rust Agent Docker Image Built SuccessfullyImage Tags: |
📝 WalkthroughWalkthroughThe Offchain Lookup Server's data retrieval layer got a modest adjustment—the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@rust/main/agents/scraper/docs/option-cctp-only.md`:
- Around line 23-39: Add a language specifier to the plain-text fenced code
blocks in option-cctp-only.md (the triple-backtick diagram blocks) to satisfy
MD040; change each ``` to ```text for both diagram sections (the USDC
cross-chain flow and the Event Log flow) so the linter recognizes the language
on those fenced code blocks.
- Around line 216-222: Replace the bolded "Option 1: Hasura Console (manual)"
and "Option 2: Hasura Metadata (automated)" labels with proper Markdown headings
(e.g., "## Option 1: Hasura Console (manual)" and "## Option 2: Hasura Metadata
(automated)") to satisfy MD036; locate the lines containing the exact strings
"Option 1: Hasura Console (manual)" and "Option 2: Hasura Metadata (automated)"
in option-cctp-only.md and convert them to heading syntax, leaving the numbered
steps and surrounding content unchanged.
In `@typescript/ccip-server/src/services/HyperlaneService.ts`:
- Around line 107-112: The code reads responseAsJson = (await
response.json())['data']['raw_message_dispatch'] and then immediately checks
responseAsJson.length which will throw if the GraphQL response is { data: null,
errors: [...] }; update the handling in HyperlaneService.ts to first inspect the
parsed JSON (e.g., const parsed = await response.json()), fail-safe extract
parsed.data?.raw_message_dispatch only if parsed.data and
Array.isArray(parsed.data.raw_message_dispatch), otherwise set responseAsJson =
[] (and optionally log parsed.errors or a warning), then proceed to check
responseAsJson.length and safely access
responseAsJson[0]?.origin_tx_hash.replace('\\x','0x') so you never call .length
or .replace on undefined.
🐳 Monorepo Docker Image Built SuccessfullyImage Tags: |
🔍 CCIP Server Docker Image Built SuccessfullyImage Tags: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7742 +/- ##
=======================================
Coverage 77.02% 77.02%
=======================================
Files 117 117
Lines 2651 2651
Branches 244 244
=======================================
Hits 2042 2042
Misses 593 593
Partials 16 16
🚀 New features to boost your workflow:
|
Description
Switch CCTP service to use raw_message_dispatch
Related issues
Backward compatibility
Yes
Testing
Manual
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.