feat: configure superseed with CCTP rebalancing#6519
Conversation
…rs/getCCTPConfig.ts Co-authored-by: Paul Balaji <[email protected]>
…rs/getCCTPConfig.ts
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6519 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 1 1
Lines 14 14
=====================================
Misses 14 14
🚀 New features to boost your workflow:
|
📝 WalkthroughWalkthroughThe code now fetches warp route and metadata details from a registry instead of using hardcoded values. It dynamically configures bridge addresses, contract versions, and rebalancer permissions for several chains in the superseed USDC warp config, using data from the registry. Changes
Suggested reviewers
Poem
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumSuperseedUSDCWarpConfig.ts (1)
33-45: Registry integration looks good, but consider safer handling of addressOrDenom.The dynamic fetching from registry is a nice improvement. However, the non-null assertion on
addressOrDenom!could be risky if some tokens don't have addresses.Consider adding a filter or more explicit error handling:
const cctpBridges = Object.fromEntries( - mainnetCCTP.tokens.map(({ chainName, addressOrDenom }) => [ - chainName, - addressOrDenom!, - ]), + mainnetCCTP.tokens + .filter(({ addressOrDenom }) => addressOrDenom) + .map(({ chainName, addressOrDenom }) => [ + chainName, + addressOrDenom!, + ]), );
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumSuperseedUSDCWarpConfig.ts(3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: xeno097
PR: hyperlane-xyz/hyperlane-monorepo#6486
File: typescript/cli/src/tests/warp/warp-check.e2e-test.ts:490-494
Timestamp: 2025-06-16T11:17:55.750Z
Learning: In the Hyperlane registry, the label part of warp IDs can now be any value that matches the registry's regex requirements, not just actual chain names. This means functions like getCombinedWarpRoutePath can accept descriptive filenames like WARP_DEPLOY_DEFAULT_FILE_NAME as valid label components for constructing registry paths.
Learnt from: ltyu
PR: hyperlane-xyz/hyperlane-monorepo#6715
File: typescript/cli/src/deploy/warp.ts:941-948
Timestamp: 2025-07-14T23:18:11.350Z
Learning: In the Hyperlane CLI warp.ts file, casting ExtendedSubmissionStrategy to SubmissionStrategy is acceptable because getStrategy has runtime checks that throw if the strategy factory doesn't exist, providing safety even with the type cast.
typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumSuperseedUSDCWarpConfig.ts (2)
Learnt from: xeno097
PR: hyperlane-xyz/hyperlane-monorepo#6486
File: typescript/cli/src/tests/warp/warp-check.e2e-test.ts:490-494
Timestamp: 2025-06-16T11:17:55.750Z
Learning: In the Hyperlane registry, the label part of warp IDs can now be any value that matches the registry's regex requirements, not just actual chain names. This means functions like getCombinedWarpRoutePath can accept descriptive filenames like WARP_DEPLOY_DEFAULT_FILE_NAME as valid label components for constructing registry paths.
Learnt from: ltyu
PR: hyperlane-xyz/hyperlane-monorepo#6715
File: typescript/cli/src/deploy/warp.ts:941-948
Timestamp: 2025-07-14T23:18:11.350Z
Learning: In the Hyperlane CLI warp.ts file, casting ExtendedSubmissionStrategy to SubmissionStrategy is acceptable because getStrategy has runtime checks that throw if the strategy factory doesn't exist, providing safety even with the type cast.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: build-and-push-to-gcr
- GitHub Check: lint-rs
- GitHub Check: lander-coverage
- GitHub Check: test-rs
🔇 Additional comments (3)
typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumSuperseedUSDCWarpConfig.ts (3)
7-7: Well done on the new imports and constants!The registry-based approach is a solid improvement over hardcoded values. The constants are nicely organized and reusable.
Also applies to: 13-14, 26-28
47-108: Excellent work on the rebalancing configuration!The mesh topology between ethereum, arbitrum, base, and optimism is exactly what you'd want for CCTP rebalancing. Each chain properly maps to the others with the right bridge addresses and domain IDs.
110-123: Smart decision to leave ink and solanamainnet unchanged.Makes perfect sense - these chains aren't part of the CCTP rebalancing network, so they don't need the new properties. Clean and focused implementation.
Description
Related Issues
Fixes https://linear.app/hyperlane-xyz/issue/ENG-1688/upgrade-the-superseed-usdc-warp-route
Summary by CodeRabbit
New Features
Refactor