git.delta.rocks / unique-network / refs/commits / 23712510829a

difftreelog

cargo fmt

Daniel Shiposha2022-08-09parent: #2a76b29.patch.diff
in: master

18 files changed

modifiedcommon-types/src/lib.rsdiffbeforeafterboth
--- a/common-types/src/lib.rs
+++ b/common-types/src/lib.rs
@@ -17,8 +17,9 @@
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use sp_runtime::{
-    generic,
-	traits::{Verify, IdentifyAccount}, MultiSignature,
+	generic,
+	traits::{Verify, IdentifyAccount},
+	MultiSignature,
 };
 
 /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know
@@ -26,33 +27,29 @@
 /// of data like extrinsics, allowing for them to continue syncing the network through upgrades
 /// to even the core data structures.
 pub mod opaque {
-    pub use sp_runtime::{
-        generic,
-        traits::BlakeTwo256,
-        OpaqueExtrinsic as UncheckedExtrinsic
-    };
+	pub use sp_runtime::{generic, traits::BlakeTwo256, OpaqueExtrinsic as UncheckedExtrinsic};
 
 	pub use super::{BlockNumber, Signature, AccountId, Balance, Index, Hash, AuraId};
 
-    /// Opaque block header type.
-    pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
+	/// Opaque block header type.
+	pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
 
-    /// Opaque block type.
-    pub type Block = generic::Block<Header, UncheckedExtrinsic>;
+	/// Opaque block type.
+	pub type Block = generic::Block<Header, UncheckedExtrinsic>;
 
-    pub trait RuntimeInstance {
-        type CrossAccountId: pallet_evm::account::CrossAccountId<sp_runtime::AccountId32>
-            + Send
-            + Sync
-            + 'static;
+	pub trait RuntimeInstance {
+		type CrossAccountId: pallet_evm::account::CrossAccountId<sp_runtime::AccountId32>
+			+ Send
+			+ Sync
+			+ 'static;
 
-        type TransactionConverter: fp_rpc::ConvertTransaction<UncheckedExtrinsic>
-            + Send
-            + Sync
-            + 'static;
+		type TransactionConverter: fp_rpc::ConvertTransaction<UncheckedExtrinsic>
+			+ Send
+			+ Sync
+			+ 'static;
 
-        fn get_transaction_converter() -> Self::TransactionConverter;
-    }
+		fn get_transaction_converter() -> Self::TransactionConverter;
+	}
 }
 
 pub type SessionHandlers = ();
