Skip to content

Prep v0.17.0 release: add methods for encoding extrinsics and related data#87

Merged
jsdw merged 12 commits intomainfrom
jsdw-extrinsic-encoding
Feb 13, 2026
Merged

Prep v0.17.0 release: add methods for encoding extrinsics and related data#87
jsdw merged 12 commits intomainfrom
jsdw-extrinsic-encoding

Conversation

@jsdw
Copy link
Collaborator

@jsdw jsdw commented Feb 10, 2026

This PR adds the necessary methods to allow users to encode v4 and v5 unsigned and signed extrinsics, signer payloads and call data. It also adds TransactionExtension traits and handles the logic of selecting which transaction extensions to use, and extends ExtrinsicTypeInfo (and impls of this) as needed to make this all work.

The aim here is to make extrinsic encoding logic available in no-std contexts, and to get all of the logic for encoding and decoding storage/constants/runtime APIs/view functions/extrinsics in one place. Everything else was already in this crate, and with this extrinsic encode logic we complete the set.

Note: Subxt has been updated locally to work with this PR in subxt#2177 and as such we've tested the APIs (at least insofar as they are/were tested in Subxt) and verified that we have what we need.

Note 2: As always, it would be good to get more testing moved to this crate. It's just typically been easier to do it in the Subxt crate since Subxt makes it easy to run E2E tests against some node to test things. See #2 for ideas on how to better test this crate.

@jsdw jsdw changed the title Add extrinsic encode logic Prep v0.17.0 release: Add methods for encoding extrinsics and related data Feb 12, 2026
@jsdw jsdw changed the title Prep v0.17.0 release: Add methods for encoding extrinsics and related data Prep v0.17.0 release: add methods for encoding extrinsics and related data Feb 12, 2026
@jsdw jsdw requested a review from Copilot February 12, 2026 16:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prepares the v0.17.0 release by adding no-std-capable extrinsic encoding APIs (V4 and V5) to frame_decode::extrinsics, including signer payload construction and a new transaction extensions abstraction that selects appropriate extension versions from metadata.

Changes:

  • Add extrinsic_encoder module with APIs to encode V4 unsigned/signed extrinsics, V5 bare/general extrinsics, and V4/V5 signer payloads.
  • Introduce TransactionExtension / TransactionExtensions traits and integrate extension-version selection via metadata.
  • Extend ExtrinsicTypeInfo to support call lookup by name and to expose available transaction-extension versions; bump crate to 0.17.0.

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/methods/extrinsic_encoder.rs New core implementation for encoding extrinsics, signer payloads, and call data.
src/methods/extrinsic_encoder/transaction_extension.rs Defines the per-extension encoding trait used by encoders.
src/methods/extrinsic_encoder/transaction_extensions.rs Tuple-based aggregation and dispatch for sets of extensions.
src/methods/extrinsic_type_info.rs Extends metadata-derived type info to support encoding needs (lookup by name, extension versions, implicits).
src/methods/extrinsic_decoder.rs Updates decoder to use renamed call-info lookup by index.
src/lib.rs Re-exports the new extrinsic encoding APIs from frame_decode::extrinsics.
src/methods/mod.rs Wires the new extrinsic_encoder module into the crate.
src/utils.rs / src/utils/type_registry_from_metadata.rs Adjust legacy gating to be module-level (avoids per-item cfg clutter).
src/methods/storage_type_info.rs Moves alloc::format import into legacy submodule.
Cargo.toml / Cargo.lock Bumps crate version to 0.17.0.
CHANGELOG.md Adds 0.17.0 entry describing the new encoding APIs.
.gitignore Ignores .claude.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jsdw jsdw merged commit bb75a49 into main Feb 13, 2026
9 checks passed
@jsdw jsdw deleted the jsdw-extrinsic-encoding branch February 13, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant