referrerpolicy=no-referrer-when-downgrade

polkadot_omni_node/
main.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Cumulus.
3// SPDX-License-Identifier: Apache-2.0
4
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// 	http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16
17//! White labeled polkadot omni-node.
18//!
19//! For documentation, see [`polkadot_omni_node_lib`].
20
21#![warn(missing_docs)]
22#![warn(unused_extern_crates)]
23
24use polkadot_omni_node_lib::{
25	chain_spec::DiskChainSpecLoader, extra_subcommand::NoExtraSubcommand, run_with_custom_cli,
26	runtime::DefaultRuntimeResolver, CliConfig as CliConfigT, RunConfig, NODE_VERSION,
27};
28
29struct CliConfig;
30
31impl CliConfigT for CliConfig {
32	fn impl_version() -> String {
33		let commit_hash = env!("SUBSTRATE_CLI_COMMIT_HASH");
34		format!("{}-{commit_hash}", NODE_VERSION)
35	}
36
37	fn author() -> String {
38		env!("CARGO_PKG_AUTHORS").into()
39	}
40
41	fn support_url() -> String {
42		"https://github.com/paritytech/polkadot-sdk/issues/new".into()
43	}
44
45	fn copyright_start_year() -> u16 {
46		2017
47	}
48}
49
50fn main() -> color_eyre::eyre::Result<()> {
51	color_eyre::install()?;
52	let config = RunConfig::new(Box::new(DefaultRuntimeResolver), Box::new(DiskChainSpecLoader));
53	Ok(run_with_custom_cli::<CliConfig, NoExtraSubcommand>(config)?)
54}