git.delta.rocks / unique-network / refs/commits / 8297cdded3f9

difftreelog

Fix code style

Daniel Shiposha2022-03-15parent: #8cc39ba.patch.diff
in: master

3 files changed

modifiednode/cli/src/chain_spec.rsdiffbeforeafterboth
before · node/cli/src/chain_spec.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use cumulus_primitives_core::ParaId;18use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};19use sc_service::ChainType;20use sp_core::{sr25519, Pair, Public};21use sp_runtime::traits::{IdentifyAccount, Verify};22use std::collections::BTreeMap;2324use serde::{Deserialize, Serialize};25use serde_json::map::Map;2627use unique_runtime_common::types::*;2829/// The `ChainSpec` parameterized for the unique runtime.30#[cfg(feature = "unique-runtime")]31pub type UniqueChainSpec = sc_service::GenericChainSpec<unique_runtime::GenesisConfig, Extensions>;3233/// The `ChainSpec` parameterized for the quartz runtime.34#[cfg(feature = "quartz-runtime")]35pub type QuartzChainSpec = sc_service::GenericChainSpec<quartz_runtime::GenesisConfig, Extensions>;3637/// The `ChainSpec` parameterized for the opal runtime.38pub type OpalChainSpec = sc_service::GenericChainSpec<opal_runtime::GenesisConfig, Extensions>;3940pub enum RuntimeId {41	Unique,42	Quartz,43	Opal,44	Unknown(String),45}4647pub trait RuntimeIdentification {48	fn runtime_id(&self) -> RuntimeId;49}5051impl RuntimeIdentification for Box<dyn sc_service::ChainSpec> {52	fn runtime_id(&self) -> RuntimeId {53		#[cfg(feature = "unique-runtime")]54		if self.id().starts_with("unique") {55			return RuntimeId::Unique;56		}5758		#[cfg(feature = "quartz-runtime")]59		if self.id().starts_with("quartz") {60			return RuntimeId::Quartz;61		}6263		if self.id().starts_with("opal") || self.id() == "dev" || self.id() == "local_testnet" {64			return RuntimeId::Opal;65		}6667		RuntimeId::Unknown(self.id().into())68	}69}7071pub enum ServiceId {72	Prod,73	Dev74}7576pub trait ServiceIdentification {77	fn service_id(&self) -> ServiceId;78}7980impl ServiceIdentification for Box<dyn sc_service::ChainSpec> {81	fn service_id(&self) -> ServiceId {82		if self.id().ends_with("dev") {83			ServiceId::Dev84		} else {85			ServiceId::Prod86		}87	}88}8990/// Helper function to generate a crypto pair from seed91pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {92	TPublic::Pair::from_string(&format!("//{}", seed), None)93		.expect("static values are valid; qed")94		.public()95}9697/// The extensions for the [`ChainSpec`].98#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]99#[serde(deny_unknown_fields)]100pub struct Extensions {101	/// The relay chain of the Parachain.102	pub relay_chain: String,103	/// The id of the Parachain.104	pub para_id: u32,105}106107impl Extensions {108	/// Try to get the extension from the given `ChainSpec`.109	pub fn try_get(chain_spec: &dyn sc_service::ChainSpec) -> Option<&Self> {110		sc_chain_spec::get_extension(chain_spec.extensions())111	}112}113114type AccountPublic = <Signature as Verify>::Signer;115116/// Helper function to generate an account ID from seed117pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId118where119	AccountPublic: From<<TPublic::Pair as Pair>::Public>,120{121	AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()122}123124pub fn development_config() -> OpalChainSpec {125	let mut properties = Map::new();126	properties.insert("tokenSymbol".into(), "OPL".into());127	properties.insert("tokenDecimals".into(), 15.into());128	properties.insert("ss58Format".into(), 42.into());129130	OpalChainSpec::from_genesis(131		// Name132		"Development",133		// ID134		"dev",135		ChainType::Local,136		move || {137			testnet_genesis(138				// Sudo account139				get_account_id_from_seed::<sr25519::Public>("Alice"),140				vec![141					get_from_seed::<AuraId>("Alice"),142					get_from_seed::<AuraId>("Bob"),143				],144				// Pre-funded accounts145				vec![146					get_account_id_from_seed::<sr25519::Public>("Alice"),147					get_account_id_from_seed::<sr25519::Public>("Bob"),148				],149				1000.into(),150			)151		},152		// Bootnodes153		vec![],154		// Telemetry155		None,156		// Protocol ID157		None,158		None,159		// Properties160		Some(properties),161		// Extensions162		Extensions {163			relay_chain: "rococo-dev".into(),164			para_id: 1000,165		},166	)167}168169pub fn local_testnet_rococo_config() -> OpalChainSpec {170	OpalChainSpec::from_genesis(171		// Name172		"Local Testnet",173		// ID174		"local_testnet",175		ChainType::Local,176		move || {177			testnet_genesis(178				// Sudo account179				get_account_id_from_seed::<sr25519::Public>("Alice"),180				vec![181					get_from_seed::<AuraId>("Alice"),182					get_from_seed::<AuraId>("Bob"),183				],184				// Pre-funded accounts185				vec![186					get_account_id_from_seed::<sr25519::Public>("Alice"),187					get_account_id_from_seed::<sr25519::Public>("Bob"),188					get_account_id_from_seed::<sr25519::Public>("Charlie"),189					get_account_id_from_seed::<sr25519::Public>("Dave"),190					get_account_id_from_seed::<sr25519::Public>("Eve"),191					get_account_id_from_seed::<sr25519::Public>("Ferdie"),192					get_account_id_from_seed::<sr25519::Public>("Alice//stash"),193					get_account_id_from_seed::<sr25519::Public>("Bob//stash"),194					get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),195					get_account_id_from_seed::<sr25519::Public>("Dave//stash"),196					get_account_id_from_seed::<sr25519::Public>("Eve//stash"),197					get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),198				],199				1000.into(),200			)201		},202		// Bootnodes203		vec![],204		// Telemetry205		None,206		// Protocol ID207		None,208		None,209		// Properties210		None,211		// Extensions212		Extensions {213			relay_chain: "rococo-local".into(),214			para_id: 1000,215		},216	)217}218219pub fn local_testnet_westend_config() -> OpalChainSpec {220	OpalChainSpec::from_genesis(221		// Name222		"Local Testnet",223		// ID224		"local_testnet",225		ChainType::Local,226		move || {227			testnet_genesis(228				// Sudo account229				get_account_id_from_seed::<sr25519::Public>("Alice"),230				vec![231					get_from_seed::<AuraId>("Alice"),232					get_from_seed::<AuraId>("Bob"),233					get_from_seed::<AuraId>("Charlie"),234					get_from_seed::<AuraId>("Dave"),235					get_from_seed::<AuraId>("Eve"),236				],237				// Pre-funded accounts238				vec![239					get_account_id_from_seed::<sr25519::Public>("Alice"),240					get_account_id_from_seed::<sr25519::Public>("Bob"),241					get_account_id_from_seed::<sr25519::Public>("Charlie"),242					get_account_id_from_seed::<sr25519::Public>("Dave"),243					get_account_id_from_seed::<sr25519::Public>("Eve"),244					get_account_id_from_seed::<sr25519::Public>("Ferdie"),245					get_account_id_from_seed::<sr25519::Public>("Alice//stash"),246					get_account_id_from_seed::<sr25519::Public>("Bob//stash"),247					get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),248					get_account_id_from_seed::<sr25519::Public>("Dave//stash"),249					get_account_id_from_seed::<sr25519::Public>("Eve//stash"),250					get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),251				],252				1000.into(),253			)254		},255		// Bootnodes256		vec![],257		// Telemetry258		None,259		// Protocol ID260		None,261		None,262		// Properties263		None,264		// Extensions265		Extensions {266			relay_chain: "westend-local".into(),267			para_id: 1000,268		},269	)270}271272fn testnet_genesis(273	root_key: AccountId,274	initial_authorities: Vec<AuraId>,275	endowed_accounts: Vec<AccountId>,276	id: ParaId,277) -> opal_runtime::GenesisConfig {278	use opal_runtime::*;279280	GenesisConfig {281		system: SystemConfig {282			code: WASM_BINARY283				.expect("WASM binary was not build, please build it!")284				.to_vec(),285		},286		balances: BalancesConfig {287			balances: endowed_accounts288				.iter()289				.cloned()290				// 1e13 UNQ291				.map(|k| (k, 1 << 100))292				.collect(),293		},294		treasury: Default::default(),295		sudo: SudoConfig {296			key: Some(root_key),297		},298		vesting: VestingConfig { vesting: vec![] },299		parachain_info: ParachainInfoConfig { parachain_id: id },300		parachain_system: Default::default(),301		aura: AuraConfig {302			authorities: initial_authorities,303		},304		aura_ext: Default::default(),305		evm: EVMConfig {306			accounts: BTreeMap::new(),307		},308		ethereum: EthereumConfig {},309	}310}
after · node/cli/src/chain_spec.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use cumulus_primitives_core::ParaId;18use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};19use sc_service::ChainType;20use sp_core::{sr25519, Pair, Public};21use sp_runtime::traits::{IdentifyAccount, Verify};22use std::collections::BTreeMap;2324use serde::{Deserialize, Serialize};25use serde_json::map::Map;2627use unique_runtime_common::types::*;2829/// The `ChainSpec` parameterized for the unique runtime.30#[cfg(feature = "unique-runtime")]31pub type UniqueChainSpec = sc_service::GenericChainSpec<unique_runtime::GenesisConfig, Extensions>;3233/// The `ChainSpec` parameterized for the quartz runtime.34#[cfg(feature = "quartz-runtime")]35pub type QuartzChainSpec = sc_service::GenericChainSpec<quartz_runtime::GenesisConfig, Extensions>;3637/// The `ChainSpec` parameterized for the opal runtime.38pub type OpalChainSpec = sc_service::GenericChainSpec<opal_runtime::GenesisConfig, Extensions>;3940pub enum RuntimeId {41	Unique,42	Quartz,43	Opal,44	Unknown(String),45}4647pub trait RuntimeIdentification {48	fn runtime_id(&self) -> RuntimeId;49}5051impl RuntimeIdentification for Box<dyn sc_service::ChainSpec> {52	fn runtime_id(&self) -> RuntimeId {53		#[cfg(feature = "unique-runtime")]54		if self.id().starts_with("unique") {55			return RuntimeId::Unique;56		}5758		#[cfg(feature = "quartz-runtime")]59		if self.id().starts_with("quartz") {60			return RuntimeId::Quartz;61		}6263		if self.id().starts_with("opal") || self.id() == "dev" || self.id() == "local_testnet" {64			return RuntimeId::Opal;65		}6667		RuntimeId::Unknown(self.id().into())68	}69}7071pub enum ServiceId {72	Prod,73	Dev,74}7576pub trait ServiceIdentification {77	fn service_id(&self) -> ServiceId;78}7980impl ServiceIdentification for Box<dyn sc_service::ChainSpec> {81	fn service_id(&self) -> ServiceId {82		if self.id().ends_with("dev") {83			ServiceId::Dev84		} else {85			ServiceId::Prod86		}87	}88}8990/// Helper function to generate a crypto pair from seed91pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {92	TPublic::Pair::from_string(&format!("//{}", seed), None)93		.expect("static values are valid; qed")94		.public()95}9697/// The extensions for the [`ChainSpec`].98#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]99#[serde(deny_unknown_fields)]100pub struct Extensions {101	/// The relay chain of the Parachain.102	pub relay_chain: String,103	/// The id of the Parachain.104	pub para_id: u32,105}106107impl Extensions {108	/// Try to get the extension from the given `ChainSpec`.109	pub fn try_get(chain_spec: &dyn sc_service::ChainSpec) -> Option<&Self> {110		sc_chain_spec::get_extension(chain_spec.extensions())111	}112}113114type AccountPublic = <Signature as Verify>::Signer;115116/// Helper function to generate an account ID from seed117pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId118where119	AccountPublic: From<<TPublic::Pair as Pair>::Public>,120{121	AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()122}123124pub fn development_config() -> OpalChainSpec {125	let mut properties = Map::new();126	properties.insert("tokenSymbol".into(), "OPL".into());127	properties.insert("tokenDecimals".into(), 15.into());128	properties.insert("ss58Format".into(), 42.into());129130	OpalChainSpec::from_genesis(131		// Name132		"Development",133		// ID134		"dev",135		ChainType::Local,136		move || {137			testnet_genesis(138				// Sudo account139				get_account_id_from_seed::<sr25519::Public>("Alice"),140				vec![141					get_from_seed::<AuraId>("Alice"),142					get_from_seed::<AuraId>("Bob"),143				],144				// Pre-funded accounts145				vec![146					get_account_id_from_seed::<sr25519::Public>("Alice"),147					get_account_id_from_seed::<sr25519::Public>("Bob"),148				],149				1000.into(),150			)151		},152		// Bootnodes153		vec![],154		// Telemetry155		None,156		// Protocol ID157		None,158		None,159		// Properties160		Some(properties),161		// Extensions162		Extensions {163			relay_chain: "rococo-dev".into(),164			para_id: 1000,165		},166	)167}168169pub fn local_testnet_rococo_config() -> OpalChainSpec {170	OpalChainSpec::from_genesis(171		// Name172		"Local Testnet",173		// ID174		"local_testnet",175		ChainType::Local,176		move || {177			testnet_genesis(178				// Sudo account179				get_account_id_from_seed::<sr25519::Public>("Alice"),180				vec![181					get_from_seed::<AuraId>("Alice"),182					get_from_seed::<AuraId>("Bob"),183				],184				// Pre-funded accounts185				vec![186					get_account_id_from_seed::<sr25519::Public>("Alice"),187					get_account_id_from_seed::<sr25519::Public>("Bob"),188					get_account_id_from_seed::<sr25519::Public>("Charlie"),189					get_account_id_from_seed::<sr25519::Public>("Dave"),190					get_account_id_from_seed::<sr25519::Public>("Eve"),191					get_account_id_from_seed::<sr25519::Public>("Ferdie"),192					get_account_id_from_seed::<sr25519::Public>("Alice//stash"),193					get_account_id_from_seed::<sr25519::Public>("Bob//stash"),194					get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),195					get_account_id_from_seed::<sr25519::Public>("Dave//stash"),196					get_account_id_from_seed::<sr25519::Public>("Eve//stash"),197					get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),198				],199				1000.into(),200			)201		},202		// Bootnodes203		vec![],204		// Telemetry205		None,206		// Protocol ID207		None,208		None,209		// Properties210		None,211		// Extensions212		Extensions {213			relay_chain: "rococo-local".into(),214			para_id: 1000,215		},216	)217}218219pub fn local_testnet_westend_config() -> OpalChainSpec {220	OpalChainSpec::from_genesis(221		// Name222		"Local Testnet",223		// ID224		"local_testnet",225		ChainType::Local,226		move || {227			testnet_genesis(228				// Sudo account229				get_account_id_from_seed::<sr25519::Public>("Alice"),230				vec![231					get_from_seed::<AuraId>("Alice"),232					get_from_seed::<AuraId>("Bob"),233					get_from_seed::<AuraId>("Charlie"),234					get_from_seed::<AuraId>("Dave"),235					get_from_seed::<AuraId>("Eve"),236				],237				// Pre-funded accounts238				vec![239					get_account_id_from_seed::<sr25519::Public>("Alice"),240					get_account_id_from_seed::<sr25519::Public>("Bob"),241					get_account_id_from_seed::<sr25519::Public>("Charlie"),242					get_account_id_from_seed::<sr25519::Public>("Dave"),243					get_account_id_from_seed::<sr25519::Public>("Eve"),244					get_account_id_from_seed::<sr25519::Public>("Ferdie"),245					get_account_id_from_seed::<sr25519::Public>("Alice//stash"),246					get_account_id_from_seed::<sr25519::Public>("Bob//stash"),247					get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),248					get_account_id_from_seed::<sr25519::Public>("Dave//stash"),249					get_account_id_from_seed::<sr25519::Public>("Eve//stash"),250					get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),251				],252				1000.into(),253			)254		},255		// Bootnodes256		vec![],257		// Telemetry258		None,259		// Protocol ID260		None,261		None,262		// Properties263		None,264		// Extensions265		Extensions {266			relay_chain: "westend-local".into(),267			para_id: 1000,268		},269	)270}271272fn testnet_genesis(273	root_key: AccountId,274	initial_authorities: Vec<AuraId>,275	endowed_accounts: Vec<AccountId>,276	id: ParaId,277) -> opal_runtime::GenesisConfig {278	use opal_runtime::*;279280	GenesisConfig {281		system: SystemConfig {282			code: WASM_BINARY283				.expect("WASM binary was not build, please build it!")284				.to_vec(),285		},286		balances: BalancesConfig {287			balances: endowed_accounts288				.iter()289				.cloned()290				// 1e13 UNQ291				.map(|k| (k, 1 << 100))292				.collect(),293		},294		treasury: Default::default(),295		sudo: SudoConfig {296			key: Some(root_key),297		},298		vesting: VestingConfig { vesting: vec![] },299		parachain_info: ParachainInfoConfig { parachain_id: id },300		parachain_system: Default::default(),301		aura: AuraConfig {302			authorities: initial_authorities,303		},304		aura_ext: Default::default(),305		evm: EVMConfig {306			accounts: BTreeMap::new(),307		},308		ethereum: EthereumConfig {},309	}310}
modifiednode/cli/src/command.rsdiffbeforeafterboth
--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -399,7 +399,7 @@
 				let service_id = config.chain_spec.service_id();
 				let relay_chain_id = extensions.map(|e| e.relay_chain.clone());
 				let is_dev_service = matches![service_id, ServiceId::Dev]