modifiednode/rpc/src/lib.rsdiffbeforeafterboth
before · node/rpc/src/lib.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 sp_runtime::traits::BlakeTwo256;18use fc_rpc::{19	EthBlockDataCacheTask, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override,20	StorageOverride, SchemaV2Override, SchemaV3Override,21};22use jsonrpsee::RpcModule;23use fc_rpc_core::types::{FilterPool, FeeHistoryCache};24use fp_storage::EthereumStorageSchema;25use sc_client_api::{26	backend::{AuxStore, StorageProvider},27	client::BlockchainEvents,28	StateBackend, Backend,29};30use sc_finality_grandpa::{31	FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState,32};33use sc_network::NetworkService;34use sc_rpc::SubscriptionTaskExecutor;35pub use sc_rpc_api::DenyUnsafe;36use sc_transaction_pool::{ChainApi, Pool};37use sp_api::ProvideRuntimeApi;38use sp_block_builder::BlockBuilder;39use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};40use sc_service::TransactionPool;41use std::{collections::BTreeMap, sync::Arc};4243use common_types::opaque::{44	Hash, AccountId, RuntimeInstance, Index, Block, BlockNumber, Balance,45};4647// RMRK48use up_data_structs::{49	RmrkCollectionInfo, RmrkInstanceInfo, RmrkResourceInfo, RmrkPropertyInfo, RmrkBaseInfo,50	RmrkPartType, RmrkTheme,51};5253/// Extra dependencies for GRANDPA54pub struct GrandpaDeps<B> {55	/// Voting round info.56	pub shared_voter_state: SharedVoterState,57	/// Authority set info.58	pub shared_authority_set: SharedAuthoritySet<Hash, BlockNumber>,59	/// Receives notifications about justification events from Grandpa.60	pub justification_stream: GrandpaJustificationStream<Block>,61	/// Executor to drive the subscription manager in the Grandpa RPC handler.62	pub subscription_executor: SubscriptionTaskExecutor,63	/// Finality proof provider.64	pub finality_provider: Arc<FinalityProofProvider<B, Block>>,65}6667/// Full client dependencies.68pub struct FullDeps<C, P, SC, CA: ChainApi> {69	/// The client instance to use.70	pub client: Arc<C>,71	/// Transaction pool instance.72	pub pool: Arc<P>,73	/// Graph pool instance.74	pub graph: Arc<Pool<CA>>,75	/// The SelectChain Strategy76	pub select_chain: SC,77	/// The Node authority flag78	pub is_authority: bool,79	/// Whether to enable dev signer80	pub enable_dev_signer: bool,81	/// Network service82	pub network: Arc<NetworkService<Block, Hash>>,83	/// Whether to deny unsafe calls84	pub deny_unsafe: DenyUnsafe,85	/// EthFilterApi pool.86	pub filter_pool: Option<FilterPool>,87	/// Backend.88	pub backend: Arc<fc_db::Backend<Block>>,89	/// Maximum number of logs in a query.90	pub max_past_logs: u32,91	/// Maximum fee history cache size.92	pub fee_history_limit: u64,93	/// Fee history cache.94	pub fee_history_cache: FeeHistoryCache,95	/// Cache for Ethereum block data.96	pub block_data_cache: Arc<EthBlockDataCacheTask<Block>>,97}9899pub fn overrides_handle<C, BE, R>(client: Arc<C>) -> Arc<OverrideHandle<Block>>100where101	C: ProvideRuntimeApi<Block> + StorageProvider<Block, BE> + AuxStore,102	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError>,103	C: Send + Sync + 'static,104	C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,105	C::Api: up_rpc::UniqueApi<Block, <R as RuntimeInstance>::CrossAccountId, AccountId>,106	BE: Backend<Block> + 'static,107	BE::State: StateBackend<BlakeTwo256>,108	R: RuntimeInstance + Send + Sync + 'static,109{110	let mut overrides_map = BTreeMap::new();111	overrides_map.insert(112		EthereumStorageSchema::V1,113		Box::new(SchemaV1Override::new(client.clone()))114			as Box<dyn StorageOverride<_> + Send + Sync>,115	);116	overrides_map.insert(117		EthereumStorageSchema::V2,118		Box::new(SchemaV2Override::new(client.clone()))119			as Box<dyn StorageOverride<_> + Send + Sync>,120	);121	overrides_map.insert(122		EthereumStorageSchema::V3,123		Box::new(SchemaV3Override::new(client.clone()))124			as Box<dyn StorageOverride<_> + Send + Sync>,125	);126127	Arc::new(OverrideHandle {128		schemas: overrides_map,129		fallback: Box::new(RuntimeApiStorageOverride::new(client)),130	})131}132133/// Instantiate all Full RPC extensions.134pub fn create_full<C, P, SC, CA, R, A, B>(135	deps: FullDeps<C, P, SC, CA>,136	subscription_task_executor: SubscriptionTaskExecutor,137) -> Result<RpcModule<()>, Box<dyn std::error::Error + Send + Sync>>138where139	C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,140	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,141	C: Send + Sync + 'static,142	C: BlockchainEvents<Block>,143	C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>,144	C::Api: BlockBuilder<Block>,145	// C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,146	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,147	C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,148	C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,149	C::Api: up_rpc::UniqueApi<Block, <R as RuntimeInstance>::CrossAccountId, AccountId>,150	C::Api: rmrk_rpc::RmrkApi<151		Block,152		AccountId,153		RmrkCollectionInfo<AccountId>,154		RmrkInstanceInfo<AccountId>,155		RmrkResourceInfo,156		RmrkPropertyInfo,157		RmrkBaseInfo<AccountId>,158		RmrkPartType,159		RmrkTheme,160	>,161	B: sc_client_api::Backend<Block> + Send + Sync + 'static,162	B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::HashFor<Block>>,163	P: TransactionPool<Block = Block> + 'static,164	CA: ChainApi<Block = Block> + 'static,165	R: RuntimeInstance + Send + Sync + 'static,166	<R as RuntimeInstance>::CrossAccountId: serde::Serialize,167	for<'de> <R as RuntimeInstance>::CrossAccountId: serde::Deserialize<'de>,168{169	use fc_rpc::{170		Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub,171		EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer,172	};173	use uc_rpc::{UniqueApiServer, Unique};174175	#[cfg(not(feature = "unique-runtime"))]176	use uc_rpc::{RmrkApiServer, Rmrk};177178	// use pallet_contracts_rpc::{Contracts, ContractsApi};179	use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};180	use substrate_frame_rpc_system::{System, SystemApiServer};181182	let mut io = RpcModule::new(());183	let FullDeps {184		client,185		pool,186		graph,187		select_chain: _,188		fee_history_limit,189		fee_history_cache,190		block_data_cache,191		enable_dev_signer,192		is_authority,193		network,194		deny_unsafe,195		filter_pool,196		backend,197		max_past_logs,198	} = deps;199200	io.merge(System::new(Arc::clone(&client), Arc::clone(&pool), deny_unsafe).into_rpc())?;201	io.merge(TransactionPayment::new(Arc::clone(&client)).into_rpc())?;202203	// io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));204205	let mut signers = Vec::new();206	if enable_dev_signer {207		signers.push(Box::new(EthDevSigner::new()) as Box<dyn EthSigner>);208	}209210	let overrides = overrides_handle::<_, _, R>(client.clone());211212	io.merge(213		Eth::new(214			client.clone(),215			pool.clone(),216			graph,217			Some(<R as RuntimeInstance>::get_transaction_converter()),218			network.clone(),219			signers,220			overrides.clone(),221			backend.clone(),222			is_authority,223			block_data_cache.clone(),224			fee_history_cache,225			fee_history_limit,226		)227		.into_rpc(),228	)?;229230	io.merge(Unique::new(client.clone()).into_rpc())?;231232	#[cfg(not(feature = "unique-runtime"))]233	io.merge(Rmrk::new(client.clone()).into_rpc())?;234235	if let Some(filter_pool) = filter_pool {236		io.merge(237			EthFilter::new(238				client.clone(),239				backend,240				filter_pool,241				500_usize, // max stored filters242				max_past_logs,243				block_data_cache,244			)245			.into_rpc(),246		)?;247	}248249	io.merge(250		Net::new(251			client.clone(),252			network.clone(),253			// Whether to format the `peer_count` response as Hex (default) or not.254			true,255		)256		.into_rpc(),257	)?;258259	io.merge(Web3::new(client.clone()).into_rpc())?;260261	io.merge(262		EthPubSub::new(pool, client, network, subscription_task_executor, overrides).into_rpc(),263	)?;264265	Ok(io)266}
after · node/rpc/src/lib.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 sp_runtime::traits::BlakeTwo256;18use fc_rpc::{19	EthBlockDataCacheTask, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override,20	StorageOverride, SchemaV2Override, SchemaV3Override,21};22use jsonrpsee::RpcModule;23use fc_rpc_core::types::{FilterPool, FeeHistoryCache};24use fp_storage::EthereumStorageSchema;25use sc_client_api::{26	backend::{AuxStore, StorageProvider},27	client::BlockchainEvents,28	StateBackend, Backend,29};30use sc_finality_grandpa::{31	FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState,32};33use sc_network::NetworkService;34use sc_rpc::SubscriptionTaskExecutor;35pub use sc_rpc_api::DenyUnsafe;36use sc_transaction_pool::{ChainApi, Pool};37use sp_api::ProvideRuntimeApi;38use sp_block_builder::BlockBuilder;39use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};40use sc_service::TransactionPool;41use std::{collections::BTreeMap, sync::Arc};4243use common_types::opaque::{Hash, AccountId, RuntimeInstance, Index, Block, BlockNumber, Balance};4445// RMRK46use up_data_structs::{47	RmrkCollectionInfo, RmrkInstanceInfo, RmrkResourceInfo, RmrkPropertyInfo, RmrkBaseInfo,48	RmrkPartType, RmrkTheme,49};5051/// Extra dependencies for GRANDPA52pub struct GrandpaDeps<B> {53	/// Voting round info.54	pub shared_voter_state: SharedVoterState,55	/// Authority set info.56	pub shared_authority_set: SharedAuthoritySet<Hash, BlockNumber>,57	/// Receives notifications about justification events from Grandpa.58	pub justification_stream: GrandpaJustificationStream<Block>,59	/// Executor to drive the subscription manager in the Grandpa RPC handler.60	pub subscription_executor: SubscriptionTaskExecutor,61	/// Finality proof provider.62	pub finality_provider: Arc<FinalityProofProvider<B, Block>>,63}6465/// Full client dependencies.66pub struct FullDeps<C, P, SC, CA: ChainApi> {67	/// The client instance to use.68	pub client: Arc<C>,69	/// Transaction pool instance.70	pub pool: Arc<P>,71	/// Graph pool instance.72	pub graph: Arc<Pool<CA>>,73	/// The SelectChain Strategy74	pub select_chain: SC,75	/// The Node authority flag76	pub is_authority: bool,77	/// Whether to enable dev signer78	pub enable_dev_signer: bool,79	/// Network service80	pub network: Arc<NetworkService<Block, Hash>>,81	/// Whether to deny unsafe calls82	pub deny_unsafe: DenyUnsafe,83	/// EthFilterApi pool.84	pub filter_pool: Option<FilterPool>,85	/// Backend.86	pub backend: Arc<fc_db::Backend<Block>>,87	/// Maximum number of logs in a query.88	pub max_past_logs: u32,89	/// Maximum fee history cache size.90	pub fee_history_limit: u64,91	/// Fee history cache.92	pub fee_history_cache: FeeHistoryCache,93	/// Cache for Ethereum block data.94	pub block_data_cache: Arc<EthBlockDataCacheTask<Block>>,95}9697pub fn overrides_handle<C, BE, R>(client: Arc<C>) -> Arc<OverrideHandle<Block>>98where99	C: ProvideRuntimeApi<Block> + StorageProvider<Block, BE> + AuxStore,100	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError>,101	C: Send + Sync + 'static,102	C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,103	C::Api: up_rpc::UniqueApi<Block, <R as RuntimeInstance>::CrossAccountId, AccountId>,104	BE: Backend<Block> + 'static,105	BE::State: StateBackend<BlakeTwo256>,106	R: RuntimeInstance + Send + Sync + 'static,107{108	let mut overrides_map = BTreeMap::new();109	overrides_map.insert(110		EthereumStorageSchema::V1,111		Box::new(SchemaV1Override::new(client.clone()))112			as Box<dyn StorageOverride<_> + Send + Sync>,113	);114	overrides_map.insert(115		EthereumStorageSchema::V2,116		Box::new(SchemaV2Override::new(client.clone()))117			as Box<dyn StorageOverride<_> + Send + Sync>,118	);119	overrides_map.insert(120		EthereumStorageSchema::V3,121		Box::new(SchemaV3Override::new(client.clone()))122			as Box<dyn StorageOverride<_> + Send + Sync>,123	);124125	Arc::new(OverrideHandle {126		schemas: overrides_map,127		fallback: Box::new(RuntimeApiStorageOverride::new(client)),128	})129}130131/// Instantiate all Full RPC extensions.132pub fn create_full<C, P, SC, CA, R, A, B>(133	deps: FullDeps<C, P, SC, CA>,134	subscription_task_executor: SubscriptionTaskExecutor,135) -> Result<RpcModule<()>, Box<dyn std::error::Error + Send + Sync>>136where137	C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,138	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,139	C: Send + Sync + 'static,140	C: BlockchainEvents<Block>,141	C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>,142	C::Api: BlockBuilder<Block>,143	// C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,144	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,145	C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,146	C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,147	C::Api: up_rpc::UniqueApi<Block, <R as RuntimeInstance>::CrossAccountId, AccountId>,148	C::Api: rmrk_rpc::RmrkApi<149		Block,150		AccountId,151		RmrkCollectionInfo<AccountId>,152		RmrkInstanceInfo<AccountId>,153		RmrkResourceInfo,154		RmrkPropertyInfo,155		RmrkBaseInfo<AccountId>,156		RmrkPartType,157		RmrkTheme,158	>,159	B: sc_client_api::Backend<Block> + Send + Sync + 'static,160	B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::HashFor<Block>>,161	P: TransactionPool<Block = Block> + 'static,162	CA: ChainApi<Block = Block> + 'static,163	R: RuntimeInstance + Send + Sync + 'static,164	<R as RuntimeInstance>::CrossAccountId: serde::Serialize,165	for<'de> <R as RuntimeInstance>::CrossAccountId: serde::Deserialize<'de>,166{167	use fc_rpc::{168		Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub,169		EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer,170	};171	use uc_rpc::{UniqueApiServer, Unique};172173	#[cfg(not(feature = "unique-runtime"))]174	use uc_rpc::{RmrkApiServer, Rmrk};175176	// use pallet_contracts_rpc::{Contracts, ContractsApi};177	use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};178	use substrate_frame_rpc_system::{System, SystemApiServer};179180	let mut io = RpcModule::new(());181	let FullDeps {182		client,183		pool,184		graph,185		select_chain: _,186		fee_history_limit,187		fee_history_cache,188		block_data_cache,189		enable_dev_signer,190		is_authority,191		network,192		deny_unsafe,193		filter_pool,194		backend,195		max_past_logs,196	} = deps;197198	io.merge(System::new(Arc::clone(&client), Arc::clone(&pool), deny_unsafe).into_rpc())?;199	io.merge(TransactionPayment::new(Arc::clone(&client)).into_rpc())?;200201	// io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));202203	let mut signers = Vec::new();204	if enable_dev_signer {205		signers.push(Box::new(EthDevSigner::new()) as Box<dyn EthSigner>);206	}207208	let overrides = overrides_handle::<_, _, R>(client.clone());209210	io.merge(211		Eth::new(212			client.clone(),213			pool.clone(),214			graph,215			Some(<R as RuntimeInstance>::get_transaction_converter()),216			network.clone(),217			signers,218			overrides.clone(),219			backend.clone(),220			is_authority,221			block_data_cache.clone(),222			fee_history_cache,223			fee_history_limit,224		)225		.into_rpc(),226	)?;227228	io.merge(Unique::new(client.clone()).into_rpc())?;229230	#[cfg(not(feature = "unique-runtime"))]231	io.merge(Rmrk::new(client.clone()).into_rpc())?;232233	if let Some(filter_pool) = filter_pool {234		io.merge(235			EthFilter::new(236				client.clone(),237				backend,238				filter_pool,239				500_usize, // max stored filters240				max_past_logs,241				block_data_cache,242			)243			.into_rpc(),244		)?;245	}246247	io.merge(248		Net::new(249			client.clone(),250			network.clone(),251			// Whether to format the `peer_count` response as Hex (default) or not.252			true,253		)254		.into_rpc(),255	)?;256257	io.merge(Web3::new(client.clone()).into_rpc())?;258259	io.merge(260		EthPubSub::new(pool, client, network, subscription_task_executor, overrides).into_rpc(),261	)?;262263	Ok(io)264}
modifiedruntime/common/config/ethereum.rsdiffbeforeafterboth
--- a/runtime/common/config/ethereum.rs
+++ b/runtime/common/config/ethereum.rs
@@ -1,28 +1,18 @@
 use sp_core::{U256, H160};
 use frame_support::{
-    weights::{Weight, constants::WEIGHT_PER_SECOND},
-    traits::{FindAuthor},
-    parameter_types, ConsensusEngineId,
+	weights::{Weight, constants::WEIGHT_PER_SECOND},
+	traits::{FindAuthor},
+	parameter_types, ConsensusEngineId,
 };
 use sp_runtime::{RuntimeAppPublic, Perbill};
 use crate::{
-    runtime_common::{
-		constants::*,
-        dispatch::CollectionDispatchT,
-        ethereum::sponsoring::EvmSponsorshipHandler,
-		config::sponsoring::DefaultSponsoringRateLimit,
-        DealWithFees,
-    },
-    Runtime,
-    Aura,
-    Balances,
-    Event,
-    ChainId,
+	runtime_common::{
+		constants::*, dispatch::CollectionDispatchT, ethereum::sponsoring::EvmSponsorshipHandler,
+		config::sponsoring::DefaultSponsoringRateLimit, DealWithFees,
+	},
+	Runtime, Aura, Balances, Event, ChainId,
 };
