diff --git a/CHANGELOG.md b/CHANGELOG.md index 0702f37..a5db34d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [14.0.0-rc.3] - 2021-08-31 +### Added +- Add Runtime type to metadata + ## [14.0.0-rc.2] - 2021-08-04 ### Changed Combine Map/NMap/DoubleMap StorageEntryTypes [#23](https://github.com/paritytech/frame-metadata/pull/23) diff --git a/frame-metadata/Cargo.toml b/frame-metadata/Cargo.toml index 03fecff..432f6d1 100644 --- a/frame-metadata/Cargo.toml +++ b/frame-metadata/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-metadata" -version = "14.0.0-rc.2" +version = "14.0.0-rc.3" authors = ["Parity Technologies "] edition = "2018" license = "Apache-2.0" diff --git a/frame-metadata/src/v14.rs b/frame-metadata/src/v14.rs index 8e794fd..878489f 100644 --- a/frame-metadata/src/v14.rs +++ b/frame-metadata/src/v14.rs @@ -50,17 +50,25 @@ pub struct RuntimeMetadataV14 { pub pallets: Vec>, /// Metadata of the extrinsic. pub extrinsic: ExtrinsicMetadata, + /// The type of the `Runtime`. + pub ty: ::Type, } impl RuntimeMetadataV14 { - pub fn new(pallets: Vec, extrinsic: ExtrinsicMetadata) -> Self { + pub fn new( + pallets: Vec, + extrinsic: ExtrinsicMetadata, + runtime_type: MetaType, + ) -> 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); Self { types: registry.into(), pallets, extrinsic, + ty, } } }