Skip to content

Conversation

pwnfoo
Copy link

@pwnfoo pwnfoo commented Aug 18, 2025

Description

This PR adds the chain metadata, addresses and warp route for Nym.

Backward compatibility

Yes

Testing

Summary by CodeRabbit

  • New Features

    • Added Nym chain configuration (chain ID, native token, fees, explorers, RPC/REST/gRPC endpoints, indexing) and core addresses to enable messaging and security integrations.
    • Added cross-chain warp routes and token mappings for NYM between BSC and Nym, plus a BSC deployment configuration with multisig security settings.
  • Chores

    • Bumped registry package version to include the new chain and warp route data.

Copy link

changeset-bot bot commented Aug 18, 2025

🦋 Changeset detected

Latest commit: 03afdf0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hyperlane-xyz/registry Minor

Not sure what this means? Click here to learn what changesets are.

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

Copy link
Contributor

coderabbitai bot commented Aug 18, 2025

📝 Walkthrough

Walkthrough

Adds Nym chain metadata and addresses, plus warp-route token and deployment configs for BSC↔NYM, and a changeset bumping @hyperlane-xyz/registry to include the new chain data and mappings.

Changes

Cohort / File(s) Summary of Changes
Changeset
.changeset/fresh-sloths-tan.md
Adds a changeset bumping @hyperlane-xyz/registry minor version with note: "add nym chain metadata, addresses and warp route".
Nym chain metadata & addresses
chains/nym/metadata.yaml, chains/nym/addresses.yaml
Adds a Cosmos-native Nym chain entry (chainId: nyx, bech32 n, native denom unym) with endpoints (grpc/rest/rpc), explorers, token/fee and indexing config; adds five address keys: mailbox, interchainSecurityModule, interchainGasPaymaster, merkleTreeHook, validatorAnnounce.
Warp routes — token mapping
deployments/warp_routes/NYM/bsc-nym-config.yaml
Introduces NYM warp-route token mapping between BSC token 0x31d0...b3f8 and NYM cosmos identifier, with logos, standards (EvmHypSynthetic / CosmosNativeHypCollateral), decimals and CoinGecko id.
Warp routes — BSC deployment
deployments/warp_routes/NYM/bsc-nym-deploy.yaml
Adds BSC deployment config for NYM synthetic: owner, symbol, type synthetic, multisig ISM modules (merkleRootMultisigIsm, messageIdMultisigIsm) with validators and thresholds, and foreignDeployment pointing to NYM native.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Client
  participant Registry
  participant NymChain as Nym (RPC/REST/GRPC)
  participant BSC as BSC Network

  Client->>Registry: Request chain list / metadata for "nym"
  Registry-->>Client: Return metadata, endpoints, addresses (mailbox, ISM, IGP, hook, announce)

  alt Cross-chain warp-route flow
    Client->>BSC: Initiate warp-route action (mint/burn) for NYM
    BSC->>Registry: Resolve token mapping (bsc ↔ nym)
    BSC->>NymChain: Relay via warp-route foreignDeployment / mailbox / ISM
    NymChain-->>BSC: Confirm cross-chain result
    BSC-->>Client: Finalize action
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • paulbalaji
  • Mo-Hussain
  • xeno097

Poem

In marshy files a new chain wakes,
Nym tiptoes in on digital lakes.
Addresses planted, routes set to roam,
Validators hum—this registry's home.
A gentle bump, and off we go. 🐸✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 908e42f and 016fadf.

⛔ Files ignored due to path filters (1)
  • deployments/warp_routes/NYM/logo.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • .changeset/fresh-sloths-tan.md (1 hunks)
  • deployments/warp_routes/NYM/bsc-nym-config.yaml (1 hunks)
  • deployments/warp_routes/NYM/bsc-nym-deploy.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .changeset/fresh-sloths-tan.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • deployments/warp_routes/NYM/bsc-nym-config.yaml
  • deployments/warp_routes/NYM/bsc-nym-deploy.yaml
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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
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: 2

