git.delta.rocks / unique-network / refs/commits / b9c463cad09c

difftreelog

feat move sapphire to quartz

Yaroslav Bolyukin2022-12-28parent: #3c2e49b.patch.diff
in: master

5 files changed

modifiednode/cli/Cargo.tomldiffbeforeafterboth
--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -340,7 +340,7 @@
     'opal-runtime?/try-runtime',
     'try-runtime-cli/try-runtime',
 ]
-sapphire-runtime = ['opal-runtime', 'opal-runtime/become-sapphire']
+sapphire-runtime = ['quartz-runtime', 'quartz-runtime/become-sapphire']
 pov-estimate = [
     'unique-runtime?/pov-estimate',
     'quartz-runtime?/pov-estimate',
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -44,7 +44,7 @@
     'sp-runtime/runtime-benchmarks',
     'xcm-builder/runtime-benchmarks',
     'pallet-maintenance/runtime-benchmarks',
-    'cumulus-pallet-parachain-system/runtime-benchmarks'
+    'cumulus-pallet-parachain-system/runtime-benchmarks',
 ]
 try-runtime = [
     'frame-try-runtime',
@@ -185,7 +185,6 @@
     'foreign-assets',
     'pallet-test-utils',
 ]
-become-sapphire = []
 pov-estimate = []
 
 refungible = []
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -44,14 +44,7 @@
 
 pub use runtime_common::*;
 
-#[cfg(feature = "become-sapphire")]
-pub const RUNTIME_NAME: &str = "sapphire";
-#[cfg(feature = "become-sapphire")]
-pub const TOKEN_SYMBOL: &str = "QTZ";
-
-#[cfg(not(feature = "become-sapphire"))]
 pub const RUNTIME_NAME: &str = "opal";
-#[cfg(not(feature = "become-sapphire"))]
 pub const TOKEN_SYMBOL: &str = "OPL";
 
 /// This runtime version.
@@ -68,15 +61,6 @@
 
 parameter_types! {
 	pub const Version: RuntimeVersion = VERSION;
-}
-#[cfg(feature = "become-sapphire")]
-parameter_types! {
-	pub const SS58Prefix: u16 = 8883;
-	pub const ChainId: u64 = 8883;
-}
-
-#[cfg(not(feature = "become-sapphire"))]
-parameter_types! {
 	pub const SS58Prefix: u16 = 42;
 	pub const ChainId: u64 = 8882;
 }
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
171]171]
172limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']172limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
173quartz-runtime = ['refungible', 'app-promotion', 'foreign-assets']173quartz-runtime = ['refungible', 'app-promotion', 'foreign-assets']
174become-sapphire = []
174pov-estimate = []175pov-estimate = []
175176
176refungible = []177refungible = []
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -44,6 +44,9 @@
 
 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";
 
@@ -61,6 +64,15 @@
 
 parameter_types! {
 	pub const Version: RuntimeVersion = VERSION;
+}
+#[cfg(feature = "become-sapphire")]
+parameter_types! {
+	pub const SS58Prefix: u16 = 8883;
+	pub const ChainId: u64 = 8883;
+}
+
+#[cfg(not(feature = "become-sapphire"))]
+parameter_types! {
 	pub const SS58Prefix: u8 = 255;
 	pub const ChainId: u64 = 8881;
 }