--- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -79,7 +79,7 @@ impl SubstrateCli for Cli { // TODO use args fn impl_name() -> String { - "Opal Node".into() + format!("{} Node", runtime::RUNTIME_NAME) } fn impl_version() -> String { @@ -88,10 +88,11 @@ // TODO use args fn description() -> String { format!( - "Opal Node\n\nThe command-line arguments provided first will be \ + "{} Node\n\nThe command-line arguments provided first will be \ passed to the parachain node, while the arguments provided after -- will be passed \ to the relaychain node.\n\n\ {} [parachain-args] -- [relaychain-args]", + runtime::RUNTIME_NAME, Self::executable_name() ) } @@ -121,7 +122,7 @@ impl SubstrateCli for RelayChainCli { // TODO use args fn impl_name() -> String { - "Opal Node".into() + format!("{} Node", runtime::RUNTIME_NAME) } fn impl_version() -> String { @@ -129,11 +130,13 @@ } // TODO use args fn description() -> String { - "Opal Node\n\nThe command-line arguments provided first will be \ + format!( + "{} Node\n\nThe command-line arguments provided first will be \ passed to the parachain node, while the arguments provided after -- will be passed \ to the relaychain node.\n\n\ - parachain-collator [parachain-args] -- [relaychain-args]" - .into() + parachain-collator [parachain-args] -- [relaychain-args]", + runtime::RUNTIME_NAME + ) } fn author() -> String { --- a/runtime/opal/src/lib.rs +++ b/runtime/opal/src/lib.rs @@ -123,6 +123,8 @@ // mod chain_extension; // use crate::chain_extension::{NFTExtension, Imbalance}; +pub const RUNTIME_NAME: &'static str = "Opal"; + pub type CrossAccountId = pallet_common::account::BasicCrossAccountId; /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know --- a/runtime/quartz/src/lib.rs +++ b/runtime/quartz/src/lib.rs @@ -111,6 +111,8 @@ // mod chain_extension; // use crate::chain_extension::{NFTExtension, Imbalance}; +pub const RUNTIME_NAME: &'static str = "Quartz"; + pub type CrossAccountId = pallet_common::account::BasicCrossAccountId; /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know --- a/runtime/unique/src/lib.rs +++ b/runtime/unique/src/lib.rs @@ -111,6 +111,8 @@ // mod chain_extension; // use crate::chain_extension::{NFTExtension, Imbalance}; +pub const RUNTIME_NAME: &'static str = "Unique"; + pub type CrossAccountId = pallet_common::account::BasicCrossAccountId; /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know