git.delta.rocks / unique-network / refs/commits / 3db37f4ef63b

difftreelog

fix clippy warnings

Grigoriy Simonov2023-10-12parent: #5f71c37.patch.diff
in: master

12 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10145,6 +10145,7 @@
  "sp-runtime",
  "sp-session",
  "sp-std",
+ "sp-storage",
  "sp-transaction-pool",
  "sp-version",
  "staging-xcm",
@@ -14897,6 +14898,7 @@
  "sp-runtime",
  "sp-session",
  "sp-std",
+ "sp-storage",
  "sp-transaction-pool",
  "sp-version",
  "staging-xcm",
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 std::collections::BTreeMap;1819#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]20pub use opal_runtime as default_runtime;21#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]22pub use quartz_runtime as default_runtime;23use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};24use sc_service::ChainType;25use serde::{Deserialize, Serialize};26use serde_json::map::Map;27use sp_core::{sr25519, Pair, Public};28use sp_runtime::traits::{IdentifyAccount, Verify};29#[cfg(feature = "unique-runtime")]30pub use unique_runtime as default_runtime;31use up_common::types::opaque::*;3233/// The `ChainSpec` parameterized for the unique runtime.34#[cfg(feature = "unique-runtime")]35pub type UniqueChainSpec =36	sc_service::GenericChainSpec<unique_runtime::RuntimeGenesisConfig, Extensions>;3738/// The `ChainSpec` parameterized for the quartz runtime.39#[cfg(feature = "quartz-runtime")]40pub type QuartzChainSpec =41	sc_service::GenericChainSpec<quartz_runtime::RuntimeGenesisConfig, Extensions>;4243/// The `ChainSpec` parameterized for the opal runtime.44pub type OpalChainSpec =45	sc_service::GenericChainSpec<opal_runtime::RuntimeGenesisConfig, Extensions>;4647#[cfg(feature = "unique-runtime")]48pub type DefaultChainSpec = UniqueChainSpec;4950#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]51pub type DefaultChainSpec = QuartzChainSpec;5253#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]54pub type DefaultChainSpec = OpalChainSpec;5556#[cfg(not(feature = "unique-runtime"))]57/// PARA_ID for Opal/Sapphire/Quartz58const PARA_ID: u32 = 2095;5960#[cfg(feature = "unique-runtime")]61/// PARA_ID for Unique62const PARA_ID: u32 = 2037;6364pub trait RuntimeIdentification {65	fn runtime_id(&self) -> RuntimeId;66}6768impl RuntimeIdentification for Box<dyn sc_service::ChainSpec> {69	fn runtime_id(&self) -> RuntimeId {70		#[cfg(feature = "unique-runtime")]71		if self.id().starts_with("unique") || self.id().starts_with("unq") {72			return RuntimeId::Unique;73		}7475		#[cfg(feature = "quartz-runtime")]76		if self.id().starts_with("quartz")77			|| self.id().starts_with("qtz")78			|| self.id().starts_with("sapphire")79		{80			return RuntimeId::Quartz;81		}8283		if self.id().starts_with("opal") || self.id() == "dev" || self.id() == "local_testnet" {84			return RuntimeId::Opal;85		}8687		RuntimeId::Unknown(self.id().into())88	}89}9091pub enum ServiceId {92	Prod,93	Dev,94}9596pub trait ServiceIdentification {97	fn service_id(&self) -> ServiceId;98}99100impl ServiceIdentification for Box<dyn sc_service::ChainSpec> {101	fn service_id(&self) -> ServiceId {102		if self.id().ends_with("dev") {103			ServiceId::Dev104		} else {105			ServiceId::Prod106		}107	}108}109110/// Helper function to generate a crypto pair from seed111pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {112	TPublic::Pair::from_string(&format!("//{seed}"), None)113		.expect("static values are valid; qed")114		.public()115}116117/// The extensions for the [`DefaultChainSpec`].118#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]119#[serde(deny_unknown_fields)]120pub struct Extensions {121	/// The relay chain of the Parachain.122	pub relay_chain: String,123	/// The id of the Parachain.124	pub para_id: u32,125}126127impl Extensions {128	/// Try to get the extension from the given `ChainSpec`.129	pub fn try_get(chain_spec: &dyn sc_service::ChainSpec) -> Option<&Self> {130		sc_chain_spec::get_extension(chain_spec.extensions())131	}132}133134type AccountPublic = <Signature as Verify>::Signer;135136/// Helper function to generate an account ID from seed137pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId138where139	AccountPublic: From<<TPublic::Pair as Pair>::Public>,140{141	AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()142}143144#[cfg(not(feature = "unique-runtime"))]145macro_rules! testnet_genesis {146	(147		$runtime:path,148		$root_key:expr,149		$initial_invulnerables:expr,150		$endowed_accounts:expr,151		$id:expr152	) => {{153		use $runtime::*;154155		RuntimeGenesisConfig {156			system: SystemConfig {157				code: WASM_BINARY158					.expect("WASM binary was not build, please build it!")159					.to_vec(),160				..Default::default()161			},162			balances: BalancesConfig {163				balances: $endowed_accounts164					.iter()165					.cloned()166					// 1e13 UNQ167					.map(|k| (k, 1 << 100))168					.collect(),169			},170			tokens: TokensConfig { balances: vec![] },171			sudo: SudoConfig {172				key: Some($root_key),173			},174175			vesting: VestingConfig { vesting: vec![] },176			parachain_info: ParachainInfoConfig {177				parachain_id: $id.into(),178				..Default::default()179			},180			collator_selection: CollatorSelectionConfig {181				invulnerables: $initial_invulnerables182					.iter()183					.cloned()184					.map(|(acc, _)| acc)185					.collect(),186			},187			session: SessionConfig {188				keys: $initial_invulnerables189					.into_iter()190					.map(|(acc, aura)| {191						(192							acc.clone(),          // account id193							acc,                  // validator id194							SessionKeys { aura }, // session keys195						)196					})197					.collect(),198			},199			evm: EVMConfig {200				accounts: BTreeMap::new(),201				..Default::default()202			},203			..Default::default()204		}205	}};206}207208#[cfg(feature = "unique-runtime")]209macro_rules! testnet_genesis {210	(211		$runtime:path,212		$root_key:expr,213		$initial_invulnerables:expr,214		$endowed_accounts:expr,215		$id:expr216	) => {{217		use $runtime::*;218219		RuntimeGenesisConfig {220			system: SystemConfig {221				code: WASM_BINARY222					.expect("WASM binary was not build, please build it!")223					.to_vec(),224				..Default::default()225			},226			balances: BalancesConfig {227				balances: $endowed_accounts228					.iter()229					.cloned()230					// 1e13 UNQ231					.map(|k| (k, 1 << 100))232					.collect(),233			},234			tokens: TokensConfig { balances: vec![] },235			sudo: SudoConfig {236				key: Some($root_key),237			},238			vesting: VestingConfig { vesting: vec![] },239			parachain_info: ParachainInfoConfig {240				parachain_id: $id.into(),241				Default::default()242			},243			aura: AuraConfig {244				authorities: $initial_invulnerables245					.into_iter()246					.map(|(_, aura)| aura)247					.collect(),248			},249			evm: EVMConfig {250				accounts: BTreeMap::new(),251				..Default::default()252			},253			..Default::default()254		}255	}};256}257258pub fn development_config() -> DefaultChainSpec {259	let mut properties = Map::new();260	properties.insert("tokenSymbol".into(), default_runtime::TOKEN_SYMBOL.into());261	properties.insert("tokenDecimals".into(), default_runtime::DECIMALS.into());262	properties.insert(263		"ss58Format".into(),264		default_runtime::SS58Prefix::get().into(),265	);266267	DefaultChainSpec::from_genesis(268		// Name269		format!(270			"{}{}",271			default_runtime::VERSION.spec_name.to_uppercase(),272			if cfg!(feature = "unique-runtime") {273				""274			} else {275				" by UNIQUE"276			}277		)278		.as_str(),279		// ID280		format!("{}_dev", default_runtime::VERSION.spec_name).as_str(),281		ChainType::Local,282		move || {283			testnet_genesis!(284				default_runtime,285				// Sudo account286				get_account_id_from_seed::<sr25519::Public>("Alice"),287				[288					(289						get_account_id_from_seed::<sr25519::Public>("Alice"),290						get_from_seed::<AuraId>("Alice"),291					),292					(293						get_account_id_from_seed::<sr25519::Public>("Bob"),294						get_from_seed::<AuraId>("Bob"),295					),296				],297				// Pre-funded accounts298				vec![299					get_account_id_from_seed::<sr25519::Public>("Alice"),300					get_account_id_from_seed::<sr25519::Public>("Bob"),301					get_account_id_from_seed::<sr25519::Public>("Charlie"),302					get_account_id_from_seed::<sr25519::Public>("Dave"),303					get_account_id_from_seed::<sr25519::Public>("Eve"),304					get_account_id_from_seed::<sr25519::Public>("Ferdie"),305					get_account_id_from_seed::<sr25519::Public>("Alice//stash"),306					get_account_id_from_seed::<sr25519::Public>("Bob//stash"),307					get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),308					get_account_id_from_seed::<sr25519::Public>("Dave//stash"),309					get_account_id_from_seed::<sr25519::Public>("Eve//stash"),310					get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),311				],312				PARA_ID313			)314		},315		// Bootnodes316		vec![],317		// Telemetry318		None,319		// Protocol ID320		None,321		None,322		// Properties323		Some(properties),324		// Extensions325		Extensions {326			relay_chain: "rococo-dev".into(),327			para_id: PARA_ID,328		},329	)330}331332pub fn local_testnet_config() -> DefaultChainSpec {333	let mut properties = Map::new();334	properties.insert("tokenSymbol".into(), default_runtime::TOKEN_SYMBOL.into());335	properties.insert("tokenDecimals".into(), default_runtime::DECIMALS.into());336	properties.insert(337		"ss58Format".into(),338		default_runtime::SS58Prefix::get().into(),339	);340341	DefaultChainSpec::from_genesis(342		// Name343		format!(344			"{}{}",345			default_runtime::VERSION.impl_name.to_uppercase(),346			if cfg!(feature = "unique-runtime") {347				""348			} else {349				" by UNIQUE"350			}351		)352		.as_str(),353		// ID354		format!("{}_local", default_runtime::VERSION.spec_name).as_str(),355		ChainType::Local,356		move || {357			testnet_genesis!(358				default_runtime,359				// Sudo account360				get_account_id_from_seed::<sr25519::Public>("Alice"),361				[362					(363						get_account_id_from_seed::<sr25519::Public>("Alice"),364						get_from_seed::<AuraId>("Alice"),365					),366					(367						get_account_id_from_seed::<sr25519::Public>("Bob"),368						get_from_seed::<AuraId>("Bob"),369					),370				],371				// Pre-funded accounts372				vec![373					get_account_id_from_seed::<sr25519::Public>("Alice"),374					get_account_id_from_seed::<sr25519::Public>("Bob"),375					get_account_id_from_seed::<sr25519::Public>("Charlie"),376					get_account_id_from_seed::<sr25519::Public>("Dave"),377					get_account_id_from_seed::<sr25519::Public>("Eve"),378					get_account_id_from_seed::<sr25519::Public>("Ferdie"),379					get_account_id_from_seed::<sr25519::Public>("Alice//stash"),380					get_account_id_from_seed::<sr25519::Public>("Bob//stash"),381					get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),382					get_account_id_from_seed::<sr25519::Public>("Dave//stash"),383					get_account_id_from_seed::<sr25519::Public>("Eve//stash"),384					get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),385				],386				PARA_ID387			)388		},389		// Bootnodes390		vec![],391		// Telemetry392		None,393		// Protocol ID394		None,395		None,396		// Properties397		Some(properties),398		// Extensions399		Extensions {400			relay_chain: "westend-local".into(),401			para_id: PARA_ID,402		},403	)404}
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 std::collections::BTreeMap;1819#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]20pub use opal_runtime as default_runtime;21#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]22pub use quartz_runtime as default_runtime;23use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};24use sc_service::ChainType;25use serde::{Deserialize, Serialize};26use serde_json::map::Map;27use sp_core::{sr25519, Pair, Public};28use sp_runtime::traits::{IdentifyAccount, Verify};29#[cfg(feature = "unique-runtime")]30pub use unique_runtime as default_runtime;31use up_common::types::opaque::*;3233/// The `ChainSpec` parameterized for the unique runtime.34#[cfg(feature = "unique-runtime")]35pub type UniqueChainSpec =36	sc_service::GenericChainSpec<unique_runtime::RuntimeGenesisConfig, Extensions>;3738/// The `ChainSpec` parameterized for the quartz runtime.39#[cfg(feature = "quartz-runtime")]40pub type QuartzChainSpec =41	sc_service::GenericChainSpec<quartz_runtime::RuntimeGenesisConfig, Extensions>;4243/// The `ChainSpec` parameterized for the opal runtime.44pub type OpalChainSpec =45	sc_service::GenericChainSpec<opal_runtime::RuntimeGenesisConfig, Extensions>;4647#[cfg(feature = "unique-runtime")]48pub type DefaultChainSpec = UniqueChainSpec;4950#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]51pub type DefaultChainSpec = QuartzChainSpec;5253#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]54pub type DefaultChainSpec = OpalChainSpec;5556#[cfg(not(feature = "unique-runtime"))]57/// PARA_ID for Opal/Sapphire/Quartz58const PARA_ID: u32 = 2095;5960#[cfg(feature = "unique-runtime")]61/// PARA_ID for Unique62const PARA_ID: u32 = 2037;6364pub trait RuntimeIdentification {65	fn runtime_id(&self) -> RuntimeId;66}6768impl RuntimeIdentification for Box<dyn sc_service::ChainSpec> {69	fn runtime_id(&self) -> RuntimeId {70		#[cfg(feature = "unique-runtime")]71		if self.id().starts_with("unique") || self.id().starts_with("unq") {72			return RuntimeId::Unique;73		}7475		#[cfg(feature = "quartz-runtime")]76		if self.id().starts_with("quartz")77			|| self.id().starts_with("qtz")78			|| self.id().starts_with("sapphire")79		{80			return RuntimeId::Quartz;81		}8283		if self.id().starts_with("opal") || self.id() == "dev" || self.id() == "local_testnet" {84			return RuntimeId::Opal;85		}8687		RuntimeId::Unknown(self.id().into())88	}89}9091pub enum ServiceId {92	Prod,93	Dev,94}9596pub trait ServiceIdentification {97	fn service_id(&self) -> ServiceId;98}99100impl ServiceIdentification for Box<dyn sc_service::ChainSpec> {101	fn service_id(&self) -> ServiceId {102		if self.id().ends_with("dev") {103			ServiceId::Dev104		} else {105			ServiceId::Prod106		}107	}108}109110/// Helper function to generate a crypto pair from seed111pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {112	TPublic::Pair::from_string(&format!("//{seed}"), None)113		.expect("static values are valid; qed")114		.public()115}116117/// The extensions for the [`DefaultChainSpec`].118#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]119#[serde(deny_unknown_fields)]120pub struct Extensions {121	/// The relay chain of the Parachain.122	pub relay_chain: String,123	/// The id of the Parachain.124	pub para_id: u32,125}126127impl Extensions {128	/// Try to get the extension from the given `ChainSpec`.129	pub fn try_get(chain_spec: &dyn sc_service::ChainSpec) -> Option<&Self> {130		sc_chain_spec::get_extension(chain_spec.extensions())131	}132}133134type AccountPublic = <Signature as Verify>::Signer;135136/// Helper function to generate an account ID from seed137pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId138where139	AccountPublic: From<<TPublic::Pair as Pair>::Public>,140{141	AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()142}143144#[cfg(not(feature = "unique-runtime"))]145macro_rules! testnet_genesis {146	(147		$runtime:path,148		$root_key:expr,149		$initial_invulnerables:expr,150		$endowed_accounts:expr,151		$id:expr152	) => {{153		use $runtime::*;154155		RuntimeGenesisConfig {156			system: SystemConfig {157				code: WASM_BINARY158					.expect("WASM binary was not build, please build it!")159					.to_vec(),160				..Default::default()161			},162			balances: BalancesConfig {163				balances: $endowed_accounts164					.iter()165					.cloned()166					// 1e13 UNQ167					.map(|k| (k, 1 << 100))168					.collect(),169			},170			tokens: TokensConfig { balances: vec![] },171			sudo: SudoConfig {172				key: Some($root_key),173			},174175			vesting: VestingConfig { vesting: vec![] },176			parachain_info: ParachainInfoConfig {177				parachain_id: $id.into(),178				..Default::default()179			},180			collator_selection: CollatorSelectionConfig {181				invulnerables: $initial_invulnerables182					.iter()183					.cloned()184					.map(|(acc, _)| acc)185					.collect(),186			},187			session: SessionConfig {188				keys: $initial_invulnerables189					.into_iter()190					.map(|(acc, aura)| {191						(192							acc.clone(),          // account id193							acc,                  // validator id194							SessionKeys { aura }, // session keys195						)196					})197					.collect(),198			},199			evm: EVMConfig {200				accounts: BTreeMap::new(),201				..Default::default()202			},203			..Default::default()204		}205	}};206}207208#[cfg(feature = "unique-runtime")]209macro_rules! testnet_genesis {210	(211		$runtime:path,212		$root_key:expr,213		$initial_invulnerables:expr,214		$endowed_accounts:expr,215		$id:expr216	) => {{217		use $runtime::*;218219		RuntimeGenesisConfig {220			system: SystemConfig {221				code: WASM_BINARY222					.expect("WASM binary was not build, please build it!")223					.to_vec(),224				..Default::default()225			},226			balances: BalancesConfig {227				balances: $endowed_accounts228					.iter()229					.cloned()230					// 1e13 UNQ231					.map(|k| (k, 1 << 100))232					.collect(),233			},234			tokens: TokensConfig { balances: vec![] },235			sudo: SudoConfig {236				key: Some($root_key),237			},238			vesting: VestingConfig { vesting: vec![] },239			parachain_info: ParachainInfoConfig {240				parachain_id: $id.into(),241				..Default::default()242			},243			aura: AuraConfig {244				authorities: $initial_invulnerables245					.into_iter()246					.map(|(_, aura)| aura)247					.collect(),248			},249			evm: EVMConfig {250				accounts: BTreeMap::new(),251				..Default::default()252			},253			..Default::default()254		}255	}};256}257258pub fn development_config() -> DefaultChainSpec {259	let mut properties = Map::new();260	properties.insert("tokenSymbol".into(), default_runtime::TOKEN_SYMBOL.into());261	properties.insert("tokenDecimals".into(), default_runtime::DECIMALS.into());262	properties.insert(263		"ss58Format".into(),264		default_runtime::SS58Prefix::get().into(),265	);266267	DefaultChainSpec::from_genesis(268		// Name269		format!(270			"{}{}",271			default_runtime::VERSION.spec_name.to_uppercase(),272			if cfg!(feature = "unique-runtime") {273				""274			} else {275				" by UNIQUE"276			}277		)278		.as_str(),279		// ID280		format!("{}_dev", default_runtime::VERSION.spec_name).as_str(),281		ChainType::Local,282		move || {283			testnet_genesis!(284				default_runtime,285				// Sudo account286				get_account_id_from_seed::<sr25519::Public>("Alice"),287				[288					(289						get_account_id_from_seed::<sr25519::Public>("Alice"),290						get_from_seed::<AuraId>("Alice"),291					),292					(293						get_account_id_from_seed::<sr25519::Public>("Bob"),294						get_from_seed::<AuraId>("Bob"),295					),296				],297				// Pre-funded accounts298				vec![299					get_account_id_from_seed::<sr25519::Public>("Alice"),300					get_account_id_from_seed::<sr25519::Public>("Bob"),301					get_account_id_from_seed::<sr25519::Public>("Charlie"),302					get_account_id_from_seed::<sr25519::Public>("Dave"),303					get_account_id_from_seed::<sr25519::Public>("Eve"),304					get_account_id_from_seed::<sr25519::Public>("Ferdie"),305					get_account_id_from_seed::<sr25519::Public>("Alice//stash"),306					get_account_id_from_seed::<sr25519::Public>("Bob//stash"),307					get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),308					get_account_id_from_seed::<sr25519::Public>("Dave//stash"),309					get_account_id_from_seed::<sr25519::Public>("Eve//stash"),310					get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),311				],312				PARA_ID313			)314		},315		// Bootnodes316		vec![],317		// Telemetry318		None,319		// Protocol ID320		None,321		None,322		// Properties323		Some(properties),324		// Extensions325		Extensions {326			relay_chain: "rococo-dev".into(),327			para_id: PARA_ID,328		},329	)330}331332pub fn local_testnet_config() -> DefaultChainSpec {333	let mut properties = Map::new();334	properties.insert("tokenSymbol".into(), default_runtime::TOKEN_SYMBOL.into());335	properties.insert("tokenDecimals".into(), default_runtime::DECIMALS.into());336	properties.insert(337		"ss58Format".into(),338		default_runtime::SS58Prefix::get().into(),339	);340341	DefaultChainSpec::from_genesis(342		// Name343		format!(344			"{}{}",345			default_runtime::VERSION.impl_name.to_uppercase(),346			if cfg!(feature = "unique-runtime") {347				""348			} else {349				" by UNIQUE"350			}351		)352		.as_str(),353		// ID354		format!("{}_local", default_runtime::VERSION.spec_name).as_str(),355		ChainType::Local,356		move || {357			testnet_genesis!(358				default_runtime,359				// Sudo account360				get_account_id_from_seed::<sr25519::Public>("Alice"),361				[362					(363						get_account_id_from_seed::<sr25519::Public>("Alice"),364						get_from_seed::<AuraId>("Alice"),365					),366					(367						get_account_id_from_seed::<sr25519::Public>("Bob"),368						get_from_seed::<AuraId>("Bob"),369					),370				],371				// Pre-funded accounts372				vec![373					get_account_id_from_seed::<sr25519::Public>("Alice"),374					get_account_id_from_seed::<sr25519::Public>("Bob"),375					get_account_id_from_seed::<sr25519::Public>("Charlie"),376					get_account_id_from_seed::<sr25519::Public>("Dave"),377					get_account_id_from_seed::<sr25519::Public>("Eve"),378					get_account_id_from_seed::<sr25519::Public>("Ferdie"),379					get_account_id_from_seed::<sr25519::Public>("Alice//stash"),380					get_account_id_from_seed::<sr25519::Public>("Bob//stash"),381					get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),382					get_account_id_from_seed::<sr25519::Public>("Dave//stash"),383					get_account_id_from_seed::<sr25519::Public>("Eve//stash"),384					get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),385				],386				PARA_ID387			)388		},389		// Bootnodes390		vec![],391		// Telemetry392		None,393		// Protocol ID394		None,395		None,396		// Properties397		Some(properties),398		// Extensions399		Extensions {400			relay_chain: "westend-local".into(),401			para_id: PARA_ID,402		},403	)404}
modifiednode/cli/src/command.rsdiffbeforeafterboth
--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -399,6 +399,7 @@
 		Some(Subcommand::TryRuntime(cmd)) => {
 			use std::{future::Future, pin::Pin};
 
+			use polkadot_cli::Block;
 			use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch};
 			use try_runtime_cli::block_building_info::timestamp_with_aura_info;
 
