Skip to content

feat(infra): implemented litkey warp route config getter#7224

Merged
xeno097 merged 5 commits intomainfrom
xeno/lit-lithcain-deployment
Oct 21, 2025
Merged

feat(infra): implemented litkey warp route config getter#7224
xeno097 merged 5 commits intomainfrom
xeno/lit-lithcain-deployment

Conversation

@xeno097
Copy link
Copy Markdown
Contributor

@xeno097 xeno097 commented Oct 20, 2025

Description

LITKEY warp route config getter

related registry PR: hyperlane-xyz/hyperlane-registry#1198

Drive-by changes

Related issues

Backward compatibility

  • YES

Testing

  • Local with a ui instance

Summary by CodeRabbit

  • New Features

    • Added Litchain LITKEY warp route configuration spanning collateral, native, and synthetic chains.
    • Added utility helpers to build per-chain token and owner configurations.
  • Chores

    • Registered a new warp route identifier for Litchain LITKEY and wired it into the warp config map.
    • Updated registry content hash and an Incentiv chain RPC URL (data/config updates).

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Oct 20, 2025

⚠️ No Changeset found

Latest commit: d71b2c6

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 Oct 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.52%. Comparing base (3699918) to head (d71b2c6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7224   +/-   ##
=======================================
  Coverage   75.52%   75.52%           
=======================================
  Files         108      108           
  Lines        2349     2349           
  Branches      206      206           
=======================================
  Hits         1774     1774           
  Misses        557      557           
  Partials       18       18           
Components Coverage Δ
core 87.80% <ø> (ø)
hooks 71.73% <ø> (ø)
isms 78.53% <ø> (ø)
token 87.24% <ø> (ø)
middlewares 84.98% <ø> (ø)
🚀 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.

@xeno097 xeno097 requested review from ltyu and removed request for Mo-Hussain and paulbalaji October 20, 2025 17:20
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 20, 2025

📝 Walkthrough

Walkthrough

A new Warp route for Litchain LITKEY is added: a config getter constructs and exports a ChainMap of HypTokenRouterConfig across collateral, native, and synthetic chains; two utility helpers for per-chain token/native configs were added; the route ID and getter are registered in the global warp config map. Data-only tweaks updated .registryrc and a mainnet RPC URL.

Changes

Cohort / File(s) Summary
Litchain LITKEY Config Getter
typescript/infra/config/environments/mainnet3/warp/configGetters/getLitLitchainWarpConfig.ts
New module exporting getLitchainLITKEYWarpConfig(routerConfig) which builds a ChainMap for collateral (arbitrum, base, ethereum, optimism), native (litchain), and synthetic (avalanche, bsc, polygon, linea) chains.
Configuration Utilities
typescript/infra/config/environments/mainnet3/warp/configGetters/utils.ts
Added getCollateralTokenConfigForChain() and getNativeTokenConfigForChain() helpers that validate owner/token inputs and return HypTokenRouterConfig objects selected by chain.
Route Registration
typescript/infra/config/environments/mainnet3/warp/warpIds.ts, typescript/infra/config/warp.ts
Added WarpRouteIds.LitchainLITKEY enum member and registered getLitchainLITKEYWarpConfig in warpConfigGetterMap.
Misc data/config updates
.registryrc, rust/main/config/mainnet_config.json
Non-functional registry content-hash update and an RPC URL change in mainnet JSON (data-only).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Caller
  participant WarpRegistry as warpConfigGetterMap
  participant Getter as getLitchainLITKEYWarpConfig
  participant Utils as utils (collateral/native helpers)
  participant RouterCfg as routerConfigByChain
  participant Owners as ownersByChain

  Caller->>WarpRegistry: request config for WarpRouteIds.LitchainLITKEY
  WarpRegistry->>Getter: invoke getter(routerConfig)
  Getter->>RouterCfg: read per-chain router configs
  Getter->>Owners: read per-chain owners map
  alt collateral chain
    Getter->>Utils: call getCollateralTokenConfigForChain(chain,...)
  else native chain
    Getter->>Utils: call getNativeTokenConfigForChain(chain,...)
  end
  Utils->>RouterCfg: select mailbox/token
  Utils->>Owners: assert owner exists
  Utils-->>Getter: return HypTokenRouterConfig
  Getter-->>WarpRegistry: return ChainMap<HypTokenRouterConfig>
  WarpRegistry-->>Caller: deliver warp config
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • ameten
  • kamiyaa
  • yjamin
  • paulbalaji
  • Mo-Hussain

Poem

A quiet route from marsh to chain,
Tokens and owners checked again,
Collateral, native, synthetic set right,
Litchain LITKEY prepped for cross-chain flight,
Configs bundled up, now off into the night.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "feat(infra): implemented litkey warp route config getter" directly captures the main objective of the changeset. The raw summary shows that the core work is implementing a new LITKEY warp route config getter with supporting utilities and configuration updates, which is exactly what the title conveys. The title is specific, concise, and a teammate scanning through history would understand what was done here without breaking a sweat.
Description Check ✅ Passed The PR description addresses the key template sections reasonably well. It includes backward compatibility confirmation (YES), testing details (local UI testing), and even links a related registry PR for context. The Description section itself is brief—just stating "LITKEY warp route config getter"—but it's present and gets the point across. Drive-by changes and related issues are marked as none/empty, which is fine for a focused feature PR like this.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch xeno/lit-lithcain-deployment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 943afc2 and d71b2c6.

📒 Files selected for processing (1)
  • rust/main/config/mainnet_config.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • rust/main/config/mainnet_config.json
⏰ 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). (55)
  • GitHub Check: infra-test
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-3)
  • GitHub Check: cli-evm-e2e-matrix (warp-send)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-recovery)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
  • GitHub Check: cli-evm-e2e-matrix (warp-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
  • GitHub Check: cli-evm-e2e-matrix (core-deploy)
  • GitHub Check: env-test-matrix (mainnet3, optimism, igp)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
  • GitHub Check: cli-evm-e2e-matrix (core-apply)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-1)
  • GitHub Check: cli-evm-e2e-matrix (relay)
  • GitHub Check: cli-evm-e2e-matrix (core-check)
  • GitHub Check: cli-evm-e2e-matrix (core-read)
  • GitHub Check: cli-evm-e2e-matrix (core-init)
  • GitHub Check: env-test-matrix (mainnet3, inevm, core)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, core)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
  • GitHub Check: env-test-matrix (mainnet3, inevm, igp)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, igp)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
  • GitHub Check: env-test-matrix (testnet4, sepolia, core)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, igp)
  • GitHub Check: env-test-matrix (mainnet3, optimism, core)
  • GitHub Check: cli-cosmos-e2e-matrix (core-read)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
  • GitHub Check: cosmos-sdk-e2e-run
  • GitHub Check: cli-cosmos-e2e-matrix (core-apply)
  • GitHub Check: coverage-run
  • GitHub Check: cli-cosmos-e2e-matrix (warp-read)
  • GitHub Check: cli-cosmos-e2e-matrix (core-check)
  • GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
  • GitHub Check: yarn-test-run
  • GitHub Check: cli-install-test-run
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: e2e-matrix (starknet)
  • GitHub Check: e2e-matrix (cosmwasm)
  • GitHub Check: e2e-matrix (evm)
  • GitHub Check: agent-configs (testnet4)
  • GitHub Check: e2e-matrix (cosmosnative)
  • GitHub Check: e2e-matrix (radix)
  • GitHub Check: e2e-matrix (sealevel)
  • GitHub Check: test-rs
  • GitHub Check: lander-coverage

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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 (2)
typescript/infra/config/environments/mainnet3/warp/configGetters/getLitLitchainWarpConfig.ts (2)

