paritytech / paritytech/polkadot-cli

feat: list and describe pallet calls/extrinsics in inspect command

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

Summary

dot inspect currently only shows storage items and constants for a pallet. It should also list and describe pallet calls/extrinsics, which are arguably the most important metadata for users building transactions.

PalletInfo.calls already exists in metadata (src/core/metadata.ts:15) but inspect.ts never displays it — lines 56-98 only show storage + constants, lines 108-142 only search storage + constants.

Motivation

Users need to discover which calls a pallet exposes and what arguments they take before constructing a dot tx command. Currently they must use external tools (Subscan, Polkadot.js Apps) to find this information, defeating the purpose of an integrated CLI.

Proposed Changes

  • src/commands/inspect.ts:
    • Add calls count to pallet overview (alongside storage and constants counts)
    • Add "Calls:" section listing all calls with their argument signatures
    • Add call search at item-detail level (e.g. dot inspect Balances.transfer_allow_death)
    • Include calls in the fuzzy suggestion list for typos
  • src/commands/inspect.test.ts: Test calls listing and individual call detail

Related Issues

  • #54 (tx browsing) — complementary, not duplicative. #54 is about interactive browsing in dot tx; this is about inspect.
  • #74 (storage details in inspect) — same file, different sections.

Priority

P1 — Unblocks discoverability for everything else. Quick win (size S).

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 src/commands/inspect.ts, especially the overview and search sections at lines 56-98 and 108-142, and review PalletInfo.calls in src/core/metadata.ts. Add call counts, argument signatures, detail lookup, and fuzzy suggestions, then run the related tests in src/commands/inspect.test.ts to verify listing and individual call details.

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
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.