-use pallet_evm::{
-    EnsureAddressTruncated,
-    HashedAddressMapping,
-};
+use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping};
 
 pub type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;
 
@@ -116,7 +106,7 @@
 }
 
 parameter_types! {
-    // 0x842899ECF380553E8a4de75bF534cdf6fBF64049
+	// 0x842899ECF380553E8a4de75bF534cdf6fBF64049
 	pub const HelpersContractAddress: H160 = H160([
 		0x84, 0x28, 0x99, 0xec, 0xf3, 0x80, 0x55, 0x3e, 0x8a, 0x4d, 0xe7, 0x5b, 0xf5, 0x34, 0xcd, 0xf6, 0xfb, 0xf6, 0x40, 0x49,
 	]);
modifiedruntime/common/config/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/mod.rs
+++ b/runtime/common/config/mod.rs
@@ -14,10 +14,10 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-pub mod substrate;
 pub mod ethereum;
-pub mod sponsoring;
+pub mod orml;
 pub mod pallets;
 pub mod parachain;
+pub mod sponsoring;
+pub mod substrate;
 pub mod xcm;
-pub mod orml;
modifiedruntime/common/config/orml.rsdiffbeforeafterboth
--- a/runtime/common/config/orml.rs
+++ b/runtime/common/config/orml.rs
@@ -16,10 +16,7 @@
 
 use frame_support::parameter_types;
 use frame_system::EnsureSigned;
-use crate::{
-    runtime_common::constants::*,
-    Runtime, Event, RelayChainBlockNumberProvider,
-};
+use crate::{runtime_common::constants::*, Runtime, Event, RelayChainBlockNumberProvider};
 use common_types::{AccountId, Balance};
 
 parameter_types! {
modifiedruntime/common/config/pallets/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -17,24 +17,18 @@
 use frame_support::parameter_types;
 use sp_runtime::traits::AccountIdConversion;
 use crate::{
-    runtime_common::{
-        constants::*,
-        dispatch::CollectionDispatchT,
-        config::{
-            substrate::TreasuryModuleId,
-            ethereum::EvmCollectionHelpersAddress,
-        },
-        weights::CommonWeights,
-        RelayChainBlockNumberProvider,
-    },
-    Runtime,
-    Event,
-    Call,
-    Balances,
+	runtime_common::{
+		constants::*,
+		dispatch::CollectionDispatchT,
+		config::{substrate::TreasuryModuleId, ethereum::EvmCollectionHelpersAddress},
+		weights::CommonWeights,
+		RelayChainBlockNumberProvider,
+	},
+	Runtime, Event, Call, Balances,
 };
 use common_types::{AccountId, Balance, BlockNumber};
 use up_data_structs::{
-    mapping::{EvmTokenAddressMapping, CrossTokenAddressMapping},
+	mapping::{EvmTokenAddressMapping, CrossTokenAddressMapping},
 };
 
 #[cfg(feature = "rmrk")]
modifiedruntime/common/config/pallets/scheduler.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/scheduler.rs
+++ b/runtime/common/config/pallets/scheduler.rs
@@ -14,20 +14,13 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use frame_support::{
-    traits::PrivilegeCmp,
-    weights::Weight,
-    parameter_types
-};
+use frame_support::{traits::PrivilegeCmp, weights::Weight, parameter_types};
 use frame_system::EnsureSigned;
 use sp_runtime::Perbill;
 use sp_std::cmp::Ordering;
 use crate::{
-    runtime_common::{
-        scheduler::SchedulerPaymentExecutor,
-        config::substrate::RuntimeBlockWeights,
-    },
-    Runtime, Call, Event, Origin, OriginCaller, Balances
+	runtime_common::{scheduler::SchedulerPaymentExecutor, config::substrate::RuntimeBlockWeights},
+	Runtime, Call, Event, Origin, OriginCaller, Balances,
 };
 use common_types::AccountId;
 
@@ -36,7 +29,7 @@
 		RuntimeBlockWeights::get().max_block;
 	pub const MaxScheduledPerBlock: u32 = 50;
 
-    pub const NoPreimagePostponement: Option<u32> = Some(10);
+	pub const NoPreimagePostponement: Option<u32> = Some(10);
 	pub const Preimage: Option<u32> = Some(10);
 }
 
modifiedruntime/common/config/parachain.rsdiffbeforeafterboth
--- a/runtime/common/config/parachain.rs
+++ b/runtime/common/config/parachain.rs
@@ -14,17 +14,8 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use frame_support::{
-    weights::Weight,
-    parameter_types,
-};
-use crate::{
-    runtime_common::constants::*,
-    Runtime,
-    Event,
-    XcmpQueue,
-    DmpQueue,
-};
+use frame_support::{weights::Weight, parameter_types};
+use crate::{runtime_common::constants::*, Runtime, Event, XcmpQueue, DmpQueue};
 
 parameter_types! {
 	pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;
modifiedruntime/common/config/sponsoring.rsdiffbeforeafterboth
--- a/runtime/common/config/sponsoring.rs
+++ b/runtime/common/config/sponsoring.rs
@@ -16,16 +16,13 @@
 
 use frame_support::parameter_types;
 use crate::{
-    runtime_common::{
-        constants::*,
-        sponsoring::UniqueSponsorshipHandler,
-    },
-    Runtime,
+	runtime_common::{constants::*, sponsoring::UniqueSponsorshipHandler},
+	Runtime,
 };
 use common_types::BlockNumber;
 
 parameter_types! {
-    pub const DefaultSponsoringRateLimit: BlockNumber = 1 * DAYS;
+	pub const DefaultSponsoringRateLimit: BlockNumber = 1 * DAYS;
 }
 
 type SponsorshipHandler = (
modifiedruntime/common/config/substrate.rsdiffbeforeafterboth
--- a/runtime/common/config/substrate.rs
+++ b/runtime/common/config/substrate.rs
@@ -18,11 +18,10 @@
 	traits::{Everything, ConstU32},
 	weights::{
 		constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight},
-		DispatchClass, WeightToFeePolynomial, WeightToFeeCoefficients,
-		ConstantMultiplier, WeightToFeeCoefficient,
+		DispatchClass, WeightToFeePolynomial, WeightToFeeCoefficients, ConstantMultiplier,
+		WeightToFeeCoefficient,
 	},
-	parameter_types,
-	PalletId,
+	parameter_types, PalletId,
 };
 use sp_runtime::{
 	generic,
@@ -36,20 +35,8 @@
 use sp_arithmetic::traits::{BaseArithmetic, Unsigned};
 use smallvec::smallvec;
 use crate::{
-    runtime_common::{
-        DealWithFees,
-        constants::*,
-    },
-	Runtime,
-	Event,
-	Call,
-	Origin,
-	PalletInfo,
-	System,
-	Balances,
-	Treasury,
-	SS58Prefix,
-	Version,
+	runtime_common::{DealWithFees, constants::*},
+	Runtime, Event, Call, Origin, PalletInfo, System, Balances, Treasury, SS58Prefix, Version,
 };
 use common_types::*;
 
modifiedruntime/common/config/xcm.rsdiffbeforeafterboth
--- a/runtime/common/config/xcm.rs
+++ b/runtime/common/config/xcm.rs
@@ -15,19 +15,15 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::{
-    traits::{
-        tokens::currency::Currency as CurrencyT,
-        OnUnbalanced as OnUnbalancedT,
-        Get, Everything
-    },
-    weights::{Weight, WeightToFeePolynomial, WeightToFee},
-    parameter_types, match_types,
+	traits::{
+		tokens::currency::Currency as CurrencyT, OnUnbalanced as OnUnbalancedT, Get, Everything,
+	},
+	weights::{Weight, WeightToFeePolynomial, WeightToFee},
+	parameter_types, match_types,
 };
 use frame_system::EnsureRoot;
 use sp_runtime::{
-	traits::{
-		Saturating, CheckedConversion, Zero,
-	},
+	traits::{Saturating, CheckedConversion, Zero},
 	SaturatedConversion,
 };
 use pallet_xcm::XcmPassthrough;
@@ -36,8 +32,7 @@
 use xcm::latest::{
 	AssetId::{Concrete},
 	Fungibility::Fungible as XcmFungible,
-	MultiAsset,
-	Error as XcmError,
+	MultiAsset, Error as XcmError,
 };
 use xcm_executor::traits::{MatchesFungible, WeightTrader};
 use xcm_builder::{
@@ -49,19 +44,8 @@
 use xcm_executor::{Config, XcmExecutor, Assets};
 use sp_std::marker::PhantomData;
 use crate::{
-    runtime_common::{
-        constants::*,
-        config::substrate::LinearFee
-    },
-    Runtime,
-    Call,
-    Event,
-    Origin,
-    Balances,
-    ParachainInfo,
-    ParachainSystem,
-    PolkadotXcm,
-    XcmpQueue,
+	runtime_common::{constants::*, config::substrate::LinearFee},
+	Runtime, Call, Event, Origin, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, XcmpQueue,
 };
 use common_types::{AccountId, Balance};
 
modifiedruntime/common/ethereum/mod.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/mod.rs
+++ b/runtime/common/ethereum/mod.rs
@@ -14,6 +14,6 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
+pub mod self_contained_call;
 pub mod sponsoring;
 pub mod transaction_converter;
-pub mod self_contained_call;
modifiedruntime/common/ethereum/self_contained_call.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/self_contained_call.rs
+++ b/runtime/common/ethereum/self_contained_call.rs
@@ -16,8 +16,8 @@
 
 use sp_core::H160;
 use sp_runtime::{
-    traits::{Dispatchable, DispatchInfoOf, PostDispatchInfoOf},
-    transaction_validity::{TransactionValidityError, TransactionValidity},
+	traits::{Dispatchable, DispatchInfoOf, PostDispatchInfoOf},
+	transaction_validity::{TransactionValidityError, TransactionValidity},
 };
 use crate::{Origin, Call};
 
modifiedruntime/common/ethereum/sponsoring.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/sponsoring.rs
+++ b/runtime/common/ethereum/sponsoring.rs
@@ -27,10 +27,7 @@
 use up_data_structs::{TokenId, CreateItemData, CreateNftData, CollectionMode};
 use pallet_unique::Config as UniqueConfig;
 
-use crate::{
-	Runtime,
-	runtime_common::sponsoring::*
-};
+use crate::{Runtime, runtime_common::sponsoring::*};
 
 use pallet_nonfungible::erc::{
 	UniqueNFTCall, ERC721UniqueExtensionsCall, ERC721MintableCall, ERC721Call, TokenPropertiesCall,
modifiedruntime/common/ethereum/transaction_converter.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/transaction_converter.rs
+++ b/runtime/common/ethereum/transaction_converter.rs
@@ -15,11 +15,7 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use codec::{Encode, Decode};
-use crate::{
-    opaque,
-    Runtime,
-    UncheckedExtrinsic,
-};
+use crate::{opaque, Runtime, UncheckedExtrinsic};
 
 pub struct TransactionConverter;
 
modifiedruntime/common/instance.rsdiffbeforeafterboth
--- a/runtime/common/instance.rs
+++ b/runtime/common/instance.rs
@@ -1,9 +1,8 @@
 use crate::{
-    runtime_common::{
-        config::ethereum::CrossAccountId,
-        ethereum::transaction_converter::TransactionConverter
-    },
-    Runtime,
+	runtime_common::{
+		config::ethereum::CrossAccountId, ethereum::transaction_converter::TransactionConverter,
+	},
+	Runtime,
 };
 use common_types::opaque::RuntimeInstance;
 
modifiedruntime/common/mod.rsdiffbeforeafterboth
--- a/runtime/common/mod.rs
+++ b/runtime/common/mod.rs
@@ -14,23 +14,23 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
+pub mod config;
 pub mod constants;
 pub mod construct_runtime;
 pub mod dispatch;
+pub mod ethereum;
+pub mod instance;
 pub mod runtime_apis;
+pub mod scheduler;
 pub mod sponsoring;
 pub mod weights;
-pub mod config;
-pub mod instance;
-pub mod ethereum;
-pub mod scheduler;
 
 use sp_core::H160;
 use frame_support::traits::{Currency, OnUnbalanced, Imbalance};
 use sp_runtime::{
-    generic,
-    traits::{BlakeTwo256, BlockNumberProvider},
-    impl_opaque_keys,
+	generic,
+	traits::{BlakeTwo256, BlockNumberProvider},
+	impl_opaque_keys,
 };
 use sp_std::vec::Vec;
 
@@ -38,7 +38,7 @@
 use sp_version::NativeVersion;
 
 use crate::{
-    Runtime, Call, Balances, Treasury, Aura, Signature, AllPalletsReversedWithSystemFirst,
+	Runtime, Call, Balances, Treasury, Aura, Signature, AllPalletsReversedWithSystemFirst,
 	InherentDataExt,
 };
 use common_types::{AccountId, BlockNumber};
modifiedruntime/common/scheduler.rsdiffbeforeafterboth
--- a/runtime/common/scheduler.rs
+++ b/runtime/common/scheduler.rs
@@ -15,19 +15,16 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::{
-    traits::NamedReservableCurrency,
-    weights::{GetDispatchInfo, PostDispatchInfo, DispatchInfo},
+	traits::NamedReservableCurrency,
+	weights::{GetDispatchInfo, PostDispatchInfo, DispatchInfo},
 };
 use sp_runtime::{
-    traits::{Dispatchable, Applyable, Member},
+	traits::{Dispatchable, Applyable, Member},
 	generic::Era,
-    transaction_validity::TransactionValidityError,
+	transaction_validity::TransactionValidityError,
 	DispatchErrorWithPostInfo, DispatchError,
-};
-use crate::{
-    Runtime, Call, Origin, Balances,
-    ChargeTransactionPayment,
 };
+use crate::{Runtime, Call, Origin, Balances, ChargeTransactionPayment};
 use common_types::{AccountId, Balance};
 use fp_self_contained::SelfContainedCall;
 use pallet_unique_scheduler::DispatchCall;
@@ -85,11 +82,11 @@
 			SignedExtraScheduler,
 			SelfContainedSignedInfo,
 		> {
-			signed:
-                fp_self_contained::CheckedSignature::<AccountId, SignedExtraScheduler, SelfContainedSignedInfo>::Signed(
-					signer.clone().into(),
-					get_signed_extras(signer.into()),
-				),
+			signed: fp_self_contained::CheckedSignature::<
+				AccountId,
+				SignedExtraScheduler,
+				SelfContainedSignedInfo,
+			>::Signed(signer.clone().into(), get_signed_extras(signer.into())),
 			function: call.into(),
 		};