difftreelog
feat sapphire runtime
in: master
5 files changed
node/cli/Cargo.tomldiffbeforeafterboth--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -335,3 +335,7 @@
'quartz-runtime?/try-runtime',
'opal-runtime?/try-runtime',
]
+sapphire-runtime = [
+ 'opal-runtime',
+ 'opal-runtime/become-sapphire',
+]
node/cli/src/chain_spec.rsdiffbeforeafterboth--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -66,7 +66,7 @@
}
#[cfg(not(feature = "unique-runtime"))]
-/// PARA_ID for Opal/Quartz
+/// PARA_ID for Opal/Sapphire/Quartz
const PARA_ID: u32 = 2095;
#[cfg(feature = "unique-runtime")]
@@ -89,7 +89,11 @@
return RuntimeId::Quartz;
}
- if self.id().starts_with("opal") || self.id() == "dev" || self.id() == "local_testnet" {
+ if self.id().starts_with("opal")
+ || self.id().starts_with("sapphire")
+ || self.id() == "dev"
+ || self.id() == "local_testnet"
+ {
return RuntimeId::Opal;
}
node/cli/src/cli.rsdiffbeforeafterboth--- a/node/cli/src/cli.rs
+++ b/node/cli/src/cli.rs
@@ -101,6 +101,8 @@
"Unique"
} else if cfg!(feature = "quartz-runtime") {
"Quartz"
+ } else if cfg!(feature = "sapphire-runtime") {
+ "Sapphire"
} else {
"Opal"
}
runtime/opal/Cargo.tomldiffbeforeafterboth181 'foreign-assets',181 'foreign-assets',182 'pallet-test-utils',182 'pallet-test-utils',183]183]184become-sapphire = []184185185refungible = []186refungible = []186scheduler = []187scheduler = []runtime/opal/src/lib.rsdiffbeforeafterboth--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -42,7 +42,14 @@
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.
@@ -59,7 +66,16 @@
parameter_types! {
pub const Version: RuntimeVersion = VERSION;
- pub const SS58Prefix: u8 = 42;
+}
+#[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;
}