git.delta.rocks / unique-network / refs/commits / 79c3b738b866

difftreelog

feat preimage + execute preimage in maintenance pallet

Fahrrader2023-02-21parent: #8c90034.patch.diff
in: master

13 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5541,6 +5541,7 @@
  "pallet-inflation",
  "pallet-maintenance",
  "pallet-nonfungible",
+ "pallet-preimage",
  "pallet-randomness-collective-flip",
  "pallet-refungible",
  "pallet-session",
@@ -6480,6 +6481,7 @@
  "frame-system",
  "parity-scale-codec",
  "scale-info",
+ "sp-core",
  "sp-std",
 ]
 
@@ -8968,6 +8970,7 @@
  "pallet-inflation",
  "pallet-maintenance",
  "pallet-nonfungible",
+ "pallet-preimage",
  "pallet-randomness-collective-flip",
  "pallet-refungible",
  "pallet-session",
@@ -13198,6 +13201,7 @@
  "pallet-inflation",
  "pallet-maintenance",
  "pallet-nonfungible",
+ "pallet-preimage",
  "pallet-randomness-collective-flip",
  "pallet-refungible",
  "pallet-session",
modifiedCargo.tomldiffbeforeafterboth
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -98,6 +98,7 @@
 pallet-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
 pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
 pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
+pallet-preimage = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
 pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
 pallet-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
 pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
modifiedpallets/maintenance/Cargo.tomldiffbeforeafterboth
--- a/pallets/maintenance/Cargo.toml
+++ b/pallets/maintenance/Cargo.toml
@@ -18,10 +18,11 @@
 frame-benchmarking = { workspace = true, optional = true }
 frame-support = { workspace = true }
 frame-system = { workspace = true }
+sp-core = { workspace = true }
 sp-std = { workspace = true }
 
 [features]
 default = ["std"]
 runtime-benchmarks = ["frame-benchmarking", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks"]
-std = ["codec/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", "scale-info/std", "sp-std/std"]
+std = ["codec/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", "scale-info/std", "sp-core/std", "sp-std/std"]
 try-runtime = ["frame-support/try-runtime"]
modifiedpallets/maintenance/src/lib.rsdiffbeforeafterboth
--- a/pallets/maintenance/src/lib.rs
+++ b/pallets/maintenance/src/lib.rs
@@ -25,13 +25,37 @@
 
 #[frame_support::pallet]
 pub mod pallet {
-	use frame_support::pallet_prelude::*;
+	use frame_support::{
+		dispatch::*,
+		pallet_prelude::*,
+		traits::{QueryPreimage, StorePreimage},
+	};
 	use frame_system::pallet_prelude::*;
+	use sp_core::H256;
+
 	use crate::weights::WeightInfo;
 
 	#[pallet::config]
 	pub trait Config: frame_system::Config {
+		/// The overarching event type.
 		type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
+
+		/// The runtime origin type.
+		type RuntimeOrigin: From<RawOrigin<Self::AccountId>>
+			+ IsType<<Self as frame_system::Config>::RuntimeOrigin>;
+
+		/// The aggregated call type.
+		type RuntimeCall: Parameter
+			+ Dispatchable<
+				RuntimeOrigin = <Self as Config>::RuntimeOrigin,
+				PostInfo = PostDispatchInfo,
+			> + GetDispatchInfo
+			+ From<frame_system::Call<Self>>;
+
+		/// The preimage provider with which we look up call hashes to get the call.
+		type Preimages: QueryPreimage + StorePreimage;
+
+		/// Weight information for extrinsics in this pallet.
 		type WeightInfo: WeightInfo;
 	}
 
@@ -78,5 +102,23 @@
 
 			Ok(())
 		}
+
+		#[pallet::call_index(2)]
+		#[pallet::weight(<T as Config>::WeightInfo::execute_preimage())]
+		pub fn execute_preimage(origin: OriginFor<T>, hash: H256) -> DispatchResult {
+			ensure_root(origin)?;
+
+			let len = T::Preimages::len(&hash).ok_or(DispatchError::Unavailable)?;
+			let bounded = T::Preimages::pick::<<T as Config>::RuntimeCall>(hash, len);
+			let (call, _) =
+				T::Preimages::realize(&bounded).map_err(|_| DispatchError::Unavailable)?;
+
+			let result = match call.dispatch(frame_system::RawOrigin::Root.into()) {
+				Ok(_) => Ok(()),
+				Err(error_and_info) => Err(error_and_info.error),
+			};
+
+			result
+		}
 	}
 }
