paritytech / paritytech/polkadot-cli
feat: add `dot info` command for chain identity and properties
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 2
- Avg merge
- 12h 35m
- Merged PRs (30d)
- 4
Description
Parent Epic: #63
Summary
Add an info command that shows chain identity information agents need before doing anything on a chain — token symbol, decimals, SS58 prefix, runtime version.
Usage
dot info --output json
dot info --chain kusama --output json
Output
{
"chain": "polkadot",
"rpc": "wss://rpc.polkadot.io",
"tokenSymbol": "DOT",
"tokenDecimals": 10,
"ss58Prefix": 0,
"specName": "polkadot",
"runtimeVersion": 1003004,
"palletCount": 68
}
Implementation
- Token symbol/decimals:
system_propertiesRPC call - SS58 prefix:
System.SS58Prefixconstant (already queryable) - Runtime version:
state_getRuntimeVersionRPC call or from metadata - Pallet count: from cached metadata via
listPallets() - Register as new command in
cli.ts
Files
src/commands/info.ts— NEW commandsrc/cli.ts— register new command
Verification
- Run
dot info --output jsonon polkadot, kusama, asset hub - Verify all fields are populated and accurate
- Verify
--output prettyproduces readable table
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the new command described for src/commands/info.ts and the command registration in src/cli.ts. Review the listed system_properties and state_getRuntimeVersion RPC calls, the System.SS58Prefix value, and cached metadata from listPallets(). Run dot info --output json and --output pretty against polkadot, kusama, and asset hub; done means all fields are populated and accurate and the pretty output is readable.
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
- 55/100