Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v16: ExtrinsicMetadata extensions #86

Merged
merged 11 commits into from
Nov 12, 2024
Prev Previous commit
Next Next commit
v16: Change extrinsic versions to support multiple extensions
Signed-off-by: Alexandru Vasile <[email protected]>
lexnv committed Nov 6, 2024
commit 7ca3c77d244818b663ef77f6b05bd4c7097e21a2
7 changes: 3 additions & 4 deletions frame-metadata/src/v16.rs
Original file line number Diff line number Diff line change
@@ -186,7 +186,9 @@ impl IntoPortable for RuntimeApiMethodParamMetadata {
)]
pub struct ExtrinsicMetadata<T: Form = MetaForm> {
/// Extrinsic versions.
lexnv marked this conversation as resolved.
Show resolved Hide resolved
pub versions: Vec<u8>,
///
/// For each supported version number, list the indexes, in order, of the extensions used.
pub versions: BTreeMap<u8, Vec<u32>>,
jsdw marked this conversation as resolved.
Show resolved Hide resolved
/// The type of the address that signs the extrinsic
pub address_ty: T::Type,
/// The type of the extrinsic's signature.
@@ -217,8 +219,6 @@ impl IntoPortable for ExtrinsicMetadata {
serde(bound(serialize = "T::Type: Serialize, T::String: Serialize"))
)]
pub struct TransactionExtensionMetadata<T: Form = MetaForm> {
/// Extension version.
pub version: u8,
/// The unique transaction extension identifier, which may be different from the type name.
pub identifier: T::String,
/// The type of the transaction extension, with the data to be included in the extrinsic.
@@ -232,7 +232,6 @@ impl IntoPortable for TransactionExtensionMetadata {

fn into_portable(self, registry: &mut Registry) -> Self::Output {
TransactionExtensionMetadata {
version: self.version,
identifier: self.identifier.into_portable(registry),
ty: registry.register_type(&self.ty),
implicit: registry.register_type(&self.implicit),
Loading