modifiedpallets/scheduler-v2/Cargo.tomldiffbeforeafterboth
--- a/pallets/scheduler-v2/Cargo.toml
+++ b/pallets/scheduler-v2/Cargo.toml
@@ -24,7 +24,7 @@
 sp-std = { workspace = true }
 
 [dev-dependencies]
-pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
+pallet-preimage = { workspace = true }
 substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
 
 [features]
addedruntime/common/config/pallets/governance.rsdiffbeforeafterboth
--- /dev/null
+++ b/runtime/common/config/pallets/governance.rs
@@ -0,0 +1,34 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// 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::parameter_types;
+use frame_system::EnsureRoot;
+use crate::{AccountId, Balance, Balances, Runtime, RuntimeEvent};
+use up_common::constants::*;
+
+parameter_types! {
+	pub PreimageBaseDeposit: Balance = 1000 * UNIQUE; // deposit(2, 64);
+	// pub PreimageByteDeposit: Balance = 1 * CENTIUNIQUE; // deposit(0, 1);
+}
+
+impl pallet_preimage::Config for Runtime {
+	type WeightInfo = pallet_preimage::weights::SubstrateWeight<Runtime>;
+	type RuntimeEvent = RuntimeEvent;
+	type Currency = Balances;
+	type ManagerOrigin = EnsureRoot<AccountId>;
+	type BaseDeposit = PreimageBaseDeposit;
+	type ByteDeposit = TransactionByteFee;
+}
modifiedruntime/common/config/pallets/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -23,7 +23,7 @@
 		weights::CommonWeights,
 		RelayChainBlockNumberProvider,
 	},
