git.delta.rocks / unique-network / refs/commits / 11819bef1c7a

difftreelog

feat sapphire runtime

Alexander Saft2022-11-22parent: #df29d0d.patch.diff
in: master

5 files changed

modifiednode/cli/Cargo.tomldiffbeforeafterboth
335 'quartz-runtime?/try-runtime',335 'quartz-runtime?/try-runtime',
336 'opal-runtime?/try-runtime',336 'opal-runtime?/try-runtime',
337]337]
338sapphire-runtime = [
339 'opal-runtime',
340 'opal-runtime/become-sapphire',
341]
338342
modifiednode/cli/src/chain_spec.rsdiffbeforeafterboth
66}66}
6767
68#[cfg(not(feature = "unique-runtime"))]68#[cfg(not(feature = "unique-runtime"))]
69/// PARA_ID for Opal/Quartz69/// PARA_ID for Opal/Sapphire/Quartz
70const PARA_ID: u32 = 2095;70const PARA_ID: u32 = 2095;
7171
72#[cfg(feature = "unique-runtime")]72#[cfg(feature = "unique-runtime")]
90 }90 }
9191
92 if self.id().starts_with("opal") || self.id() == "dev" || self.id() == "local_testnet" {92 if self.id().starts_with("opal")
93 || self.id().starts_with("sapphire")
94 || self.id() == "dev"
95 || self.id() == "local_testnet"
96 {
modifiednode/cli/src/cli.rsdiffbeforeafterboth
101 "Unique"101 "Unique"
102 } else if cfg!(feature = "quartz-runtime") {102 } else if cfg!(feature = "quartz-runtime") {
103 "Quartz"103 "Quartz"
104 } else {104 } else if cfg!(feature = "sapphire-runtime") {
105 "Sapphire"
106 } else {
105 "Opal"107 "Opal"
106 }108 }
107 }109 }
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
181 'foreign-assets',181 'foreign-assets',
182 'pallet-test-utils',182 'pallet-test-utils',
183]183]
184become-sapphire = []
184185
185refungible = []186refungible = []
186scheduler = []187scheduler = []
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
4242
43pub use runtime_common::*;43pub use runtime_common::*;
4444
45#[cfg(feature = "become-sapphire")]
46pub const RUNTIME_NAME: &str = "sapphire";
47#[cfg(feature = "become-sapphire")]
48pub const TOKEN_SYMBOL: &str = "QTZ";
49
50#[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";
4754
48/// This runtime version.55/// This runtime version.
57 state_version: 0,64 state_version: 0,
58};65};
5966
60parameter_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}
75
76#[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}
6581
66construct_runtime!(opal);82construct_runtime!(opal);
6783