Skip to content

feat: configure superseed with CCTP rebalancing#6519

Merged
yorhodes merged 19 commits intomainfrom
superseed-cctp
Jul 18, 2025
Merged

feat: configure superseed with CCTP rebalancing#6519
yorhodes merged 19 commits intomainfrom
superseed-cctp

Conversation

@yorhodes
Copy link
Copy Markdown
Member

@yorhodes yorhodes commented Jun 12, 2025

Description

  • Update superseed USDC with CCTP rebalancing

Related Issues

Fixes https://linear.app/hyperlane-xyz/issue/ENG-1688/upgrade-the-superseed-usdc-warp-route

Summary by CodeRabbit

  • New Features

    • Enhanced configuration for Ethereum, Arbitrum, Base, and Optimism networks with dynamic bridge and metadata retrieval.
    • Added explicit contract versioning and rebalancer permissions to token router settings for improved clarity and control.
  • Refactor

    • Replaced static bridge address configuration with dynamic, registry-based setup for greater flexibility and maintainability.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jun 12, 2025

⚠️ No Changeset found

Latest commit: 12de984

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (b746ad4) to head (ddc6fc1).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #6519   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          1       1           
  Lines         14      14           
=====================================
  Misses        14      14           
Components Coverage Δ
core ∅ <ø> (∅)
hooks ∅ <ø> (∅)
isms ∅ <ø> (∅)
token ∅ <ø> (∅)
middlewares ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yorhodes yorhodes marked this pull request as ready for review June 19, 2025 15:09
@yorhodes yorhodes changed the title superseed cctp feat: configure superseed with CCTP rebalancing Jun 19, 2025
Base automatically changed from cctp to main July 8, 2025 19:31
@yorhodes yorhodes enabled auto-merge July 18, 2025 19:13
@yorhodes yorhodes disabled auto-merge July 18, 2025 19:14
@yorhodes yorhodes enabled auto-merge July 18, 2025 19:18
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jul 18, 2025

📝 Walkthrough

Walkthrough

The 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

File(s) Change Summary
typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumSuperseedUSDCWarpConfig.ts Switched from static to registry-based config for warp routes and metadata; added dynamic bridge addresses, explicit contract versioning, and rebalancer permissions for ethereum, arbitrum, base, and optimism configs.

Suggested reviewers

  • antigremlin
  • ameten
  • tkporter
  • paulbalaji

Poem

In the registry’s swamp, config bridges grow,
No more hardcoded stones, let dynamic rivers flow.
Chains now whisper secrets, addresses on the breeze,
Rebalancers gather, permissions with ease.
Version eight’s the tune, as the routers dance anew—
A hearty config stew, cooked up fresh for you!
🐉✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch superseed-cctp

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between b746ad4 and 12de984.

📒 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.

@yorhodes yorhodes added this pull request to the merge queue Jul 18, 2025
Merged via the queue into main with commit f855b73 Jul 18, 2025
81 checks passed
@yorhodes yorhodes deleted the superseed-cctp branch July 18, 2025 19:44
@github-project-automation github-project-automation bot moved this from In Review to Done in Hyperlane Tasks Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants