From 81b1efb10e134722743c3749f5177fd2c6ffac77 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Thu, 6 Jul 2023 15:58:14 +0800 Subject: [PATCH] Companion of paritytech/substrate#13287 --- runtime/crab/src/lib.rs | 8 ++++++++ runtime/darwinia/src/lib.rs | 8 ++++++++ runtime/pangolin/src/lib.rs | 8 ++++++++ runtime/pangoro/src/lib.rs | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index e4096fb81..26aa1f9a3 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -255,6 +255,14 @@ sp_api::impl_runtime_apis! { fn metadata() -> sp_core::OpaqueMetadata { sp_core::OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index a86063511..e988c9f81 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -256,6 +256,14 @@ sp_api::impl_runtime_apis! { fn metadata() -> sp_core::OpaqueMetadata { sp_core::OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/runtime/pangolin/src/lib.rs b/runtime/pangolin/src/lib.rs index 11381c6a1..3df4f2c11 100644 --- a/runtime/pangolin/src/lib.rs +++ b/runtime/pangolin/src/lib.rs @@ -257,6 +257,14 @@ sp_api::impl_runtime_apis! { fn metadata() -> sp_core::OpaqueMetadata { sp_core::OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/runtime/pangoro/src/lib.rs b/runtime/pangoro/src/lib.rs index 6c3aec5a3..875ea2857 100644 --- a/runtime/pangoro/src/lib.rs +++ b/runtime/pangoro/src/lib.rs @@ -256,6 +256,14 @@ sp_api::impl_runtime_apis! { fn metadata() -> sp_core::OpaqueMetadata { sp_core::OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime {