Copy v13 metadata from substrate, move new scale-info version to v14 (#12)

* Copy v13 metadata from substrate, move new scale-info version to v14

* Fmt

* Remove common lib types

* Extract decode different types

* Update CI to check v14

* Add Storage NMap to v14

* Bump version

* NMap keys is a Type

* Fix NMap IntoPortable

* Update frame-metadata/src/v13.rs

Co-authored-by: David <dvdplm@gmail.com>

* Remove All the metadata comments

* More clean up of v12 and v13

* review: fix comment

* Fix v13 Debug derives

Co-authored-by: David <dvdplm@gmail.com>
This commit is contained in:
Andrew Jones
2021-05-18 10:33:59 +01:00
committed by GitHub
parent f4b1727ec9
commit 385bbbd82a
7 changed files with 860 additions and 554 deletions
+12
View File
@@ -34,12 +34,18 @@ cfg_if::cfg_if! {
use codec::{Encode, Output};
#[cfg(any(feature = "v12", feature = "v13"))]
pub mod decode_different;
#[cfg(feature = "v12")]
pub mod v12;
#[cfg(feature = "v13")]
pub mod v13;
#[cfg(feature = "v14")]
pub mod v14;
/// Metadata prefixed by a u32 for reserved usage
#[derive(Eq, Encode, PartialEq)]
#[cfg_attr(feature = "std", derive(Decode, Serialize, Debug))]
@@ -93,6 +99,12 @@ pub enum RuntimeMetadata {
/// Version 13 for runtime metadata, as raw encoded bytes.
#[cfg(not(feature = "v13"))]
V13(OpaqueMetadata),
/// Version 14 for runtime metadata.
#[cfg(feature = "v14")]
V14(v14::RuntimeMetadataV14),
/// Version 14 for runtime metadata, as raw encoded bytes.
#[cfg(not(feature = "v14"))]
V14(OpaqueMetadata),
}
/// Stores the encoded `RuntimeMetadata` as raw bytes.