paritytech / paritytech/polkadot-cli
feat: display signed extensions in tx output and inspect command
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-runoutput (after fee estimate)txsubmission output (after status, before events)dot inspect extensionsnew 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()intx.test.ts
Key files
src/core/metadata.ts—getSignedExtensions(), movePAPI_BUILTIN_EXTENSIONSheresrc/commands/tx.ts— categorization, display, output integrationsrc/commands/inspect.ts— extensions virtual targetsrc/core/output.ts— color constants (reuse)
Related: #42
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 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