paritytech / paritytech/polkadot-cli
feat: show key schema and storage details in inspect output
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 2
- Avg merge
- 12h 35m
- Merged PRs (30d)
- 4
Description
Problem
polkadot-cli inspect lists storage items but doesn't show their key types, hasher algorithms, or modifiers. Users must consult external docs to understand what arguments a storage query expects.
Proposed Solution
Pallet listing level
Show a compact type annotation next to each storage item:
System
Account map(AccountId32)
BlockHash map(u32)
Events value
Detail level
When inspecting a specific storage item, show additional metadata:
System.Account
Type: Map
Key: AccountId32 (Blake2_128Concat)
Value: AccountInfo
Modifier: Default
Docs: The full account information for a particular account ID.
Implementation
Extend StorageItemInfo in src/core/metadata.ts to include:
- Key type names and hasher types
- Value type name
- Modifier (Optional vs Default)
Update src/commands/inspect.ts to render these fields in pretty output. JSON output should include the raw metadata fields.
Priority
MEDIUM
Files
src/commands/inspect.tssrc/core/metadata.ts
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 by reading src/core/metadata.ts to understand StorageItemInfo, then trace how src/commands/inspect.ts formats pallet and storage-item output. Done means pretty output shows key types, hashers, value type, modifier, and docs at the requested levels, while JSON output includes the raw metadata fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100