mirror of
https://github.com/pezkuwichain/pezframe-metadata.git
synced 2026-04-22 08:57:58 +00:00
Metadata V15: Enrich extrinsic type info for decoding (#56)
* v15/extrinsic: Add extrinsic type info to decode address, call, sig Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * v15/extrinsic: Add extra ty Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * v15/extrinsic: Remove extrinsic ty and add prefix length ty Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * v15/extrinsic: Remove extrinsic len type Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -182,10 +182,16 @@ impl IntoPortable for RuntimeApiMethodParamMetadata {
|
||||
serde(bound(serialize = "T::Type: Serialize, T::String: Serialize"))
|
||||
)]
|
||||
pub struct ExtrinsicMetadata<T: Form = MetaForm> {
|
||||
/// The type of the extrinsic.
|
||||
pub ty: T::Type,
|
||||
/// Extrinsic version.
|
||||
pub version: u8,
|
||||
/// The type of the address that signes the extrinsic
|
||||
pub address_ty: T::Type,
|
||||
/// The type of the outermost Call enum.
|
||||
pub call_ty: T::Type,
|
||||
/// The type of the extrinsic's signature.
|
||||
pub signature_ty: T::Type,
|
||||
/// The type of the outermost Extra enum.
|
||||
pub extra_ty: T::Type,
|
||||
/// The signed extensions in the order they appear in the extrinsic.
|
||||
pub signed_extensions: Vec<SignedExtensionMetadata<T>>,
|
||||
}
|
||||
@@ -195,8 +201,11 @@ impl IntoPortable for ExtrinsicMetadata {
|
||||
|
||||
fn into_portable(self, registry: &mut Registry) -> Self::Output {
|
||||
ExtrinsicMetadata {
|
||||
ty: registry.register_type(&self.ty),
|
||||
version: self.version,
|
||||
address_ty: registry.register_type(&self.address_ty),
|
||||
call_ty: registry.register_type(&self.call_ty),
|
||||
signature_ty: registry.register_type(&self.signature_ty),
|
||||
extra_ty: registry.register_type(&self.extra_ty),
|
||||
signed_extensions: registry.map_into_portable(self.signed_extensions),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user