difftreelog
fix wasm runtime version section
in: master
9 files changed
node/cli/Cargo.tomldiffbeforeafterboth--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -108,4 +108,3 @@
runtime-benchmarks = ['opal-runtime/runtime-benchmarks', 'polkadot-cli/runtime-benchmarks', 'polkadot-service/runtime-benchmarks', 'quartz-runtime?/runtime-benchmarks', 'sc-service/runtime-benchmarks', 'unique-runtime?/runtime-benchmarks']
sapphire-runtime = ['quartz-runtime', 'quartz-runtime/become-sapphire']
try-runtime = ['opal-runtime?/try-runtime', 'quartz-runtime?/try-runtime', 'try-runtime-cli/try-runtime', 'unique-runtime?/try-runtime']
-state-version-0 = ['opal-runtime?/state-version-0', 'quartz-runtime?/state-version-0', 'unique-runtime?/state-version-0']
node/cli/src/chain_spec.rsdiffbeforeafterboth--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -281,7 +281,7 @@
// Name
format!(
"{}{}",
- default_runtime::RUNTIME_NAME.to_uppercase(),
+ default_runtime::VERSION.spec_name.to_uppercase(),
if cfg!(feature = "unique-runtime") {
""
} else {
@@ -290,7 +290,7 @@
)
.as_str(),
// ID
- format!("{}_dev", default_runtime::RUNTIME_NAME).as_str(),
+ format!("{}_dev", default_runtime::VERSION.spec_name).as_str(),
ChainType::Local,
move || {
testnet_genesis!(
@@ -355,7 +355,7 @@
// Name
format!(
"{}{}",
- default_runtime::RUNTIME_NAME.to_uppercase(),
+ default_runtime::VERSION.impl_name.to_uppercase(),
if cfg!(feature = "unique-runtime") {
""
} else {
@@ -364,7 +364,7 @@
)
.as_str(),
// ID
- format!("{}_local", default_runtime::RUNTIME_NAME).as_str(),
+ format!("{}_local", default_runtime::VERSION.spec_name).as_str(),
ChainType::Local,
move || {
testnet_genesis!(
runtime/common/config/pallets/mod.rsdiffbeforeafterboth24 weights::CommonWeights,24 weights::CommonWeights,25 RelayChainBlockNumberProvider,25 RelayChainBlockNumberProvider,26 },26 },27 Runtime, RuntimeEvent, RuntimeCall, RUNTIME_NAME, TOKEN_SYMBOL, DECIMALS, Balances,27 Runtime, RuntimeEvent, RuntimeCall, VERSION, TOKEN_SYMBOL, DECIMALS, Balances,28};28};29use frame_support::traits::{ConstU32, ConstU64, Currency};29use frame_support::traits::{ConstU32, ConstU64, Currency};30use up_common::{30use up_common::{909091parameter_types! {91parameter_types! {92 pub const Decimals: u8 = DECIMALS;92 pub const Decimals: u8 = DECIMALS;93 pub Name: String = RUNTIME_NAME.to_string();93 pub Name: String = String::from_utf8_lossy(VERSION.impl_name.as_ref()).to_string();94 pub Symbol: String = TOKEN_SYMBOL.to_string();94 pub Symbol: String = TOKEN_SYMBOL.to_string();95}95}96impl pallet_balances_adapter::Config for Runtime {96impl pallet_balances_adapter::Config for Runtime {runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -64,7 +64,6 @@
'sp-runtime/runtime-benchmarks',
'xcm-builder/runtime-benchmarks',
]
-state-version-0 = []
std = [
'codec/std',
'cumulus-pallet-aura-ext/std',
runtime/opal/src/lib.rsdiffbeforeafterboth--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -43,22 +43,19 @@
pub use runtime_common::*;
-pub const RUNTIME_NAME: &str = "opal";
pub const TOKEN_SYMBOL: &str = "OPL";
pub const DECIMALS: u8 = 18;
/// This runtime version.
+#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
- spec_name: create_runtime_str!(RUNTIME_NAME),
- impl_name: create_runtime_str!(RUNTIME_NAME),
+ spec_name: create_runtime_str!("opal"),
+ impl_name: create_runtime_str!("opal"),
authoring_version: 1,
spec_version: 943060,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
- #[cfg(feature = "state-version-0")]
- state_version: 0,
- #[cfg(not(feature = "state-version-0"))]
state_version: 1,
};
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -60,7 +60,6 @@
'sp-runtime/runtime-benchmarks',
'xcm-builder/runtime-benchmarks',
]
-state-version-0 = []
std = [
'codec/std',
'cumulus-pallet-aura-ext/std',
runtime/quartz/src/lib.rsdiffbeforeafterboth--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -43,25 +43,34 @@
pub use runtime_common::*;
-#[cfg(feature = "become-sapphire")]
-pub const RUNTIME_NAME: &str = "sapphire";
-#[cfg(not(feature = "become-sapphire"))]
-pub const RUNTIME_NAME: &str = "quartz";
pub const TOKEN_SYMBOL: &str = "QTZ";
pub const DECIMALS: u8 = 18;
/// This runtime version.
+#[cfg(not(feature = "become-sapphire"))]
+#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
- spec_name: create_runtime_str!(RUNTIME_NAME),
- impl_name: create_runtime_str!(RUNTIME_NAME),
+ spec_name: create_runtime_str!("quartz"),
+ impl_name: create_runtime_str!("quartz"),
+
+ authoring_version: 1,
+ spec_version: 943060,
+ impl_version: 0,
+ apis: RUNTIME_API_VERSIONS,
+ transaction_version: 3,
+ state_version: 1,
+};
+#[cfg(feature = "become-sapphire")]
+#[sp_version::runtime_version]
+pub const VERSION: RuntimeVersion = RuntimeVersion {
+ spec_name: create_runtime_str!("sapphire"),
+ impl_name: create_runtime_str!("sapphire"),
+
authoring_version: 1,
spec_version: 943060,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
- #[cfg(feature = "state-version-0")]
- state_version: 0,
- #[cfg(not(feature = "state-version-0"))]
state_version: 1,
};
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -58,7 +58,6 @@
'up-data-structs/runtime-benchmarks',
'xcm-builder/runtime-benchmarks',
]
-state-version-0 = []
std = [
'codec/std',
'cumulus-pallet-aura-ext/std',
runtime/unique/src/lib.rsdiffbeforeafterboth--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -43,22 +43,19 @@
pub use runtime_common::*;
-pub const RUNTIME_NAME: &str = "unique";
pub const TOKEN_SYMBOL: &str = "UNQ";
pub const DECIMALS: u8 = 18;
/// This runtime version.
+#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
- spec_name: create_runtime_str!(RUNTIME_NAME),
- impl_name: create_runtime_str!(RUNTIME_NAME),
+ spec_name: create_runtime_str!("unique"),
+ impl_name: create_runtime_str!("unique"),
authoring_version: 1,
spec_version: 943060,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
- #[cfg(feature = "state-version-0")]
- state_version: 0,
- #[cfg(not(feature = "state-version-0"))]
state_version: 1,
};