paritytech / paritytech/polkadot-cli

feat: display signed extensions in tx output and inspect command

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

Nobody has claimed this yet.

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

Description

Context

Implements #42 — show which signed extensions are available on a chain and how each is handled when submitting transactions.

Currently the CLI handles signed extensions invisibly. This change surfaces that information in:

  • tx --dry-run output (after fee estimate)
  • tx submission output (after status, before events)
  • dot inspect extensions new sub-command

Plan

1. Move PAPI_BUILTIN_EXTENSIONS to src/core/metadata.ts

Shared between tx.ts and inspect.ts.

2. Add categorizeSignedExtensions() in tx.ts

Classifies each extension as: builtin | user (from --ext) | auto (auto-defaulted) | unknown.
Reuses existing autoDefaultForType() logic.

3. Add printExtensionsSummary() in tx.ts

Displays formatted extension list with color-coded status tags:

  Signed Extensions:
    CheckNonce                builtin
    CheckMortality            builtin
    CustomExtension           auto     (None)
    UserOverride              user     (from --ext)
4. Integrate into both tx output paths
  • dry-run: after estimated fees
  • submission: after status/error, before events
5. Add inspect extensions virtual target

dot inspect extensions lists all extensions with type details (value type, additionalSigned type, builtin tag).
Also adds a hint line in dot inspect pallet listing.

6. Tests
  • Unit tests for categorizeSignedExtensions() in tx.test.ts

Key files

  • src/core/metadata.tsgetSignedExtensions(), move PAPI_BUILTIN_EXTENSIONS here
  • src/commands/tx.ts — categorization, display, output integration
  • src/commands/inspect.ts — extensions virtual target
  • src/core/output.ts — color constants (reuse)

Related: #42

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/core/metadata.ts and its getSignedExtensions() implementation, then read src/commands/tx.ts and src/commands/inspect.ts to trace the existing output paths and autoDefaultForType() logic. Review src/core/output.ts for reusable color constants and tx.test.ts for the unit-test conventions. Done means both tx output paths show categorized extensions and dot inspect extensions lists the requested type details.

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
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.