Skip to content

Commit

Permalink
Revert metadata renames
Browse files Browse the repository at this point in the history
Signed-off-by: georgepisaltu <[email protected]>
  • Loading branch information
georgepisaltu committed Nov 24, 2023
1 parent e6c2c24 commit a267c60
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ pub fn expand_runtime_metadata(
.map(|meta| #scrate::__private::metadata_ir::TransactionExtensionMetadataIR {
identifier: meta.identifier,
ty: meta.ty,
implicit: meta.implicit,
additional_signed: meta.additional_signed,
})
.collect(),
},
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/support/test/tests/construct_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ fn test_metadata() {
ty: meta_type::<UncheckedExtrinsic>(),
version: 4,
signed_extensions: vec![SignedExtensionMetadata {
identifier: "UnitSignedExtension",
identifier: "UnitTransactionExtension",
ty: meta_type::<()>(),
additional_signed: meta_type::<()>(),
}],
Expand Down
12 changes: 6 additions & 6 deletions substrate/primitives/metadata-ir/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ impl IntoPortable for ExtrinsicMetadataIR {
}
}

/// Metadata of an extrinsic's transaction extension.
/// Metadata of an extrinsic's signed extension.
#[derive(Clone, PartialEq, Eq, Encode, Debug)]
pub struct TransactionExtensionMetadataIR<T: Form = MetaForm> {
/// The unique transaction extension identifier, which may be different from the type name.
/// The unique signed 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.
/// The type of the signed extension, with the data to be included in the extrinsic.
pub ty: T::Type,
/// The type of the implicit data, with the data to be included in the signed payload.
pub implicit: T::Type,
/// The type of the additional signed data, with the data to be included in the signed payload.
pub additional_signed: T::Type,
}

impl IntoPortable for TransactionExtensionMetadataIR {
Expand All @@ -207,7 +207,7 @@ impl IntoPortable for TransactionExtensionMetadataIR {
TransactionExtensionMetadataIR {
identifier: self.identifier.into_portable(registry),
ty: registry.register_type(&self.ty),
implicit: registry.register_type(&self.implicit),
additional_signed: registry.register_type(&self.additional_signed),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion substrate/primitives/metadata-ir/src/v14.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl From<TransactionExtensionMetadataIR> for SignedExtensionMetadata {
SignedExtensionMetadata {
identifier: ir.identifier,
ty: ir.ty,
additional_signed: ir.implicit,
additional_signed: ir.additional_signed,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion substrate/primitives/metadata-ir/src/v15.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl From<TransactionExtensionMetadataIR> for SignedExtensionMetadata {
SignedExtensionMetadata {
identifier: ir.identifier,
ty: ir.ty,
additional_signed: ir.implicit,
additional_signed: ir.additional_signed,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion substrate/primitives/runtime/src/traits/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ pub trait SignedExtension:
sp_std::vec![TransactionExtensionMetadata {
identifier: Self::IDENTIFIER,
ty: scale_info::meta_type::<Self>(),
implicit: scale_info::meta_type::<Self::AdditionalSigned>()
additional_signed: scale_info::meta_type::<Self::AdditionalSigned>()
}]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub trait TransactionExtensionBase: TransactionExtensionInterior {
identifier: Self::IDENTIFIER,
ty: scale_info::meta_type::<Self>(),
// TODO: Metadata-v16: Rename to "implicit"
implicit: scale_info::meta_type::<Self::Implicit>()
additional_signed: scale_info::meta_type::<Self::Implicit>()
}]
}
}
Expand Down Expand Up @@ -361,7 +361,8 @@ pub struct TransactionExtensionMetadata {
/// The type of the [`TransactionExtension`].
pub ty: MetaType,
/// The type of the [`TransactionExtension`] additional signed data for the payload.
pub implicit: MetaType,
// TODO: Rename "implicit"
pub additional_signed: MetaType,
}

#[impl_for_tuples(1, 12)]
Expand Down

0 comments on commit a267c60

Please sign in to comment.