Skip to content

Commit

Permalink
v16: Remove the runtime type entirely
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
  • Loading branch information
lexnv committed Sep 16, 2024
1 parent ebfdfa9 commit 7c8f1ef
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions frame-metadata/src/v16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use codec::{Compact, Encode};
use scale_info::{
form::{Form, MetaForm, PortableForm},
prelude::{collections::BTreeMap, vec::Vec},
IntoPortable, MetaType, PortableRegistry, Registry,
IntoPortable, PortableRegistry, Registry,
};

pub use super::v14::{StorageEntryModifier, StorageEntryType, StorageHasher};
Expand All @@ -48,8 +48,6 @@ pub struct RuntimeMetadataV16 {
pub pallets: Vec<PalletMetadata<PortableForm>>,
/// Metadata of the extrinsic.
pub extrinsic: ExtrinsicMetadata<PortableForm>,
/// The type of the `Runtime`.
pub ty: <PortableForm as Form>::Type,
/// Metadata of the Runtime API.
pub apis: Vec<RuntimeApiMetadata<PortableForm>>,
/// The outer enums types as found in the runtime.
Expand All @@ -63,15 +61,13 @@ impl RuntimeMetadataV16 {
pub fn new(
pallets: Vec<PalletMetadata>,
extrinsic: ExtrinsicMetadata,
runtime_type: MetaType,
apis: Vec<RuntimeApiMetadata>,
outer_enums: OuterEnums,
custom: CustomMetadata,
) -> Self {
let mut registry = Registry::new();
let pallets = registry.map_into_portable(pallets);
let extrinsic = extrinsic.into_portable(&mut registry);
let ty = registry.register_type(&runtime_type);
let apis = registry.map_into_portable(apis);
let outer_enums = outer_enums.into_portable(&mut registry);
let custom = custom.into_portable(&mut registry);
Expand All @@ -80,7 +76,6 @@ impl RuntimeMetadataV16 {
types: registry.into(),
pallets,
extrinsic,
ty,
apis,
outer_enums,
custom,
Expand Down

0 comments on commit 7c8f1ef

Please sign in to comment.