1234567891011121314151617use crate::chain_spec;18use crate::cli::Cli;19use crate::service;20use sc_cli::SubstrateCli;21use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;2223impl SubstrateCli for Cli {24 fn impl_name() -> &'static str {25 "Substrate Node"26 }2728 fn impl_version() -> &'static str {29 env!("SUBSTRATE_CLI_IMPL_VERSION")30 }3132 fn description() -> &'static str {33 env!("CARGO_PKG_DESCRIPTION")34 }3536 fn author() -> &'static str {37 env!("CARGO_PKG_AUTHORS")38 }3940 fn support_url() -> &'static str {41 "support.anonymous.an"42 }4344 fn copyright_start_year() -> i32 {45 201746 }4748 fn executable_name() -> &'static str {49 env!("CARGO_PKG_NAME")50 }5152 fn load_spec(&self, id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> {53 Ok(match id {54 "dev" => Box::new(chain_spec::development_config()),55 "" | "local" => Box::new(chain_spec::local_testnet_config()),56 path => Box::new(chain_spec::ChainSpec::from_json_file(57 std::path::PathBuf::from(path),58 )?),59 })60 }61}626364pub fn run() -> sc_cli::Result<()> {65 let cli = Cli::from_args();6667 match &cli.subcommand {68 Some(subcommand) => {69 let runner = cli.create_runner(subcommand)?;70 runner.run_subcommand(subcommand, |config| Ok(new_full_start!(config).0))71 }72 None => {73 let runner = cli.create_runner(&cli.run)?;74 runner.run_node(75 service::new_light,76 service::new_full,77 nft_runtime::VERSION78 )79 }80 }81}