-									|| relay_chain_id == Some("dev-service".into());
+					|| relay_chain_id == Some("dev-service".into());
 
 				if is_dev_service {
 					return start_node_using_chain_runtime! {
@@ -421,7 +421,9 @@
 				let para_id = ParaId::from(para_id);
 
 				let parachain_account =
-					AccountIdConversion::<polkadot_primitives::v0::AccountId>::into_account(&para_id);
+					AccountIdConversion::<polkadot_primitives::v0::AccountId>::into_account(
+						&para_id,
+					);
 
 				let state_version =
 					RelayChainCli::native_runtime_version(&config.chain_spec).state_version();
modifiednode/cli/src/service.rsdiffbeforeafterboth
--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -220,7 +220,7 @@
 
 	let select_chain = match service_id {
 		ServiceId::Prod => Some(sc_consensus::LongestChain::new(backend.clone())),
-		ServiceId::Dev => None
+		ServiceId::Dev => None,
 	};
 
 	let transaction_pool = sc_transaction_pool::BasicPool::new_full(
@@ -322,10 +322,11 @@
 
 	let parachain_config = prepare_node_config(parachain_config);
 
-	let params =
-		new_partial::<RuntimeApi, ExecutorDispatch, BIQ>(
-			&parachain_config, build_import_queue, ServiceId::Prod
-		)?;
+	let params = new_partial::<RuntimeApi, ExecutorDispatch, BIQ>(
+		&parachain_config,
+		build_import_queue,
+		ServiceId::Prod,
+	)?;
 	let (mut telemetry, filter_pool, frontier_backend, telemetry_worker_handle, fee_history_cache) =
 		params.other;
 
@@ -364,9 +365,10 @@
 	let subscription_executor = sc_rpc::SubscriptionTaskExecutor::new(task_manager.spawn_handle());
 	let rpc_client = client.clone();
 	let rpc_pool = transaction_pool.clone();
-	let select_chain = params.select_chain
-							.expect("select_chain always exists when running Prod service; qed")
-							.clone();
+	let select_chain = params
+		.select_chain
+		.expect("select_chain always exists when running Prod service; qed")
+		.clone();
 	let rpc_network = network.clone();
 
 	let rpc_frontier_backend = frontier_backend.clone();
@@ -654,14 +656,17 @@
 	config: &Configuration,
 	_: Option<TelemetryHandle>,
 	task_manager: &TaskManager,
-) -> Result<sc_consensus::DefaultImportQueue<Block, FullClient<RuntimeApi, ExecutorDispatch>>, sc_service::Error>
+) -> Result<
+	sc_consensus::DefaultImportQueue<Block, FullClient<RuntimeApi, ExecutorDispatch>>,
+	sc_service::Error,
+>
 where
 	RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, ExecutorDispatch>>
-	+ Send
-	+ Sync
-	+ 'static,
+		+ Send
+		+ Sync
+		+ 'static,
 	RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
-							+ sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>,
+		+ sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>,
 	ExecutorDispatch: NativeExecutionDispatch + 'static,
 {
 	Ok(sc_consensus_manual_seal::import_queue(
@@ -673,8 +678,9 @@
 
 /// Builds a new development service. This service uses instant seal, and mocks
 /// the parachain inherent
-pub fn start_dev_node<Runtime, RuntimeApi, ExecutorDispatch>(config: Configuration)
-	-> sc_service::error::Result<TaskManager>
+pub fn start_dev_node<Runtime, RuntimeApi, ExecutorDispatch>(
+	config: Configuration,
+) -> sc_service::error::Result<TaskManager>
 where
 	Runtime: RuntimeInstance + Send + Sync + 'static,
 	<Runtime as RuntimeInstance>::CrossAccountId: Serialize,
@@ -684,17 +690,17 @@
 		+ Sync
 		+ 'static,
 	RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
-							+ fp_rpc::EthereumRuntimeRPCApi<Block>
-							+ sp_session::SessionKeys<Block>
-							+ sp_block_builder::BlockBuilder<Block>
-							+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
-							+ sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>
-							+ up_rpc::UniqueApi<Block, Runtime::CrossAccountId, AccountId>
-							+ substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>
-							+ sp_api::Metadata<Block>
-							+ sp_offchain::OffchainWorkerApi<Block>
-							+ cumulus_primitives_core::CollectCollationInfo<Block>
-							+ sp_consensus_aura::AuraApi<Block, AuraId>,
+		+ fp_rpc::EthereumRuntimeRPCApi<Block>
+		+ sp_session::SessionKeys<Block>
+		+ sp_block_builder::BlockBuilder<Block>
+		+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
+		+ sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>
+		+ up_rpc::UniqueApi<Block, Runtime::CrossAccountId, AccountId>
+		+ substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>
+		+ sp_api::Metadata<Block>
+		+ sp_offchain::OffchainWorkerApi<Block>
+		+ cumulus_primitives_core::CollectCollationInfo<Block>
+		+ sp_consensus_aura::AuraApi<Block, AuraId>,
 	ExecutorDispatch: NativeExecutionDispatch + 'static,
 {
 	use futures::Stream;
@@ -711,17 +717,11 @@
 		select_chain: maybe_select_chain,
 		transaction_pool,
 		other:
-			(
-				telemetry,
-				filter_pool,
-				frontier_backend,
-				_telemetry_worker_handle,
-				fee_history_cache,
-			),
+			(telemetry, filter_pool, frontier_backend, _telemetry_worker_handle, fee_history_cache),
 	} = new_partial::<RuntimeApi, ExecutorDispatch, _>(
 		&config,
 		dev_build_import_queue::<RuntimeApi, ExecutorDispatch>,
-		ServiceId::Dev
+		ServiceId::Dev,
 	)?;
 
 	let block_data_cache = Arc::new(fc_rpc::EthBlockDataCache::new(
@@ -878,10 +878,12 @@
 			fee_history_limit: 2048,
 		};
 
-		Ok(unique_rpc::create_full::<_, _, _, _, Runtime, RuntimeApi, _>(
-			full_deps,
-			subscription_executor.clone(),
-		))
+		Ok(
+			unique_rpc::create_full::<_, _, _, _, Runtime, RuntimeApi, _>(
+				full_deps,
+				subscription_executor.clone(),
+			),
+		)
 	});
 
 	sc_service::spawn_tasks(sc_service::SpawnTasksParams {