12-22: Nice type constraint for deployment chains.

The DeploymentChains type provides good type safety by explicitly defining which chains are involved in this warp route. If this pattern shows up in multiple config getters, it might be worth extractin' a generic version, but for now this is perfectly fine.


24-32: Add a comment to clarify the collateral token addresses.

The function name getLitchainLITKEYWarpConfig tells us what's happening, but the code itself could use a bit more guidance. Similar to how the ownersByChain has a comment, the collateralsByChain would benefit from one too—just a simple note explaining these are LITKEY token addresses across those chains. Helps keep future maintainers from wondering.

// LITKEY token addresses on respective chains
const collateralsByChain: Pick<
  DeploymentChains<Address>,
  'arbitrum' | 'base' | 'optimism' | 'ethereum'
> = {
  arbitrum: '0xC7603786470F04D33E35f9E9B56bD0Ca8803fB95',
  base: '0xF732A566121Fa6362E9E0FBdd6D66E5c8C925E49',
  ethereum: '0x4D4eb0E8B160f6EbF63cC6d36060ffec09301B42',
  optimism: '0x0633E91f64C22d4FEa53dbE6e77B7BA4093177B8',
};
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 643fe18 and 553e292.

📒 Files selected for processing (4)
  • typescript/infra/config/environments/mainnet3/warp/configGetters/getLitLitchainWarpConfig.ts (1 hunks)
  • typescript/infra/config/environments/mainnet3/warp/configGetters/utils.ts (2 hunks)
  • typescript/infra/config/environments/mainnet3/warp/warpIds.ts (1 hunks)
  • typescript/infra/config/warp.ts (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
typescript/infra/config/environments/mainnet3/warp/configGetters/getLitLitchainWarpConfig.ts (2)
typescript/infra/src/config/warp.ts (1)
  • RouterConfigWithoutOwner (84-84)
typescript/infra/config/environments/mainnet3/warp/configGetters/utils.ts (3)
  • getCollateralTokenConfigForChain (106-129)
  • getNativeTokenConfigForChain (148-163)
  • getSyntheticTokenConfigForChain (131-146)
typescript/infra/config/warp.ts (1)
typescript/infra/config/environments/mainnet3/warp/configGetters/getLitLitchainWarpConfig.ts (1)
  • getLitchainLITKEYWarpConfig (50-105)
typescript/infra/config/environments/mainnet3/warp/configGetters/utils.ts (2)
typescript/sdk/src/index.ts (4)
  • ChainMap (741-741)
  • ChainName (742-742)
  • HypTokenRouterConfig (708-708)
  • TokenType (644-644)
typescript/infra/src/config/warp.ts (1)
  • RouterConfigWithoutOwner (84-84)
⏰ 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). (54)
  • GitHub Check: cli-evm-e2e-matrix (core-check)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-send)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
  • GitHub Check: cli-evm-e2e-matrix (warp-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-recovery)
  • GitHub Check: cli-evm-e2e-matrix (relay)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
  • GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-3)
  • GitHub Check: cli-evm-e2e-matrix (warp-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-1)
  • GitHub Check: env-test-matrix (mainnet3, inevm, core)
  • GitHub Check: cli-evm-e2e-matrix (core-init)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, igp)
  • GitHub Check: env-test-matrix (testnet4, sepolia, core)
  • GitHub Check: cli-evm-e2e-matrix (core-deploy)
  • GitHub Check: env-test-matrix (mainnet3, inevm, igp)
  • GitHub Check: env-test-matrix (mainnet3, optimism, igp)
  • GitHub Check: cli-evm-e2e-matrix (core-apply)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, core)
  • GitHub Check: cli-evm-e2e-matrix (core-read)
  • GitHub Check: env-test-matrix (mainnet3, optimism, core)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, igp)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-read)
  • GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-check)
  • GitHub Check: cli-cosmos-e2e-matrix (core-apply)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-read)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
  • GitHub Check: cosmos-sdk-e2e-run
  • GitHub Check: yarn-test-run
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: e2e-matrix (evm)
  • GitHub Check: e2e-matrix (starknet)
  • GitHub Check: e2e-matrix (radix)
  • GitHub Check: lint-prettier
  • GitHub Check: e2e-matrix (cosmosnative)
  • GitHub Check: e2e-matrix (sealevel)
  • GitHub Check: agent-configs (mainnet3)
  • GitHub Check: yarn-install
  • GitHub Check: agent-configs (testnet4)
  • GitHub Check: lint-rs
  • GitHub Check: test-rs
  • GitHub Check: lander-coverage