-	Runtime, RuntimeEvent, RuntimeCall, Balances,
+	Runtime, RuntimeEvent, RuntimeCall, RuntimeOrigin, Balances, Preimage,
 };
 use frame_support::traits::{ConstU32, ConstU64};
 use up_common::{
@@ -47,6 +47,10 @@
 #[cfg(feature = "collator-selection")]
 pub mod collator_selection;
 
+// todo:governance replace the feature with governance
+#[cfg(feature = "collator-selection")]
+pub mod governance;
+
 parameter_types! {
 	pub TreasuryAccountId: AccountId = TreasuryModuleId::get().into_account_truncating();
 	pub const CollectionCreationPrice: Balance = 2 * UNIQUE;
@@ -123,5 +127,8 @@
 
 impl pallet_maintenance::Config for Runtime {
 	type RuntimeEvent = RuntimeEvent;
+	type RuntimeOrigin = RuntimeOrigin;
+	type RuntimeCall = RuntimeCall;
+	type Preimages = Preimage;
 	type WeightInfo = pallet_maintenance::weights::SubstrateWeight<Self>;
 }
modifiedruntime/common/construct_runtime.rsdiffbeforeafterboth
--- a/runtime/common/construct_runtime.rs
+++ b/runtime/common/construct_runtime.rs
@@ -56,6 +56,10 @@
                 #[cfg(feature = "collator-selection")]
                 Identity: pallet_identity::{Pallet, Call, Storage, Event<T>} = 40,
 
+                // todo:governance switch feature to governance
+                #[cfg(feature = "collator-selection")]
+                Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 41,
+
                 // XCM helpers.
                 XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,
                 PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 51,
modifiedruntime/common/maintenance.rsdiffbeforeafterboth
--- a/runtime/common/maintenance.rs
+++ b/runtime/common/maintenance.rs
@@ -86,6 +86,10 @@
 				| RuntimeCall::Session(_)
 				| RuntimeCall::Identity(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
 
+				// todo:governance switch the feature to governance
+				#[cfg(feature = "collator-selection")]
+				RuntimeCall::Preimage(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
+
 				#[cfg(feature = "pallet-test-utils")]
 				RuntimeCall::TestUtils(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
 
modifiedruntime/common/runtime_apis.rsdiffbeforeafterboth
--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -565,6 +565,10 @@
                     #[cfg(feature = "collator-selection")]
                     list_benchmark!(list, extra, pallet_identity, Identity);
 
+                    // todo:governance switch feature to governance
+                    #[cfg(feature = "collator-selection")]
+                    list_benchmark!(list, extra, pallet_preimage, Preimage);
+
                     #[cfg(feature = "foreign-assets")]
                     list_benchmark!(list, extra, pallet_foreign_assets, ForeignAssets);
 
@@ -629,6 +633,10 @@
                     #[cfg(feature = "collator-selection")]
                     add_benchmark!(params, batches, pallet_identity, Identity);
 
+                    // todo:governance switch feature to governance
+                    #[cfg(feature = "collator-selection")]
+                    add_benchmark!(params, batches, pallet_preimage, Preimage);
+
                     #[cfg(feature = "foreign-assets")]
                     add_benchmark!(params, batches, pallet_foreign_assets, ForeignAssets);
 
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
before · runtime/opal/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Opal Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'opal-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version.workspace = true1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['opal-runtime', 'std']20limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']21opal-runtime = ['app-promotion', 'collator-selection', 'foreign-assets', 'pallet-test-utils', 'refungible']22pov-estimate = []23runtime-benchmarks = [24	'cumulus-pallet-parachain-system/runtime-benchmarks',25	'frame-benchmarking',26	'frame-support/runtime-benchmarks',27	'frame-system-benchmarking',28	'frame-system/runtime-benchmarks',29	'hex-literal',30	'pallet-app-promotion/runtime-benchmarks',31	'pallet-balances/runtime-benchmarks',32	'pallet-collator-selection/runtime-benchmarks',33	'pallet-common/runtime-benchmarks',34	'pallet-configuration/runtime-benchmarks',35	'pallet-ethereum/runtime-benchmarks',36	'pallet-evm-coder-substrate/runtime-benchmarks',37	'pallet-evm-migration/runtime-benchmarks',38	'pallet-foreign-assets/runtime-benchmarks',39	'pallet-fungible/runtime-benchmarks',40	'pallet-identity/runtime-benchmarks',41	'pallet-inflation/runtime-benchmarks',42	'pallet-maintenance/runtime-benchmarks',43	'pallet-nonfungible/runtime-benchmarks',44	'pallet-refungible/runtime-benchmarks',45	'pallet-structure/runtime-benchmarks',46	'pallet-timestamp/runtime-benchmarks',47	'pallet-unique-scheduler-v2/runtime-benchmarks',48	'pallet-unique/runtime-benchmarks',49	'pallet-xcm/runtime-benchmarks',50	'sp-runtime/runtime-benchmarks',51	'xcm-builder/runtime-benchmarks',52]53std = [54	'codec/std',55	'cumulus-pallet-aura-ext/std',56	'cumulus-pallet-parachain-system/std',57	'cumulus-pallet-xcm/std',58	'cumulus-pallet-xcmp-queue/std',59	'cumulus-primitives-core/std',60	'cumulus-primitives-utility/std',61	'frame-executive/std',62	'frame-support/std',63	'frame-system-rpc-runtime-api/std',64	'frame-system/std',65	'frame-try-runtime/std',66	'pallet-aura/std',67	'pallet-balances/std',68	# 'pallet-contracts/std',69	# 'pallet-contracts-primitives/std',70	# 'pallet-contracts-rpc-runtime-api/std',71	# 'pallet-contract-helpers/std',72	"pallet-authorship/std",73	"pallet-session/std",74	"sp-consensus-aura/std",75	'app-promotion-rpc/std',76	'evm-coder/std',77	'fp-evm-mapping/std',78	'fp-rpc/std',79	'fp-self-contained/std',80	'pallet-app-promotion/std',81	'pallet-base-fee/std',82	'pallet-charge-transaction/std',83	'pallet-collator-selection/std',84	'pallet-common/std',85	'pallet-configuration/std',86	'pallet-ethereum/std',87	'pallet-evm-coder-substrate/std',88	'pallet-evm-contract-helpers/std',89	'pallet-evm-migration/std',90	'pallet-evm-transaction-payment/std',91	'pallet-evm/std',92	'pallet-fungible/std',93	'pallet-identity/std',94	'pallet-inflation/std',95	'pallet-nonfungible/std',96	'pallet-randomness-collective-flip/std',97	'pallet-refungible/std',98	'pallet-structure/std',99	'pallet-sudo/std',100	'pallet-timestamp/std',101	'pallet-transaction-payment-rpc-runtime-api/std',102	'pallet-transaction-payment/std',103	'pallet-treasury/std',104	'pallet-unique-scheduler-v2/std',105	'pallet-unique/std',106	'parachain-info/std',107	'serde',108	'sp-api/std',109	'sp-block-builder/std',110	'sp-core/std',111	'sp-inherents/std',112	'sp-io/std',113	'sp-offchain/std',114	'sp-runtime/std',115	'sp-session/std',116	'sp-std/std',117	'sp-transaction-pool/std',118	'sp-version/std',119	'up-common/std',120	'up-data-structs/std',121	'up-pov-estimate-rpc/std',122	'up-rpc/std',123	'up-sponsorship/std',124	'xcm-builder/std',125	'xcm-executor/std',126	'xcm/std',127128	"orml-tokens/std",129	"orml-traits/std",130	"orml-vesting/std",131	"orml-xtokens/std",132	"pallet-foreign-assets/std",133134	'pallet-maintenance/std',135	'pallet-test-utils/std',136]137try-runtime = [138	"pallet-authorship/try-runtime",139	"pallet-collator-selection/try-runtime",140	"pallet-identity/try-runtime",141	"pallet-session/try-runtime",142	'cumulus-pallet-aura-ext/try-runtime',143	'cumulus-pallet-dmp-queue/try-runtime',144	'cumulus-pallet-parachain-system/try-runtime',145	'cumulus-pallet-xcm/try-runtime',146	'cumulus-pallet-xcmp-queue/try-runtime',147	'fp-self-contained/try-runtime',148	'frame-executive/try-runtime',149	'frame-support/try-runtime',150	'frame-system/try-runtime',151	'frame-try-runtime',152	'frame-try-runtime?/try-runtime',153	'orml-tokens/try-runtime',154	'orml-vesting/try-runtime',155	'orml-xtokens/try-runtime',156	'pallet-app-promotion/try-runtime',157	'pallet-aura/try-runtime',158	'pallet-balances/try-runtime',159	'pallet-base-fee/try-runtime',160	'pallet-charge-transaction/try-runtime',161	'pallet-common/try-runtime',162	'pallet-configuration/try-runtime',163	'pallet-ethereum/try-runtime',164	'pallet-evm-coder-substrate/try-runtime',165	'pallet-evm-contract-helpers/try-runtime',166	'pallet-evm-migration/try-runtime',167	'pallet-evm-transaction-payment/try-runtime',168	'pallet-evm/try-runtime',169	'pallet-foreign-assets/try-runtime',170	'pallet-fungible/try-runtime',171	'pallet-inflation/try-runtime',172	'pallet-maintenance/try-runtime',173	'pallet-nonfungible/try-runtime',174	'pallet-randomness-collective-flip/try-runtime',175	'pallet-refungible/try-runtime',176	'pallet-structure/try-runtime',177	'pallet-sudo/try-runtime',178	'pallet-test-utils/try-runtime',179	'pallet-timestamp/try-runtime',180	'pallet-transaction-payment/try-runtime',181	'pallet-treasury/try-runtime',182	'pallet-unique-scheduler-v2/try-runtime',183	'pallet-unique/try-runtime',184	'pallet-xcm/try-runtime',185	'parachain-info/try-runtime',186]187188app-promotion = []189collator-selection = []190foreign-assets = []191pallet-test-utils = []192refungible = []193scheduler = []194195################################################################################196# local dependencies197198[dependencies]199# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.200codec = { workspace = true, package = "parity-scale-codec" }201202cumulus-pallet-aura-ext = { workspace = true }203cumulus-pallet-dmp-queue = { workspace = true }204cumulus-pallet-parachain-system = { workspace = true }205cumulus-pallet-xcm = { workspace = true }206cumulus-pallet-xcmp-queue = { workspace = true }207cumulus-primitives-core = { workspace = true }208cumulus-primitives-timestamp = { workspace = true }209cumulus-primitives-utility = { workspace = true }210frame-executive = { workspace = true }211frame-support = { workspace = true }212frame-system = { workspace = true }213frame-system-rpc-runtime-api = { workspace = true }214orml-tokens = { workspace = true }215orml-traits = { workspace = true }216orml-vesting = { workspace = true }217orml-xtokens = { workspace = true }218pallet-aura = { workspace = true }219pallet-authorship = { workspace = true }220pallet-balances = { workspace = true }221pallet-randomness-collective-flip = { workspace = true }222pallet-session = { workspace = true }223pallet-sudo = { workspace = true }224pallet-timestamp = { workspace = true }225pallet-transaction-payment = { workspace = true }226pallet-transaction-payment-rpc-runtime-api = { workspace = true }227pallet-treasury = { workspace = true }228pallet-xcm = { workspace = true }229parachain-info = { workspace = true }230polkadot-parachain = { workspace = true }231smallvec = { workspace = true }232sp-api = { workspace = true }233sp-arithmetic = { workspace = true }234sp-block-builder = { workspace = true }235sp-consensus-aura = { workspace = true }236sp-core = { workspace = true }237sp-inherents = { workspace = true }238sp-io = { workspace = true }239sp-offchain = { workspace = true }240sp-runtime = { workspace = true }241sp-session = { workspace = true }242sp-std = { workspace = true }243sp-transaction-pool = { workspace = true }244sp-version = { workspace = true }245xcm = { workspace = true }246xcm-builder = { workspace = true }247xcm-executor = { workspace = true }248249app-promotion-rpc = { workspace = true }250derivative = { workspace = true }251evm-coder = { workspace = true }252fp-evm = { workspace = true }253fp-evm-mapping = { workspace = true }254fp-rpc = { workspace = true }255fp-self-contained = { workspace = true }256log = { workspace = true }257num_enum = { workspace = true }258pallet-app-promotion = { workspace = true }259pallet-base-fee = { workspace = true }260pallet-charge-transaction = { workspace = true }261pallet-collator-selection = { workspace = true }262pallet-common = { workspace = true }263pallet-configuration = { workspace = true }264pallet-ethereum = { workspace = true }265pallet-evm = { workspace = true }266pallet-evm-coder-substrate = { workspace = true }267pallet-evm-contract-helpers = { workspace = true }268pallet-evm-migration = { workspace = true }269pallet-evm-precompile-simple = { workspace = true }270pallet-evm-transaction-payment = { workspace = true }271pallet-foreign-assets = { workspace = true }272pallet-fungible = { workspace = true }273pallet-identity = { workspace = true }274pallet-inflation = { workspace = true }275pallet-maintenance = { workspace = true }276pallet-nonfungible = { workspace = true }277pallet-refungible = { workspace = true }278pallet-structure = { workspace = true }279pallet-unique = { workspace = true }280pallet-unique-scheduler-v2 = { workspace = true }281precompile-utils-macro = { workspace = true }282scale-info = { workspace = true }283up-common = { workspace = true }284up-data-structs = { workspace = true }285up-pov-estimate-rpc = { workspace = true }286up-rpc = { workspace = true }287up-sponsorship = { workspace = true }288289################################################################################290# Optional dependencies291292frame-system-benchmarking = { workspace = true, optional = true}293frame-benchmarking = { workspace = true, optional = true }294frame-try-runtime = { workspace = true, optional = true }295serde = { workspace = true, optional = true }296hex-literal = { workspace = true, optional = true }297298################################################################################299# Test dependencies300301pallet-test-utils = { workspace = true }302303################################################################################304# Other Dependencies305306impl-trait-for-tuples = { workspace = true }307308[dev-dependencies]309logtest = { workspace = true }310311[build-dependencies]312substrate-wasm-builder = { workspace = true }
after · runtime/opal/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Opal Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'opal-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version.workspace = true1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['opal-runtime', 'std']20limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']21opal-runtime = ['app-promotion', 'collator-selection', 'foreign-assets', 'pallet-test-utils', 'refungible']22pov-estimate = []23runtime-benchmarks = [24	'cumulus-pallet-parachain-system/runtime-benchmarks',25	'frame-benchmarking',26	'frame-support/runtime-benchmarks',27	'frame-system-benchmarking',28	'frame-system/runtime-benchmarks',29	'hex-literal',30	'pallet-app-promotion/runtime-benchmarks',31	'pallet-balances/runtime-benchmarks',32	'pallet-collator-selection/runtime-benchmarks',33	'pallet-common/runtime-benchmarks',34	'pallet-configuration/runtime-benchmarks',35	'pallet-ethereum/runtime-benchmarks',36	'pallet-evm-coder-substrate/runtime-benchmarks',37	'pallet-evm-migration/runtime-benchmarks',38	'pallet-foreign-assets/runtime-benchmarks',39	'pallet-fungible/runtime-benchmarks',40	'pallet-identity/runtime-benchmarks',41	'pallet-inflation/runtime-benchmarks',42	'pallet-maintenance/runtime-benchmarks',43	'pallet-nonfungible/runtime-benchmarks',44	"pallet-preimage/runtime-benchmarks",45	'pallet-refungible/runtime-benchmarks',46	'pallet-structure/runtime-benchmarks',47	'pallet-timestamp/runtime-benchmarks',48	'pallet-unique-scheduler-v2/runtime-benchmarks',49	'pallet-unique/runtime-benchmarks',50	'pallet-xcm/runtime-benchmarks',51	'sp-runtime/runtime-benchmarks',52	'xcm-builder/runtime-benchmarks',53]54std = [55	'codec/std',56	'cumulus-pallet-aura-ext/std',57	'cumulus-pallet-parachain-system/std',58	'cumulus-pallet-xcm/std',59	'cumulus-pallet-xcmp-queue/std',60	'cumulus-primitives-core/std',61	'cumulus-primitives-utility/std',62	'frame-executive/std',63	'frame-support/std',64	'frame-system-rpc-runtime-api/std',65	'frame-system/std',66	'frame-try-runtime/std',67	'pallet-aura/std',68	'pallet-balances/std',69	# 'pallet-contracts/std',70	# 'pallet-contracts-primitives/std',71	# 'pallet-contracts-rpc-runtime-api/std',72	# 'pallet-contract-helpers/std',73	"pallet-preimage/std",74	"pallet-authorship/std",75	"pallet-session/std",76	"sp-consensus-aura/std",77	'app-promotion-rpc/std',78	'evm-coder/std',79	'fp-evm-mapping/std',80	'fp-rpc/std',81	'fp-self-contained/std',82	'pallet-app-promotion/std',83	'pallet-base-fee/std',84	'pallet-charge-transaction/std',85	'pallet-collator-selection/std',86	'pallet-common/std',87	'pallet-configuration/std',88	'pallet-ethereum/std',89	'pallet-evm-coder-substrate/std',90	'pallet-evm-contract-helpers/std',91	'pallet-evm-migration/std',92	'pallet-evm-transaction-payment/std',93	'pallet-evm/std',94	'pallet-fungible/std',95	'pallet-identity/std',96	'pallet-inflation/std',97	'pallet-nonfungible/std',98	'pallet-randomness-collective-flip/std',99	'pallet-refungible/std',100	'pallet-structure/std',101	'pallet-sudo/std',102	'pallet-timestamp/std',103	'pallet-transaction-payment-rpc-runtime-api/std',104	'pallet-transaction-payment/std',105	'pallet-treasury/std',106	'pallet-unique-scheduler-v2/std',107	'pallet-unique/std',108	'parachain-info/std',109	'serde',110	'sp-api/std',111	'sp-block-builder/std',112	'sp-core/std',113	'sp-inherents/std',114	'sp-io/std',115	'sp-offchain/std',116	'sp-runtime/std',117	'sp-session/std',118	'sp-std/std',119	'sp-transaction-pool/std',120	'sp-version/std',121	'up-common/std',122	'up-data-structs/std',123	'up-pov-estimate-rpc/std',124	'up-rpc/std',125	'up-sponsorship/std',126	'xcm-builder/std',127	'xcm-executor/std',128	'xcm/std',129130	"orml-tokens/std",131	"orml-traits/std",132	"orml-vesting/std",133	"orml-xtokens/std",134	"pallet-foreign-assets/std",135136	'pallet-maintenance/std',137	'pallet-test-utils/std',138]139try-runtime = [140	"pallet-authorship/try-runtime",141	"pallet-collator-selection/try-runtime",142	"pallet-identity/try-runtime",143	"pallet-session/try-runtime",144	"pallet-preimage/try-runtime",145	'cumulus-pallet-aura-ext/try-runtime',146	'cumulus-pallet-dmp-queue/try-runtime',147	'cumulus-pallet-parachain-system/try-runtime',148	'cumulus-pallet-xcm/try-runtime',149	'cumulus-pallet-xcmp-queue/try-runtime',150	'fp-self-contained/try-runtime',151	'frame-executive/try-runtime',152	'frame-support/try-runtime',153	'frame-system/try-runtime',154	'frame-try-runtime',155	'frame-try-runtime?/try-runtime',156	'orml-tokens/try-runtime',157	'orml-vesting/try-runtime',158	'orml-xtokens/try-runtime',159	'pallet-app-promotion/try-runtime',160	'pallet-aura/try-runtime',161	'pallet-balances/try-runtime',162	'pallet-base-fee/try-runtime',163	'pallet-charge-transaction/try-runtime',164	'pallet-common/try-runtime',165	'pallet-configuration/try-runtime',166	'pallet-ethereum/try-runtime',167	'pallet-evm-coder-substrate/try-runtime',168	'pallet-evm-contract-helpers/try-runtime',169	'pallet-evm-migration/try-runtime',170	'pallet-evm-transaction-payment/try-runtime',171	'pallet-evm/try-runtime',172	'pallet-foreign-assets/try-runtime',173	'pallet-fungible/try-runtime',174	'pallet-inflation/try-runtime',175	'pallet-maintenance/try-runtime',176	'pallet-nonfungible/try-runtime',177	'pallet-randomness-collective-flip/try-runtime',178	'pallet-refungible/try-runtime',179	'pallet-structure/try-runtime',180	'pallet-sudo/try-runtime',181	'pallet-test-utils/try-runtime',182	'pallet-timestamp/try-runtime',183	'pallet-transaction-payment/try-runtime',184	'pallet-treasury/try-runtime',185	'pallet-unique-scheduler-v2/try-runtime',186	'pallet-unique/try-runtime',187	'pallet-xcm/try-runtime',188	'parachain-info/try-runtime',189]190191app-promotion = []192collator-selection = []193foreign-assets = []194pallet-test-utils = []195refungible = []196scheduler = []197198################################################################################199# local dependencies200201[dependencies]202# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.203codec = { workspace = true, package = "parity-scale-codec" }204205cumulus-pallet-aura-ext = { workspace = true }206cumulus-pallet-dmp-queue = { workspace = true }207cumulus-pallet-parachain-system = { workspace = true }208cumulus-pallet-xcm = { workspace = true }209cumulus-pallet-xcmp-queue = { workspace = true }210cumulus-primitives-core = { workspace = true }211cumulus-primitives-timestamp = { workspace = true }212cumulus-primitives-utility = { workspace = true }213frame-executive = { workspace = true }214frame-support = { workspace = true }215frame-system = { workspace = true }216frame-system-rpc-runtime-api = { workspace = true }217orml-tokens = { workspace = true }218orml-traits = { workspace = true }219orml-vesting = { workspace = true }220orml-xtokens = { workspace = true }221pallet-aura = { workspace = true }222pallet-authorship = { workspace = true }223pallet-balances = { workspace = true }224pallet-preimage = { workspace = true }225pallet-randomness-collective-flip = { workspace = true }226pallet-session = { workspace = true }227pallet-sudo = { workspace = true }228pallet-timestamp = { workspace = true }229pallet-transaction-payment = { workspace = true }230pallet-transaction-payment-rpc-runtime-api = { workspace = true }231pallet-treasury = { workspace = true }232pallet-xcm = { workspace = true }233parachain-info = { workspace = true }234polkadot-parachain = { workspace = true }235smallvec = { workspace = true }236sp-api = { workspace = true }237sp-arithmetic = { workspace = true }238sp-block-builder = { workspace = true }239sp-consensus-aura = { workspace = true }240sp-core = { workspace = true }241sp-inherents = { workspace = true }242sp-io = { workspace = true }243sp-offchain = { workspace = true }244sp-runtime = { workspace = true }245sp-session = { workspace = true }246sp-std = { workspace = true }247sp-transaction-pool = { workspace = true }248sp-version = { workspace = true }249xcm = { workspace = true }250xcm-builder = { workspace = true }251xcm-executor = { workspace = true }252253app-promotion-rpc = { workspace = true }254derivative = { workspace = true }255evm-coder = { workspace = true }256fp-evm = { workspace = true }257fp-evm-mapping = { workspace = true }258fp-rpc = { workspace = true }259fp-self-contained = { workspace = true }260log = { workspace = true }261num_enum = { workspace = true }262pallet-app-promotion = { workspace = true }263pallet-base-fee = { workspace = true }264pallet-charge-transaction = { workspace = true }265pallet-collator-selection = { workspace = true }266pallet-common = { workspace = true }267pallet-configuration = { workspace = true }268pallet-ethereum = { workspace = true }269pallet-evm = { workspace = true }270pallet-evm-coder-substrate = { workspace = true }271pallet-evm-contract-helpers = { workspace = true }272pallet-evm-migration = { workspace = true }273pallet-evm-precompile-simple = { workspace = true }274pallet-evm-transaction-payment = { workspace = true }275pallet-foreign-assets = { workspace = true }276pallet-fungible = { workspace = true }277pallet-identity = { workspace = true }278pallet-inflation = { workspace = true }279pallet-maintenance = { workspace = true }280pallet-nonfungible = { workspace = true }281pallet-refungible = { workspace = true }282pallet-structure = { workspace = true }283pallet-unique = { workspace = true }284pallet-unique-scheduler-v2 = { workspace = true }285precompile-utils-macro = { workspace = true }286scale-info = { workspace = true }287up-common = { workspace = true }288up-data-structs = { workspace = true }289up-pov-estimate-rpc = { workspace = true }290up-rpc = { workspace = true }291up-sponsorship = { workspace = true }292293################################################################################294# Optional dependencies295296frame-system-benchmarking = { workspace = true, optional = true}297frame-benchmarking = { workspace = true, optional = true }298frame-try-runtime = { workspace = true, optional = true }299serde = { workspace = true, optional = true }300hex-literal = { workspace = true, optional = true }301302################################################################################303# Test dependencies304305pallet-test-utils = { workspace = true }306307################################################################################308# Other Dependencies309310impl-trait-for-tuples = { workspace = true }311312[dev-dependencies]313logtest = { workspace = true }314315[build-dependencies]316substrate-wasm-builder = { workspace = true }
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -42,6 +42,7 @@
 	'pallet-inflation/runtime-benchmarks',
 	'pallet-maintenance/runtime-benchmarks',
 	'pallet-nonfungible/runtime-benchmarks',
+	"pallet-preimage/runtime-benchmarks",
 	'pallet-refungible/runtime-benchmarks',
 	'pallet-structure/runtime-benchmarks',
 	'pallet-timestamp/runtime-benchmarks',
@@ -69,6 +70,7 @@
 	# 'pallet-contracts-primitives/std',
 	# 'pallet-contracts-rpc-runtime-api/std',
 	# 'pallet-contract-helpers/std',
+	"pallet-preimage/std",
 	"pallet-authorship/std",
 	"pallet-identity/std",
 	"pallet-session/std",
@@ -136,6 +138,7 @@
 	"pallet-collator-selection/try-runtime",
 	"pallet-identity/try-runtime",
 	"pallet-session/try-runtime",
+	"pallet-preimage/try-runtime",
 	'cumulus-pallet-aura-ext/try-runtime',
 	'cumulus-pallet-dmp-queue/try-runtime',
 	'cumulus-pallet-parachain-system/try-runtime',
@@ -210,6 +213,7 @@
 pallet-aura = { workspace = true }
 pallet-authorship = { workspace = true }
 pallet-balances = { workspace = true }
+pallet-preimage = { workspace = true }
 pallet-randomness-collective-flip = { workspace = true }
 pallet-session = { workspace = true }
 pallet-sudo = { workspace = true }
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -39,6 +39,7 @@
 	'pallet-inflation/runtime-benchmarks',
 	'pallet-maintenance/runtime-benchmarks',
 	'pallet-nonfungible/runtime-benchmarks',
+	"pallet-preimage/runtime-benchmarks",
 	'pallet-refungible/runtime-benchmarks',
 	'pallet-structure/runtime-benchmarks',
 	'pallet-timestamp/runtime-benchmarks',
@@ -67,6 +68,7 @@
 	# 'pallet-contracts-primitives/std',
 	# 'pallet-contracts-rpc-runtime-api/std',
 	# 'pallet-contract-helpers/std',
+	"pallet-preimage/std",
 	"pallet-authorship/std",
 	"pallet-identity/std",
 	"pallet-session/std",
@@ -134,6 +136,7 @@
 	"pallet-collator-selection/try-runtime",
 	"pallet-identity/try-runtime",
 	"pallet-session/try-runtime",
+	"pallet-preimage/try-runtime",
 	'cumulus-pallet-aura-ext/try-runtime',
 	'cumulus-pallet-dmp-queue/try-runtime',
 	'cumulus-pallet-parachain-system/try-runtime',
@@ -209,6 +212,7 @@
 pallet-aura = { workspace = true }
 pallet-authorship = { workspace = true }
 pallet-balances = { workspace = true }
+pallet-preimage = { workspace = true }
 pallet-randomness-collective-flip = { workspace = true }
 pallet-session = { workspace = true }
 pallet-sudo = { workspace = true }