modifiednode/cli/src/rpc.rsdiffbeforeafterboth
--- a/node/cli/src/rpc.rs
+++ b/node/cli/src/rpc.rs
@@ -67,7 +67,7 @@
 }
 
 /// Instantiate all Full RPC extensions.
-pub fn create_full<C, P, SC, R, A, B>(
+pub fn create_full<C, P, SC, R, B>(
 	io: &mut RpcModule<()>,
 	deps: FullDeps<C, P, SC>,
 ) -> Result<(), Box<dyn std::error::Error + Send + Sync>>
@@ -244,7 +244,7 @@
 			EthFilter::new(
 				client.clone(),
 				eth_backend,
-				graph.clone(),
+				graph,
 				filter_pool,
 				500_usize, // max stored filters
 				max_past_logs,
modifiednode/cli/src/service.rsdiffbeforeafterboth
--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -498,7 +498,7 @@
 				select_chain,
 			};
 
-			create_full::<_, _, _, Runtime, RuntimeApi, _>(&mut rpc_handle, full_deps)?;
+			create_full::<_, _, _, Runtime, _>(&mut rpc_handle, full_deps)?;
 
 			let eth_deps = EthDeps {
 				client,
@@ -547,7 +547,7 @@
 		config: parachain_config,
 		keystore: params.keystore_container.keystore(),
 		backend: backend.clone(),
-		network: network.clone(),
+		network,
 		sync_service: sync_service.clone(),
 		system_rpc_tx,
 		telemetry: telemetry.as_mut(),
@@ -600,19 +600,21 @@
 	if validator {
 		start_consensus(
 			client.clone(),
-			backend.clone(),
-			prometheus_registry.as_ref(),
-			telemetry.as_ref().map(|t| t.handle()),
-			&task_manager,
-			relay_chain_interface.clone(),
 			transaction_pool,
-			sync_service.clone(),
-			params.keystore_container.keystore(),
-			overseer_handle,
-			relay_chain_slot_duration,
-			para_id,
-			collator_key.expect("cli args do not allow this"),
-			announce_block,
+			StartConsensusParameters {
+				backend: backend.clone(),
+				prometheus_registry: prometheus_registry.as_ref(),
+				telemetry: telemetry.as_ref().map(|t| t.handle()),
+				task_manager: &task_manager,
+				relay_chain_interface: relay_chain_interface.clone(),
+				sync_oracle: sync_service,
+				keystore: params.keystore_container.keystore(),
+				overseer_handle,
+				relay_chain_slot_duration,
+				para_id,
+				collator_key: collator_key.expect("cli args do not allow this"),
+				announce_block,
+			}
 		)?;
 	}
 
@@ -670,16 +672,12 @@
 	.map_err(Into::into)
 }
 
-pub fn start_consensus<ExecutorDispatch, RuntimeApi, Runtime>(
-	client: Arc<FullClient<RuntimeApi, ExecutorDispatch>>,
+pub struct StartConsensusParameters<'a> {
 	backend: Arc<FullBackend>,
-	prometheus_registry: Option<&Registry>,
+	prometheus_registry: Option<&'a Registry>,
 	telemetry: Option<TelemetryHandle>,
-	task_manager: &TaskManager,
+	task_manager: &'a TaskManager,
 	relay_chain_interface: Arc<dyn RelayChainInterface>,
-	transaction_pool: Arc<
-		sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi, ExecutorDispatch>>,
-	>,
 	sync_oracle: Arc<SyncingService<Block>>,
 	keystore: KeystorePtr,
 	overseer_handle: OverseerHandle,
@@ -687,6 +685,14 @@
 	para_id: ParaId,
 	collator_key: CollatorPair,
 	announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
+}
+
+pub fn start_consensus<ExecutorDispatch, RuntimeApi, Runtime>(
+	client: Arc<FullClient<RuntimeApi, ExecutorDispatch>>,
+	transaction_pool: Arc<
+		sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi, ExecutorDispatch>>,
+	>,
+	parameters: StartConsensusParameters<'_>,
 ) -> Result<(), sc_service::Error>
 where
 	ExecutorDispatch: NativeExecutionDispatch + 'static,
@@ -697,6 +703,20 @@
 	RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,
 	Runtime: RuntimeInstance,
 {
+	let StartConsensusParameters {
+		backend,
+		prometheus_registry,
+		telemetry,
+		task_manager,
+		relay_chain_interface,
+		sync_oracle,
+		keystore,
+		overseer_handle,
+		relay_chain_slot_duration,
+		para_id,
+		collator_key,
+		announce_block,
+	} = parameters;
 	let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;
 
 	let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording(
@@ -704,7 +724,7 @@
 		client.clone(),
 		transaction_pool,
 		prometheus_registry,
-		telemetry.clone(),
+		telemetry,
 	);
 	let proposer = Proposer::new(proposer_factory);
 
@@ -1043,7 +1063,7 @@
 				select_chain,
 			};
 
-			create_full::<_, _, _, Runtime, RuntimeApi, _>(&mut rpc_module, full_deps)?;
+			create_full::<_, _, _, Runtime, _>(&mut rpc_module, full_deps)?;
 
 			let eth_deps = EthDeps {
 				client,
modifiedpallets/app-promotion/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/app-promotion/src/benchmarking.rs
+++ b/pallets/app-promotion/src/benchmarking.rs
@@ -161,7 +161,7 @@
 		T::RelayBlockNumberProvider::set_block_number(30_000.into());
 
 		#[extrinsic_call]
-		_(RawOrigin::Signed(pallet_admin.clone()), Some(b as u8));
+		_(RawOrigin::Signed(pallet_admin), Some(b as u8));
 
 		Ok(())
 	}
@@ -178,7 +178,7 @@
 
 		#[extrinsic_call]
 		_(
-			RawOrigin::Signed(caller.clone()),
+			RawOrigin::Signed(caller),
 			share * <T as Config>::Currency::total_balance(&caller),
 		);
 
@@ -211,7 +211,7 @@
 			.collect::<Result<Vec<_>, _>>()?;
 
 		#[extrinsic_call]
-		_(RawOrigin::Signed(caller.clone()));
+		_(RawOrigin::Signed(caller));
 
 		Ok(())
 	}
@@ -242,7 +242,7 @@
 
 		#[extrinsic_call]
 		_(
-			RawOrigin::Signed(caller.clone()),
+			RawOrigin::Signed(caller),
 			Into::<BalanceOf<T>>::into(1000u128) * T::Nominal::get(),
 		);
 
@@ -268,7 +268,7 @@
 		let collection = create_nft_collection::<T>(caller)?;
 
 		#[extrinsic_call]
-		_(RawOrigin::Signed(pallet_admin.clone()), collection);
+		_(RawOrigin::Signed(pallet_admin), collection);
 
 		Ok(())
 	}
@@ -296,7 +296,7 @@
 		)?;
 
 		#[extrinsic_call]
-		_(RawOrigin::Signed(pallet_admin.clone()), collection);
+		_(RawOrigin::Signed(pallet_admin), collection);
 
 		Ok(())
 	}
@@ -319,7 +319,7 @@
 		<EvmMigrationPallet<T>>::finish(RawOrigin::Root.into(), address, data)?;
 
 		#[extrinsic_call]
-		_(RawOrigin::Signed(pallet_admin.clone()), address);
+		_(RawOrigin::Signed(pallet_admin), address);
 
 		Ok(())
 	}
@@ -346,7 +346,7 @@
 		)?;
 
 		#[extrinsic_call]
-		_(RawOrigin::Signed(pallet_admin.clone()), address);
+		_(RawOrigin::Signed(pallet_admin), address);
 
 		Ok(())
 	}
modifiedpallets/nonfungible/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/benchmarking.rs
+++ b/pallets/nonfungible/src/benchmarking.rs
@@ -75,7 +75,7 @@
 
 		#[block]
 		{
-			create_max_item(&collection, &sender, to.clone())?;
+			create_max_item(&collection, &sender, to)?;
 		}
 
 		Ok(())
modifiedpallets/refungible/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/refungible/src/benchmarking.rs
+++ b/pallets/refungible/src/benchmarking.rs
@@ -82,7 +82,7 @@
 
 		#[block]
 		{
-			create_max_item(&collection, &sender, [(to.clone(), 200)])?;
+			create_max_item(&collection, &sender, [(to, 200)])?;
 		}
 
 		Ok(())
modifiedpallets/unique/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/unique/src/benchmarking.rs
+++ b/pallets/unique/src/benchmarking.rs
@@ -107,7 +107,7 @@
 		let collection = create_nft_collection::<T>(caller.clone())?;
 
 		#[extrinsic_call]
-		_(RawOrigin::Signed(caller.clone()), collection);
+		_(RawOrigin::Signed(caller), collection);
 
 		Ok(())
 	}
@@ -120,7 +120,7 @@
 
 		#[extrinsic_call]
 		_(
-			RawOrigin::Signed(caller.clone()),
+			RawOrigin::Signed(caller),
 			collection,
 			T::CrossAccountId::from_sub(allowlist_account),
 		);
@@ -141,7 +141,7 @@
 
 		#[extrinsic_call]
 		_(
-			RawOrigin::Signed(caller.clone()),
+			RawOrigin::Signed(caller),
 			collection,
 			T::CrossAccountId::from_sub(allowlist_account),
 		);
@@ -156,7 +156,7 @@
 		let new_owner: T::AccountId = account("admin", 0, SEED);
 
 		#[extrinsic_call]
-		_(RawOrigin::Signed(caller.clone()), collection, new_owner);
+		_(RawOrigin::Signed(caller), collection, new_owner);
 
 		Ok(())
 	}
@@ -169,7 +169,7 @@
 
 		#[extrinsic_call]
 		_(
-			RawOrigin::Signed(caller.clone()),
+			RawOrigin::Signed(caller),
 			collection,
 			T::CrossAccountId::from_sub(new_admin),
 		);
@@ -190,7 +190,7 @@
 
 		#[extrinsic_call]
 		_(
-			RawOrigin::Signed(caller.clone()),
+			RawOrigin::Signed(caller),
 			collection,
 			T::CrossAccountId::from_sub(new_admin),
 		);