🔇 Additional comments (7)
typescript/infra/config/environments/mainnet3/warp/warpIds.ts (1)

120-121: LGTM! Clean enum addition.

The new LitchainLITKEY member follows the established naming pattern and fits right in with the other warp route identifiers.

typescript/infra/config/warp.ts (2)

65-65: Good import placement.

The import is positioned alphabetically among the other config getter imports, keepin' things organized.


182-182: Proper wiring into the config map.

The new route is correctly registered in the warpConfigGetterMap, making it accessible through the standard config retrieval flow.

typescript/infra/config/environments/mainnet3/warp/configGetters/getLitLitchainWarpConfig.ts (2)

50-105: Well-structured config builder function.

The function clearly separates collateral, native, and synthetic chain configurations using the utility helpers. The approach is consistent with other warp config getters in the codebase and makes the deployment topology easy to understand.


34-48: Manual verification of Safe wallet addresses required.

The addresses are scoped only to this configuration file and don't create ripple effects elsewhere. However, confirming these are the actual correct Safe multisig wallets will need off-chain verification—checking team records or the addresses on-chain to make sure they line up with reality.

typescript/infra/config/environments/mainnet3/warp/configGetters/utils.ts (2)

106-129: Solid collateral config helper.

This new utility follows the same pattern as the existing synthetic token helper and includes proper assertions for required fields. The generic type constraint ensures type safety across different owner address maps.


148-163: Proper native token config helper.

This helper correctly handles native token configuration by omitting the token field (native tokens don't need a separate contract address) while still including the necessary mailbox and owner fields. Consistent with the pattern established by the other helpers.

@xeno097 xeno097 added this pull request to the merge queue Oct 21, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2025
@xeno097 xeno097 added this pull request to the merge queue Oct 21, 2025
Merged via the queue into main with commit 7ab8d6a Oct 21, 2025
138 of 143 checks passed
@xeno097 xeno097 deleted the xeno/lit-lithcain-deployment branch October 21, 2025 17:49
@github-project-automation github-project-automation Bot moved this from In Review to Done in Hyperlane Tasks Oct 21, 2025
@github-actions github-actions Bot mentioned this pull request Oct 29, 2025
@github-actions github-actions Bot mentioned this pull request Nov 5, 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.

2 participants