🧹 Nitpick comments (1)
chains/nym/addresses.yaml (1)

1-5: Minor: add short comments explaining the address derivations

These look like deterministic module IDs (e.g., 'router_ism', 'hyperlane', 'router_post_dispatch', etc.) padded to 32 bytes. A tiny breadcrumb helps the next ogre through the swamp.

Example:

-interchainGasPaymaster: "0x726f757465725f706f73745f6469737061746368000000040000000000000001"
+interchainGasPaymaster: "0x726f757465725f706f73745f6469737061746368000000040000000000000001" # "router_post_dispatch" v1
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 89d9a71 and e48bf66.

⛔ Files ignored due to path filters (1)
  • chains/nym/logo.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • .changeset/fresh-sloths-tan.md (1 hunks)
  • chains/nym/addresses.yaml (1 hunks)
  • chains/nym/metadata.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-23T21:28:47.407Z
Learnt from: xeno097
PR: hyperlane-xyz/hyperlane-registry#788
File: chains/unichain/metadata.yaml:3-4
Timestamp: 2025-07-23T21:28:47.407Z
Learning: In the hyperlane-registry repository, API keys in chain metadata YAML files (like in chains/*/metadata.yaml) are intended for public usage and are not sensitive credentials that need to be hidden.

Applied to files:

  • .changeset/fresh-sloths-tan.md
🔇 Additional comments (7)
.changeset/fresh-sloths-tan.md (1)

1-5: Changeset looks good for a minor bump

Scope and description match the PR intent. No blockers here.

chains/nym/metadata.yaml (5)

23-24: Domain ID derivation matches 'NYM' ASCII

The comment and value line up (0x4e594d → 5134669). Looks tidy.


31-34: Confirm index.from height

Starting at 19,500,000 is fine if that’s at/before first Hyperlane activity on Nyx. Worth a quick check to avoid missing earlier events.

If you have an events height handy (mailbox/validator announce), confirm it’s <= 19,500,000. I can script a scan against your REST/RPC if you want.


41-41: Protocol/stack fields look consistent

cosmosnative + other is acceptable here. No action needed.


18-18: Contract address length setting aligns with 32-byte values

Matches the 32-byte hex in addresses.yaml. All good.


29-47: All endpoints healthy and reporting “nyx” chain-id

Nice one—every REST and RPC endpoint replied with network "nyx". No swampy surprises here, we’re good to go.

chains/nym/addresses.yaml (1)

3-5: Mailbox and ValidatorAnnounce share the same address — intentional?

Both resolve to the same 32-byte value. If the Nym router intentionally multiplexes these under one module/account, all good; otherwise this smells off.

Can you confirm they should be identical on Nyx? If not, please provide the distinct values and I’ll suggest the patch.

@pwnfoo
Copy link
Author

pwnfoo commented Aug 18, 2025

Can you also please help update the default ISM on BSC to support NYM?

@pwnfoo pwnfoo changed the title feat: add nym chain metadata and addresses feat: add nym chain metadata, addresses and warp route Aug 20, 2025
Copy link
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 (3)
deployments/warp_routes/NYM/bsc-nym-config.yaml (1)

3-11: Align token name casing and verify decimals on BSC token

Looks good overall. Two small bits to keep our boots clean:

  • The display name should likely be "Nym" (proper noun) while symbol stays "NYM".
  • Please confirm the BSC token at 0x31d0E332... is indeed 6 decimals on-chain.

Apply this tiny casing tweak:

-    name: NYM
+    name: Nym

And give a quick thumbs-up that the ERC-20 reports 6 decimals; mismatch here will lead to UI confusion and cross-chain rounding headaches.

deployments/warp_routes/NYM/bsc-nym-deploy.yaml (2)

7-21: Aggregation ISM threshold: confirm intent (1-of-2 vs 2-of-2)

The staticAggregationIsm uses two modules and threshold: 1, which accepts either module. If the security policy expects both Merkle root and message ID proofs to pass, bump threshold to 2. If 1-of-2 is intentional (to accept either prover), we’re all good.

Proposed change if you want both modules required:

-        threshold: 1
+        threshold: 2

7-18: Optional DRY: reuse the validator list with YAML anchors

Same validator set listed twice; anchors keep things tidy if you expect updates later.

Example refactor:

 bsc:
   interchainSecurityModule:
     domains:
       nym:
+        validators: &nym_validators
+          - "0x14588d90308e801564f7b222b78309154004ce22"
+          - "0x390757ed58f94b57fdc59ebd72d939280af2d0d9"
+          - "0xc7bc176dc2e8d1ee298f8cda962d7de711b11097"
         modules:
           - threshold: 2
             type: merkleRootMultisigIsm
-            validators:
-              - "0x14588d90308e801564f7b222b78309154004ce22"
-              - "0x390757ed58f94b57fdc59ebd72d939280af2d0d9"
-              - "0xc7bc176dc2e8d1ee298f8cda962d7de711b11097"
+            validators: *nym_validators
           - threshold: 2
             type: messageIdMultisigIsm
-            validators:
-              - "0x14588d90308e801564f7b222b78309154004ce22"
-              - "0x390757ed58f94b57fdc59ebd72d939280af2d0d9"
-              - "0xc7bc176dc2e8d1ee298f8cda962d7de711b11097"
+            validators: *nym_validators
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e48bf66 and 908e42f.

⛔ Files ignored due to path filters (1)
  • deployments/warp_routes/NYM/logo.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • deployments/warp_routes/NYM/bsc-nym-config.yaml (1 hunks)
  • deployments/warp_routes/NYM/bsc-nym-deploy.yaml (1 hunks)
🔇 Additional comments (6)
deployments/warp_routes/NYM/bsc-nym-config.yaml (3)

8-8: Logo asset verification passed

The file deployments/warp_routes/NYM/logo.svg is present in the repository, so there’s no risk of a missing-asset puddle at runtime. All references on lines 8 and 18 are valid.


10-10: Standards enum validated
Aye, both EvmHypSynthetic and CosmosNativeHypCollateral show up in deployments/warp_routes/schema.json (lines 28 & 50). No schema grumbles ahead—good to go.


5-6: Token namespace prefix consistency confirmed

All clear—no evm| lurking in the swamp, and ethereum| is used consistently (2,523 hits) as the token prefix. No action needed.

deployments/warp_routes/NYM/bsc-nym-deploy.yaml (3)

29-29: Owner bech32 prefix aligns with chain metadata

  • chains/nym/metadata.yaml (line 2): bech32Prefix: n
  • deployments/warp_routes/NYM/bsc-nym-deploy.yaml (line 29): owner: n1gqrycg899c6hq7upy6508tcnp4j0rfvxcyjmtn

The owner address starts with n1, matching the HRP n. No changes needed here—all good!


10-12: Validators match Nym ISM endpoint

All three addresses declared in deployments/warp_routes/NYM/bsc-nym-deploy.yaml (lines 10–12 & 16–18) line up exactly with the Nym ISM response—none got lost in the swamp. Good to go!

  • File: deployments/warp_routes/NYM/bsc-nym-deploy.yaml
    Lines: 10–12, 16–18

3-23: Update BSC Default ISM to Support NYM

I scanned the repo and didn’t find any chain-level defaultFallbackRoutingIsm for BSC that lists nym under its domains. Without that, other routes relying on the BSC default ISM won’t pick up NYM.

Please double-check and update your global BSC ISM config (for example, in chains/addresses.yaml or wherever the chain-level defaultFallbackRoutingIsm is defined) by adding a nym entry under domains, mirroring what you’ve done in deployments/warp_routes/NYM/bsc-nym-deploy.yaml.
That will ensure all apps using the BSC default ISM will automatically route NYM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant