paritytech / paritytech/polkadot-cli

feat: show key schema and storage details in inspect output

Open
#74 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

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.ts
  • src/core/metadata.ts

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.