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.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -181,6 +181,7 @@
'foreign-assets',
'pallet-test-utils',
]
+become-sapphire = []
refungible = []
scheduler = []
runtime/opal/src/lib.rsdiffbeforeafterboth424243pub use runtime_common::*;43pub use runtime_common::*;444445#[cfg(feature = "become-sapphire")]46pub const RUNTIME_NAME: &str = "sapphire";47#[cfg(feature = "become-sapphire")]48pub const TOKEN_SYMBOL: &str = "QTZ";4950#[cfg(not(feature = "become-sapphire"))]45pub const RUNTIME_NAME: &str = "opal";51pub const RUNTIME_NAME: &str = "opal";52#[cfg(not(feature = "become-sapphire"))]46pub const TOKEN_SYMBOL: &str = "OPL";53pub const TOKEN_SYMBOL: &str = "OPL";475448/// This runtime version.55/// This runtime version.57 state_version: 0,64 state_version: 0,58};65};596660parameter_types! {67parameter_types! {61 pub const Version: RuntimeVersion = VERSION;68 pub const Version: RuntimeVersion = VERSION;69}70#[cfg(feature = "become-sapphire")]71parameter_types! {62 pub const SS58Prefix: u8 = 42;72 pub const SS58Prefix: u16 = 8883;73 pub const ChainId: u64 = 8883;74}7576#[cfg(not(feature = "become-sapphire"))]77parameter_types! {78 pub const SS58Prefix: u16 = 42;63 pub const ChainId: u64 = 8882;79 pub const ChainId: u64 = 8882;64}80}658166construct_runtime!(opal);82construct_runtime!(opal);6783