paritytech / paritytech/polkadot-cli

feat: resolve parachain IDs to human-readable names

Open
#75 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
10
Forks
2
Avg merge
12h 35m
Merged PRs (30d)
4

Description

Problem

Query results that reference parachain IDs (e.g., HRMP channels, XCM messages) show raw numeric IDs like 2034, which are meaningless without cross-referencing external registries.

Proposed Solution

Ship a static registry of well-known parachains:

// src/core/parachain-registry.ts
export const PARACHAIN_NAMES: Record<number, string> = {
  1000: "AssetHub",
  2000: "Acala",
  2004: "Moonbeam",
  2006: "Astar",
  2030: "Bifrost",
  2034: "Hydration",
  2035: "Phala",
  // ...
}
Display rules
  • Pretty output: Annotate IDs inline — sender: 2034 (Hydration)
  • JSON output: Unchanged (raw numeric IDs only) to preserve machine parseability
  • Registry can be extended over time; unknown IDs just show the number without annotation

Priority

LOW

Files

  • src/core/parachain-registry.ts (new)
  • src/core/output.ts (pretty formatter)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the proposed src/core/parachain-registry.ts and the pretty-formatting path in src/core/output.ts. Add the well-known parachain mappings and annotate numeric IDs only in pretty output, while leaving JSON output unchanged. Confirm unknown IDs remain numeric and known IDs display their names.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.