@@ -204,11 +204,7 @@
 		let collection = create_nft_collection::<T>(caller.clone())?;
 
 		#[extrinsic_call]
-		_(
-			RawOrigin::Signed(caller.clone()),
-			collection,
-			caller.clone(),
-		);
+		_(RawOrigin::Signed(caller), collection, caller.clone());
 
 		Ok(())
 	}
@@ -224,7 +220,7 @@
 		)?;
 
 		#[extrinsic_call]
-		_(RawOrigin::Signed(caller.clone()), collection);
+		_(RawOrigin::Signed(caller), collection);
 
 		Ok(())
 	}
@@ -241,7 +237,7 @@
 		<Pallet<T>>::confirm_sponsorship(RawOrigin::Signed(caller.clone()).into(), collection)?;
 
 		#[extrinsic_call]
-		_(RawOrigin::Signed(caller.clone()), collection);
+		_(RawOrigin::Signed(caller), collection);
 
 		Ok(())
 	}
@@ -252,7 +248,7 @@
 		let collection = create_nft_collection::<T>(caller.clone())?;
 
 		#[extrinsic_call]
-		_(RawOrigin::Signed(caller.clone()), collection, false);
+		_(RawOrigin::Signed(caller), collection, false);
 
 		Ok(())
 	}
@@ -275,7 +271,7 @@
 		};
 
 		#[extrinsic_call]
