Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v16: Add unstable metadata v16 #82

Merged
merged 7 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions frame-metadata/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ pub mod v14;
#[cfg(feature = "current")]
pub mod v15;

/// Unstable Metadata v16
#[cfg(feature = "unstable")]
pub mod v16;

/// Metadata prefix.
pub const META_RESERVED: u32 = 0x6174656d; // 'meta' warning for endianness.

Expand Down Expand Up @@ -161,6 +165,12 @@ pub enum RuntimeMetadata {
/// Version 15 for runtime metadata, as raw encoded bytes.
#[cfg(not(feature = "current"))]
V15(OpaqueMetadata),
/// Version 16 for runtime metadata.
#[cfg(feature = "unstable")]
V16(v16::RuntimeMetadataV16),
/// Version 16 for runtime metadata, as raw encoded bytes.
#[cfg(not(feature = "unstable"))]
V16(OpaqueMetadata),
}

impl RuntimeMetadata {
Expand All @@ -183,6 +193,7 @@ impl RuntimeMetadata {
RuntimeMetadata::V13(_) => 13,
RuntimeMetadata::V14(_) => 14,
RuntimeMetadata::V15(_) => 15,
RuntimeMetadata::V16(_) => u32::MAX,
}
}
}
Expand Down
Loading
Loading