-		set_collection_limits(RawOrigin::Signed(caller.clone()), collection, cl);
+		set_collection_limits(RawOrigin::Signed(caller), collection, cl);
 
 		Ok(())
 	}
modifiedruntime/common/config/xcm/foreignassets.rsdiffbeforeafterboth
--- a/runtime/common/config/xcm/foreignassets.rs
+++ b/runtime/common/config/xcm/foreignassets.rs
@@ -77,19 +77,18 @@
 		let here_id =
 			ConvertAssetId::convert(&AssetId::NativeAssetId(NativeCurrency::Here)).unwrap();
 
-		if asset_id.clone() == parent_id {
+		if *asset_id == parent_id {
 			return Some(MultiLocation::parent());
 		}
 
-		if asset_id.clone() == here_id {
+		if *asset_id == here_id {
 			return Some(MultiLocation::new(
 				1,
 				X1(Parachain(ParachainInfo::get().into())),
 			));
 		}
 
-		let fid =
-			<AssetId as TryAsForeign<AssetId, ForeignAssetId>>::try_as_foreign(asset_id.clone())?;
+		let fid = <AssetId as TryAsForeign<AssetId, ForeignAssetId>>::try_as_foreign(*asset_id)?;
 		XcmForeignAssetIdMapping::<Runtime>::get_multi_location(fid)
 	}
 }
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -271,6 +271,7 @@
 sp-runtime = { workspace = true }
 sp-session = { workspace = true }
 sp-std = { workspace = true }
+sp-storage = { workspace = true }
 sp-transaction-pool = { workspace = true }
 sp-version = { workspace = true }
 staging-xcm = { workspace = true }
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -274,6 +274,7 @@
 sp-runtime = { workspace = true }
 sp-session = { workspace = true }
 sp-std = { workspace = true }
+sp-storage = { workspace = true }
 sp-transaction-pool = { workspace = true }
 sp-version = { workspace = true }
 staging-xcm = { workspace = true }