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

difftreelog

feat scheduler feature

Daniel Shiposha2022-08-01parent: #ba78248.patch.diff
in: master

6 files changed

modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -119,8 +119,9 @@
     "orml-vesting/std",
 ]
 limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
-opal-runtime = ['rmrk']
+opal-runtime = ['scheduler', 'rmrk']
 
+scheduler = []
 rmrk = []
 
 ################################################################################
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -110,7 +110,7 @@
 use polkadot_parachain::primitives::Sibling;
 use xcm::v1::{BodyId, Junction::*, MultiLocation, NetworkId, Junctions::*};
 use xcm_builder::{
-	AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,
+	AccountId32Aliases, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
 	EnsureXcmOrigin, FixedWeightBounds, LocationInverter, NativeAsset, ParentAsSuperuser,
 	RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
 	SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
@@ -966,6 +966,8 @@
 }
 
 pub struct SchedulerPaymentExecutor;
+
+#[cfg(feature = "scheduler")]
 impl<T: frame_system::Config + pallet_unique_scheduler::Config, SelfContainedSignedInfo>
 	DispatchCall<T, SelfContainedSignedInfo> for SchedulerPaymentExecutor
 where
@@ -1066,6 +1068,7 @@
 	}
 }
 
+#[cfg(feature = "scheduler")]
 impl pallet_unique_scheduler::Config for Runtime {
 	type Event = Event;
 	type Origin = Origin;
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
before · runtime/quartz/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Quartz Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'quartz-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version = '0.9.24'1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std', 'quartz-runtime']20runtime-benchmarks = [21    'hex-literal',22    'frame-benchmarking',23    'frame-support/runtime-benchmarks',24    'frame-system-benchmarking',25    'frame-system/runtime-benchmarks',26    'pallet-ethereum/runtime-benchmarks',27    'pallet-evm-migration/runtime-benchmarks',28    'pallet-evm-coder-substrate/runtime-benchmarks',29    'pallet-balances/runtime-benchmarks',30    'pallet-timestamp/runtime-benchmarks',31    'pallet-common/runtime-benchmarks',32    'pallet-structure/runtime-benchmarks',33    'pallet-fungible/runtime-benchmarks',34    'pallet-refungible/runtime-benchmarks',35    'pallet-nonfungible/runtime-benchmarks',36    'pallet-proxy-rmrk-core/runtime-benchmarks',37    'pallet-proxy-rmrk-equip/runtime-benchmarks',38    'pallet-unique/runtime-benchmarks',39    'pallet-inflation/runtime-benchmarks',40    'pallet-unique-scheduler/runtime-benchmarks',41    'pallet-xcm/runtime-benchmarks',42    'sp-runtime/runtime-benchmarks',43    'xcm-builder/runtime-benchmarks',44]45try-runtime = [46    'frame-try-runtime',47    'frame-executive/try-runtime',48    'frame-system/try-runtime',49]50std = [51    'codec/std',52    'cumulus-pallet-aura-ext/std',53    'cumulus-pallet-parachain-system/std',54    'cumulus-pallet-xcm/std',55    'cumulus-pallet-xcmp-queue/std',56    'cumulus-primitives-core/std',57    'cumulus-primitives-utility/std',58    'frame-try-runtime/std',59    'frame-executive/std',60    'frame-support/std',61    'frame-system/std',62    'frame-system-rpc-runtime-api/std',63    'pallet-aura/std',64    'pallet-balances/std',65    # 'pallet-contracts/std',66    # 'pallet-contracts-primitives/std',67    # 'pallet-contracts-rpc-runtime-api/std',68    # 'pallet-contract-helpers/std',69    'pallet-randomness-collective-flip/std',70    'pallet-sudo/std',71    'pallet-timestamp/std',72    'pallet-transaction-payment/std',73    'pallet-transaction-payment-rpc-runtime-api/std',74    'pallet-treasury/std',75    # 'pallet-vesting/std',76    'pallet-evm/std',77    'pallet-evm-migration/std',78    'pallet-evm-contract-helpers/std',79    'pallet-evm-transaction-payment/std',80    'pallet-evm-coder-substrate/std',81    'pallet-ethereum/std',82    'pallet-base-fee/std',83    'fp-rpc/std',84    'up-rpc/std',85    'fp-evm-mapping/std',86    'fp-self-contained/std',87    'parachain-info/std',88    'serde',89    'pallet-inflation/std',90    'pallet-common/std',91    'pallet-structure/std',92    'pallet-fungible/std',93    'pallet-refungible/std',94    'pallet-nonfungible/std',95    'pallet-proxy-rmrk-core/std',96    'pallet-proxy-rmrk-equip/std',97    'pallet-unique/std',98    'pallet-unique-scheduler/std',99    'pallet-charge-transaction/std',100    'up-data-structs/std',101    'sp-api/std',102    'sp-block-builder/std',103    "sp-consensus-aura/std",104    'sp-core/std',105    'sp-inherents/std',106    'sp-io/std',107    'sp-offchain/std',108    'sp-runtime/std',109    'sp-session/std',110    'sp-std/std',111    'sp-transaction-pool/std',112    'sp-version/std',113    'xcm/std',114    'xcm-builder/std',115    'xcm-executor/std',116    'unique-runtime-common/std',117118    "orml-vesting/std",119]120limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']121quartz-runtime = []122123rmrk = []124125################################################################################126# Substrate Dependencies127128[dependencies.codec]129default-features = false130features = ['derive']131package = 'parity-scale-codec'132version = '3.1.2'133134[dependencies.frame-benchmarking]135default-features = false136git = "https://github.com/paritytech/substrate"137optional = true138branch = "polkadot-v0.9.24"139140[dependencies.frame-try-runtime]141default-features = false142git = 'https://github.com/paritytech/substrate'143optional = true144branch = 'polkadot-v0.9.24'145146[dependencies.frame-executive]147default-features = false148git = "https://github.com/paritytech/substrate"149branch = "polkadot-v0.9.24"150151[dependencies.frame-support]152default-features = false153git = "https://github.com/paritytech/substrate"154branch = "polkadot-v0.9.24"155156[dependencies.frame-system]157default-features = false158git = "https://github.com/paritytech/substrate"159branch = "polkadot-v0.9.24"160161[dependencies.frame-system-benchmarking]162default-features = false163git = "https://github.com/paritytech/substrate"164optional = true165branch = "polkadot-v0.9.24"166167[dependencies.frame-system-rpc-runtime-api]168default-features = false169git = "https://github.com/paritytech/substrate"170branch = "polkadot-v0.9.24"171172[dependencies.hex-literal]173optional = true174version = '0.3.3'175176[dependencies.serde]177default-features = false178features = ['derive']179optional = true180version = '1.0.130'181182[dependencies.pallet-aura]183default-features = false184git = "https://github.com/paritytech/substrate"185branch = "polkadot-v0.9.24"186187[dependencies.pallet-balances]188default-features = false189git = "https://github.com/paritytech/substrate"190branch = "polkadot-v0.9.24"191192# Contracts specific packages193# [dependencies.pallet-contracts]194# git = 'https://github.com/paritytech/substrate'195# default-features = false196# branch = 'master'197# version = '4.0.0-dev'198199# [dependencies.pallet-contracts-primitives]200# git = 'https://github.com/paritytech/substrate'201# default-features = false202# branch = 'master'203# version = '4.0.0-dev'204205# [dependencies.pallet-contracts-rpc-runtime-api]206# git = 'https://github.com/paritytech/substrate'207# default-features = false208# branch = 'master'209# version = '4.0.0-dev'210211[dependencies.pallet-randomness-collective-flip]212default-features = false213git = "https://github.com/paritytech/substrate"214branch = "polkadot-v0.9.24"215216[dependencies.pallet-sudo]217default-features = false218git = "https://github.com/paritytech/substrate"219branch = "polkadot-v0.9.24"220221[dependencies.pallet-timestamp]222default-features = false223git = "https://github.com/paritytech/substrate"224branch = "polkadot-v0.9.24"225226[dependencies.pallet-transaction-payment]227default-features = false228git = "https://github.com/paritytech/substrate"229branch = "polkadot-v0.9.24"230231[dependencies.pallet-transaction-payment-rpc-runtime-api]232default-features = false233git = "https://github.com/paritytech/substrate"234branch = "polkadot-v0.9.24"235236[dependencies.pallet-treasury]237default-features = false238git = "https://github.com/paritytech/substrate"239branch = "polkadot-v0.9.24"240241# [dependencies.pallet-vesting]242# default-features = false243# git = 'https://github.com/paritytech/substrate'244# branch = 'master'245246[dependencies.sp-arithmetic]247default-features = false248git = "https://github.com/paritytech/substrate"249branch = "polkadot-v0.9.24"250251[dependencies.sp-api]252default-features = false253git = "https://github.com/paritytech/substrate"254branch = "polkadot-v0.9.24"255256[dependencies.sp-block-builder]257default-features = false258git = "https://github.com/paritytech/substrate"259branch = "polkadot-v0.9.24"260261[dependencies.sp-core]262default-features = false263git = "https://github.com/paritytech/substrate"264branch = "polkadot-v0.9.24"265266[dependencies.sp-consensus-aura]267default-features = false268git = "https://github.com/paritytech/substrate"269branch = "polkadot-v0.9.24"270271[dependencies.sp-inherents]272default-features = false273git = "https://github.com/paritytech/substrate"274branch = "polkadot-v0.9.24"275276[dependencies.sp-io]277default-features = false278git = "https://github.com/paritytech/substrate"279branch = "polkadot-v0.9.24"280281[dependencies.sp-offchain]282default-features = false283git = "https://github.com/paritytech/substrate"284branch = "polkadot-v0.9.24"285286[dependencies.sp-runtime]287default-features = false288git = "https://github.com/paritytech/substrate"289branch = "polkadot-v0.9.24"290291[dependencies.sp-session]292default-features = false293git = "https://github.com/paritytech/substrate"294branch = "polkadot-v0.9.24"295296[dependencies.sp-std]297default-features = false298git = "https://github.com/paritytech/substrate"299branch = "polkadot-v0.9.24"300301[dependencies.sp-transaction-pool]302default-features = false303git = "https://github.com/paritytech/substrate"304branch = "polkadot-v0.9.24"305306[dependencies.sp-version]307default-features = false308git = "https://github.com/paritytech/substrate"309branch = "polkadot-v0.9.24"310311[dependencies.smallvec]312version = '1.6.1'313314################################################################################315# Cumulus dependencies316317[dependencies.parachain-info]318default-features = false319git = "https://github.com/paritytech/cumulus"320branch = "polkadot-v0.9.24"321322[dependencies.cumulus-pallet-aura-ext]323git = "https://github.com/paritytech/cumulus"324branch = "polkadot-v0.9.24"325default-features = false326327[dependencies.cumulus-pallet-parachain-system]328git = "https://github.com/paritytech/cumulus"329branch = "polkadot-v0.9.24"330default-features = false331332[dependencies.cumulus-primitives-core]333git = "https://github.com/paritytech/cumulus"334branch = "polkadot-v0.9.24"335default-features = false336337[dependencies.cumulus-pallet-xcm]338git = "https://github.com/paritytech/cumulus"339branch = "polkadot-v0.9.24"340default-features = false341342[dependencies.cumulus-pallet-dmp-queue]343git = "https://github.com/paritytech/cumulus"344branch = "polkadot-v0.9.24"345default-features = false346347[dependencies.cumulus-pallet-xcmp-queue]348git = "https://github.com/paritytech/cumulus"349branch = "polkadot-v0.9.24"350default-features = false351352[dependencies.cumulus-primitives-utility]353git = "https://github.com/paritytech/cumulus"354branch = "polkadot-v0.9.24"355default-features = false356357[dependencies.cumulus-primitives-timestamp]358git = "https://github.com/paritytech/cumulus"359branch = "polkadot-v0.9.24"360default-features = false361362################################################################################363# Polkadot dependencies364365[dependencies.polkadot-parachain]366git = "https://github.com/paritytech/polkadot"367branch = "release-v0.9.24"368default-features = false369370[dependencies.xcm]371git = "https://github.com/paritytech/polkadot"372branch = "release-v0.9.24"373default-features = false374375[dependencies.xcm-builder]376git = "https://github.com/paritytech/polkadot"377branch = "release-v0.9.24"378default-features = false379380[dependencies.xcm-executor]381git = "https://github.com/paritytech/polkadot"382branch = "release-v0.9.24"383default-features = false384385[dependencies.pallet-xcm]386git = "https://github.com/paritytech/polkadot"387branch = "release-v0.9.24"388default-features = false389390[dependencies.orml-vesting]391git = "https://github.com/uniquenetwork/open-runtime-module-library"392branch = "unique-polkadot-v0.9.24"393version = "0.4.1-dev"394default-features = false395396################################################################################397# RMRK dependencies398399# todo git400[dependencies.rmrk-rpc]401default-features = false402path = "../../primitives/rmrk-rpc"403404################################################################################405# local dependencies406407[dependencies]408log = { version = "0.4.16", default-features = false }409unique-runtime-common = { path = "../common", default-features = false }410scale-info = { version = "2.0.1", default-features = false, features = [411    "derive",412] }413derivative = "2.2.0"414pallet-unique = { path = '../../pallets/unique', default-features = false }415up-rpc = { path = "../../primitives/rpc", default-features = false }416fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }417pallet-inflation = { path = '../../pallets/inflation', default-features = false }418up-data-structs = { path = '../../primitives/data-structs', default-features = false }419pallet-common = { default-features = false, path = "../../pallets/common" }420pallet-structure = { default-features = false, path = "../../pallets/structure" }421pallet-fungible = { default-features = false, path = "../../pallets/fungible" }422pallet-refungible = { default-features = false, path = "../../pallets/refungible" }423pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }424pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }425pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }426pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }427# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }428pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.24", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }429pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }430pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }431pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }432pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }433pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }434pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }435pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }436fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }437fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }438439################################################################################440# Build Dependencies441442[build-dependencies.substrate-wasm-builder]443git = "https://github.com/paritytech/substrate"444branch = "polkadot-v0.9.24"
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -28,13 +28,21 @@
 use sp_api::impl_runtime_apis;
 use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H256, U256, H160};
 use sp_runtime::DispatchError;
+#[cfg(feature = "scheduler")]
 use fp_self_contained::*;
+
+#[cfg(feature = "scheduler")]
+use sp_runtime::{
+       traits::Member,
+       generic::Era,
+       DispatchErrorWithPostInfo
+};
 // #[cfg(any(feature = "std", test))]
 // pub use sp_runtime::BuildStorage;
 
 use sp_runtime::{
 	Permill, Perbill, Percent, create_runtime_str, generic, impl_opaque_keys,
-	traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, AccountIdConversion, Zero, Member},
+	traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, AccountIdConversion, Zero},
 	transaction_validity::{TransactionSource, TransactionValidity},
 	ApplyExtrinsicResult, RuntimeAppPublic,
 };
@@ -69,7 +77,10 @@
 		WeightToFee,
 	},
 };
+
+#[cfg(feature = "scheduler")]
 use pallet_unique_scheduler::DispatchCall;
+
 use up_data_structs::{
 	CollectionId, TokenId, TokenData, Property, PropertyKeyPermission, CollectionLimits,
 	CollectionStats, RpcCollection,
@@ -93,12 +104,10 @@
 use fp_rpc::TransactionStatus;
 use sp_runtime::{
 	traits::{
-		Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, DispatchInfoOf,
+		BlockNumberProvider, Dispatchable, PostDispatchInfoOf, DispatchInfoOf,
 		Saturating, CheckedConversion,
 	},
-	generic::Era,
-	transaction_validity::TransactionValidityError,
-	DispatchErrorWithPostInfo, SaturatedConversion,
+	transaction_validity::TransactionValidityError, SaturatedConversion,
 };
 
 // pub use pallet_timestamp::Call as TimestampCall;
@@ -109,7 +118,7 @@
 use polkadot_parachain::primitives::Sibling;
 use xcm::v1::{BodyId, Junction::*, MultiLocation, NetworkId, Junctions::*};
 use xcm_builder::{
-	AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,
+	AccountId32Aliases, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
 	EnsureXcmOrigin, FixedWeightBounds, LocationInverter, NativeAsset, ParentAsSuperuser,
 	RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
 	SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
@@ -948,8 +957,11 @@
 }
 
 type ChargeTransactionPayment = pallet_charge_transaction::ChargeTransactionPayment<Runtime>;
+
+#[cfg(feature = "scheduler")]
 use frame_support::traits::NamedReservableCurrency;
 
+#[cfg(feature = "scheduler")]
 fn get_signed_extras(from: <Runtime as frame_system::Config>::AccountId) -> SignedExtraScheduler {
 	(
 		frame_system::CheckSpecVersion::<Runtime>::new(),
@@ -964,92 +976,95 @@
 	)
 }
 
-// pub struct SchedulerPaymentExecutor;
-// impl<T: frame_system::Config + pallet_unique_scheduler::Config, SelfContainedSignedInfo>
-// 	DispatchCall<T, SelfContainedSignedInfo> for SchedulerPaymentExecutor
-// where
-// 	<T as frame_system::Config>::Call: Member
-// 		+ Dispatchable<Origin = Origin, Info = DispatchInfo>
-// 		+ SelfContainedCall<SignedInfo = SelfContainedSignedInfo>
-// 		+ GetDispatchInfo
-// 		+ From<frame_system::Call<Runtime>>,
-// 	SelfContainedSignedInfo: Send + Sync + 'static,
-// 	Call: From<<T as frame_system::Config>::Call>
-// 		+ From<<T as pallet_unique_scheduler::Config>::Call>
-// 		+ SelfContainedCall<SignedInfo = SelfContainedSignedInfo>,
-// 	sp_runtime::AccountId32: From<<T as frame_system::Config>::AccountId>,
-// {
-// 	fn dispatch_call(
-// 		signer: <T as frame_system::Config>::AccountId,
-// 		call: <T as pallet_unique_scheduler::Config>::Call,
-// 	) -> Result<
-// 		Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>,
-// 		TransactionValidityError,
-// 	> {
-// 		let dispatch_info = call.get_dispatch_info();
-// 		let extrinsic = fp_self_contained::CheckedExtrinsic::<
-// 			AccountId,
-// 			Call,
-// 			SignedExtraScheduler,
-// 			SelfContainedSignedInfo,
-// 		> {
-// 			signed:
-// 				CheckedSignature::<AccountId, SignedExtraScheduler, SelfContainedSignedInfo>::Signed(
-// 					signer.clone().into(),
-// 					get_signed_extras(signer.into()),
-// 				),
-// 			function: call.into(),
-// 		};
+#[cfg(feature = "scheduler")]
+pub struct SchedulerPaymentExecutor;
+
+#[cfg(feature = "scheduler")]
+impl<T: frame_system::Config + pallet_unique_scheduler::Config, SelfContainedSignedInfo>
+	DispatchCall<T, SelfContainedSignedInfo> for SchedulerPaymentExecutor
+where
+	<T as frame_system::Config>::Call: Member
+		+ Dispatchable<Origin = Origin, Info = DispatchInfo>
+		+ SelfContainedCall<SignedInfo = SelfContainedSignedInfo>
+		+ GetDispatchInfo
+		+ From<frame_system::Call<Runtime>>,
+	SelfContainedSignedInfo: Send + Sync + 'static,
+	Call: From<<T as frame_system::Config>::Call>
+		+ From<<T as pallet_unique_scheduler::Config>::Call>
+		+ SelfContainedCall<SignedInfo = SelfContainedSignedInfo>,
+	sp_runtime::AccountId32: From<<T as frame_system::Config>::AccountId>,
+{
+	fn dispatch_call(
+		signer: <T as frame_system::Config>::AccountId,
+		call: <T as pallet_unique_scheduler::Config>::Call,
+	) -> Result<
+		Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>,
+		TransactionValidityError,
+	> {
+		let dispatch_info = call.get_dispatch_info();
+		let extrinsic = fp_self_contained::CheckedExtrinsic::<
+			AccountId,
+			Call,
+			SignedExtraScheduler,
+			SelfContainedSignedInfo,
+		> {
+			signed:
+				CheckedSignature::<AccountId, SignedExtraScheduler, SelfContainedSignedInfo>::Signed(
+					signer.clone().into(),
+					get_signed_extras(signer.into()),
+				),
+			function: call.into(),
+		};
 
-// 		extrinsic.apply::<Runtime>(&dispatch_info, 0)
-// 	}
+		extrinsic.apply::<Runtime>(&dispatch_info, 0)
+	}
 
-// 	fn reserve_balance(
-// 		id: [u8; 16],
-// 		sponsor: <T as frame_system::Config>::AccountId,
-// 		call: <T as pallet_unique_scheduler::Config>::Call,
-// 		count: u32,
-// 	) -> Result<(), DispatchError> {
-// 		let dispatch_info = call.get_dispatch_info();
-// 		let weight: Balance = ChargeTransactionPayment::traditional_fee(0, &dispatch_info, 0)
-// 			.saturating_mul(count.into());
+	fn reserve_balance(
+		id: [u8; 16],
+		sponsor: <T as frame_system::Config>::AccountId,
+		call: <T as pallet_unique_scheduler::Config>::Call,
+		count: u32,
+	) -> Result<(), DispatchError> {
+		let dispatch_info = call.get_dispatch_info();
+		let weight: Balance = ChargeTransactionPayment::traditional_fee(0, &dispatch_info, 0)
+			.saturating_mul(count.into());
 
-// 		<Balances as NamedReservableCurrency<AccountId>>::reserve_named(
-// 			&id,
-// 			&(sponsor.into()),
-// 			weight.into(),
-// 		)
-// 	}
+		<Balances as NamedReservableCurrency<AccountId>>::reserve_named(
+			&id,
+			&(sponsor.into()),
+			weight.into(),
+		)
+	}
 
-// 	fn pay_for_call(
-// 		id: [u8; 16],
-// 		sponsor: <T as frame_system::Config>::AccountId,
-// 		call: <T as pallet_unique_scheduler::Config>::Call,
-// 	) -> Result<u128, DispatchError> {
-// 		let dispatch_info = call.get_dispatch_info();
-// 		let weight: Balance = ChargeTransactionPayment::traditional_fee(0, &dispatch_info, 0);
-// 		Ok(
-// 			<Balances as NamedReservableCurrency<AccountId>>::unreserve_named(
-// 				&id,
-// 				&(sponsor.into()),
-// 				weight.into(),
-// 			),
-// 		)
-// 	}
+	fn pay_for_call(
+		id: [u8; 16],
+		sponsor: <T as frame_system::Config>::AccountId,
+		call: <T as pallet_unique_scheduler::Config>::Call,
+	) -> Result<u128, DispatchError> {
+		let dispatch_info = call.get_dispatch_info();
+		let weight: Balance = ChargeTransactionPayment::traditional_fee(0, &dispatch_info, 0);
+		Ok(
+			<Balances as NamedReservableCurrency<AccountId>>::unreserve_named(
+				&id,
+				&(sponsor.into()),
+				weight.into(),
+			),
+		)
+	}
 
-// 	fn cancel_reserve(
-// 		id: [u8; 16],
-// 		sponsor: <T as frame_system::Config>::AccountId,
-// 	) -> Result<u128, DispatchError> {
-// 		Ok(
-// 			<Balances as NamedReservableCurrency<AccountId>>::unreserve_named(
-// 				&id,
-// 				&(sponsor.into()),
-// 				u128::MAX,
-// 			),
-// 		)
-// 	}
-// }
+	fn cancel_reserve(
+		id: [u8; 16],
+		sponsor: <T as frame_system::Config>::AccountId,
+	) -> Result<u128, DispatchError> {
+		Ok(
+			<Balances as NamedReservableCurrency<AccountId>>::unreserve_named(
+				&id,
+				&(sponsor.into()),
+				u128::MAX,
+			),
+		)
+	}
+}
 
 parameter_types! {
 	pub const NoPreimagePostponement: Option<u32> = Some(10);
@@ -1065,21 +1080,22 @@
 	}
 }
 
-// impl pallet_unique_scheduler::Config for Runtime {
-// 	type Event = Event;
-// 	type Origin = Origin;
-// 	type Currency = Balances;
-// 	type PalletsOrigin = OriginCaller;
-// 	type Call = Call;
-// 	type MaximumWeight = MaximumSchedulerWeight;
-// 	type ScheduleOrigin = EnsureSigned<AccountId>;
-// 	type MaxScheduledPerBlock = MaxScheduledPerBlock;
-// 	type WeightInfo = ();
-// 	type CallExecutor = SchedulerPaymentExecutor;
-// 	type OriginPrivilegeCmp = OriginPrivilegeCmp;
-// 	type PreimageProvider = ();
-// 	type NoPreimagePostponement = NoPreimagePostponement;
-// }
+#[cfg(feature = "scheduler")]
+impl pallet_unique_scheduler::Config for Runtime {
+	type Event = Event;
+	type Origin = Origin;
+	type Currency = Balances;
+	type PalletsOrigin = OriginCaller;
+	type Call = Call;
+	type MaximumWeight = MaximumSchedulerWeight;
+	type ScheduleOrigin = EnsureSigned<AccountId>;
+	type MaxScheduledPerBlock = MaxScheduledPerBlock;
+	type WeightInfo = ();
+	type CallExecutor = SchedulerPaymentExecutor;
+	type OriginPrivilegeCmp = OriginPrivilegeCmp;
+	type PreimageProvider = ();
+	type NoPreimagePostponement = NoPreimagePostponement;
+}
 
 type EvmSponsorshipHandler = (
 	UniqueEthSponsorshipHandler<Runtime>,
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -121,6 +121,9 @@
 limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
 unique-runtime = []
 
+scheduler = []
+rmrk = []
+
 ################################################################################
 # Substrate Dependencies
 
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -28,13 +28,22 @@
 use sp_api::impl_runtime_apis;
 use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H256, U256, H160};
 use sp_runtime::DispatchError;
+
+#[cfg(feature = "scheduler")]
 use fp_self_contained::*;
+
+#[cfg(feature = "scheduler")]
+use sp_runtime::{
+	traits::Member,
+	generic::Era,
+	DispatchErrorWithPostInfo
+};
 // #[cfg(any(feature = "std", test))]
 // pub use sp_runtime::BuildStorage;
 
 use sp_runtime::{
 	Permill, Perbill, Percent, create_runtime_str, generic, impl_opaque_keys,
-	traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, AccountIdConversion, Zero, Member},
+	traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, AccountIdConversion, Zero},
 	transaction_validity::{TransactionSource, TransactionValidity},
 	ApplyExtrinsicResult, RuntimeAppPublic,
 };
@@ -69,7 +78,10 @@
 		WeightToFee,
 	},
 };
+
+#[cfg(feature = "scheduler")]
 use pallet_unique_scheduler::DispatchCall;
+
 use up_data_structs::{
 	CollectionId, TokenId, TokenData, Property, PropertyKeyPermission, CollectionLimits,
 	CollectionStats, RpcCollection,
@@ -93,12 +105,10 @@
 use fp_rpc::TransactionStatus;
 use sp_runtime::{
 	traits::{
-		Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, DispatchInfoOf,
+		BlockNumberProvider, Dispatchable, PostDispatchInfoOf, DispatchInfoOf,
 		Saturating, CheckedConversion,
 	},
-	generic::Era,
-	transaction_validity::TransactionValidityError,
-	DispatchErrorWithPostInfo, SaturatedConversion,
+	transaction_validity::TransactionValidityError, SaturatedConversion,
 };
 
 // pub use pallet_timestamp::Call as TimestampCall;
@@ -109,7 +119,7 @@
 use polkadot_parachain::primitives::Sibling;
 use xcm::v1::{BodyId, Junction::*, MultiLocation, NetworkId, Junctions::*};
 use xcm_builder::{
-	AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,
+	AccountId32Aliases, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
 	EnsureXcmOrigin, FixedWeightBounds, LocationInverter, NativeAsset, ParentAsSuperuser,
 	RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
 	SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
@@ -949,8 +959,11 @@
 }
 
 type ChargeTransactionPayment = pallet_charge_transaction::ChargeTransactionPayment<Runtime>;
+
+#[cfg(feature = "scheduler")]
 use frame_support::traits::NamedReservableCurrency;
 
+#[cfg(feature = "scheduler")]
 fn get_signed_extras(from: <Runtime as frame_system::Config>::AccountId) -> SignedExtraScheduler {
 	(
 		frame_system::CheckSpecVersion::<Runtime>::new(),
@@ -965,92 +978,95 @@
 	)
 }
 
-// pub struct SchedulerPaymentExecutor;
-// impl<T: frame_system::Config + pallet_unique_scheduler::Config, SelfContainedSignedInfo>
-// 	DispatchCall<T, SelfContainedSignedInfo> for SchedulerPaymentExecutor
-// where
-// 	<T as frame_system::Config>::Call: Member
-// 		+ Dispatchable<Origin = Origin, Info = DispatchInfo>
-// 		+ SelfContainedCall<SignedInfo = SelfContainedSignedInfo>
-// 		+ GetDispatchInfo
-// 		+ From<frame_system::Call<Runtime>>,
-// 	SelfContainedSignedInfo: Send + Sync + 'static,
-// 	Call: From<<T as frame_system::Config>::Call>
-// 		+ From<<T as pallet_unique_scheduler::Config>::Call>
-// 		+ SelfContainedCall<SignedInfo = SelfContainedSignedInfo>,
-// 	sp_runtime::AccountId32: From<<T as frame_system::Config>::AccountId>,
-// {
-// 	fn dispatch_call(
-// 		signer: <T as frame_system::Config>::AccountId,
-// 		call: <T as pallet_unique_scheduler::Config>::Call,
-// 	) -> Result<
-// 		Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>,
-// 		TransactionValidityError,
-// 	> {
-// 		let dispatch_info = call.get_dispatch_info();
-// 		let extrinsic = fp_self_contained::CheckedExtrinsic::<
-// 			AccountId,
-// 			Call,
-// 			SignedExtraScheduler,
-// 			SelfContainedSignedInfo,
-// 		> {
-// 			signed:
-// 				CheckedSignature::<AccountId, SignedExtraScheduler, SelfContainedSignedInfo>::Signed(
-// 					signer.clone().into(),
-// 					get_signed_extras(signer.into()),
-// 				),
-// 			function: call.into(),
-// 		};
+#[cfg(feature = "scheduler")]
+pub struct SchedulerPaymentExecutor;
 
-// 		extrinsic.apply::<Runtime>(&dispatch_info, 0)
-// 	}
+#[cfg(feature = "scheduler")]
+impl<T: frame_system::Config + pallet_unique_scheduler::Config, SelfContainedSignedInfo>
+	DispatchCall<T, SelfContainedSignedInfo> for SchedulerPaymentExecutor
+where
+	<T as frame_system::Config>::Call: Member
+		+ Dispatchable<Origin = Origin, Info = DispatchInfo>
+		+ SelfContainedCall<SignedInfo = SelfContainedSignedInfo>
+		+ GetDispatchInfo
+		+ From<frame_system::Call<Runtime>>,
+	SelfContainedSignedInfo: Send + Sync + 'static,
+	Call: From<<T as frame_system::Config>::Call>
+		+ From<<T as pallet_unique_scheduler::Config>::Call>
+		+ SelfContainedCall<SignedInfo = SelfContainedSignedInfo>,
+	sp_runtime::AccountId32: From<<T as frame_system::Config>::AccountId>,
+{
+	fn dispatch_call(
+		signer: <T as frame_system::Config>::AccountId,
+		call: <T as pallet_unique_scheduler::Config>::Call,
+	) -> Result<
+		Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>,
+		TransactionValidityError,
+	> {
+		let dispatch_info = call.get_dispatch_info();
+		let extrinsic = fp_self_contained::CheckedExtrinsic::<
+			AccountId,
+			Call,
+			SignedExtraScheduler,
+			SelfContainedSignedInfo,
+		> {
+			signed:
+				CheckedSignature::<AccountId, SignedExtraScheduler, SelfContainedSignedInfo>::Signed(
+					signer.clone().into(),
+					get_signed_extras(signer.into()),
+				),
+			function: call.into(),
+		};
 
-// 	fn reserve_balance(
-// 		id: [u8; 16],
-// 		sponsor: <T as frame_system::Config>::AccountId,
-// 		call: <T as pallet_unique_scheduler::Config>::Call,
-// 		count: u32,
-// 	) -> Result<(), DispatchError> {
-// 		let dispatch_info = call.get_dispatch_info();
-// 		let weight: Balance = ChargeTransactionPayment::traditional_fee(0, &dispatch_info, 0)
-// 			.saturating_mul(count.into());
+		extrinsic.apply::<Runtime>(&dispatch_info, 0)
+	}
 
-// 		<Balances as NamedReservableCurrency<AccountId>>::reserve_named(
-// 			&id,
-// 			&(sponsor.into()),
-// 			weight,
-// 		)
-// 	}
+	fn reserve_balance(
+		id: [u8; 16],
+		sponsor: <T as frame_system::Config>::AccountId,
+		call: <T as pallet_unique_scheduler::Config>::Call,
+		count: u32,
+	) -> Result<(), DispatchError> {
+		let dispatch_info = call.get_dispatch_info();
+		let weight: Balance = ChargeTransactionPayment::traditional_fee(0, &dispatch_info, 0)
+			.saturating_mul(count.into());
 
-// 	fn pay_for_call(
-// 		id: [u8; 16],
-// 		sponsor: <T as frame_system::Config>::AccountId,
-// 		call: <T as pallet_unique_scheduler::Config>::Call,
-// 	) -> Result<u128, DispatchError> {
-// 		let dispatch_info = call.get_dispatch_info();
-// 		let weight: Balance = ChargeTransactionPayment::traditional_fee(0, &dispatch_info, 0);
-// 		Ok(
-// 			<Balances as NamedReservableCurrency<AccountId>>::unreserve_named(
-// 				&id,
-// 				&(sponsor.into()),
-// 				weight,
-// 			),
-// 		)
-// 	}
+		<Balances as NamedReservableCurrency<AccountId>>::reserve_named(
+			&id,
+			&(sponsor.into()),
+			weight,
+		)
+	}
 
-// 	fn cancel_reserve(
-// 		id: [u8; 16],
-// 		sponsor: <T as frame_system::Config>::AccountId,
-// 	) -> Result<u128, DispatchError> {
-// 		Ok(
-// 			<Balances as NamedReservableCurrency<AccountId>>::unreserve_named(
-// 				&id,
-// 				&(sponsor.into()),
-// 				u128::MAX,
-// 			),
-// 		)
-// 	}
-// }
+	fn pay_for_call(
+		id: [u8; 16],
+		sponsor: <T as frame_system::Config>::AccountId,
+		call: <T as pallet_unique_scheduler::Config>::Call,
+	) -> Result<u128, DispatchError> {
+		let dispatch_info = call.get_dispatch_info();
+		let weight: Balance = ChargeTransactionPayment::traditional_fee(0, &dispatch_info, 0);
+		Ok(
+			<Balances as NamedReservableCurrency<AccountId>>::unreserve_named(
+				&id,
+				&(sponsor.into()),
+				weight,
+			),
+		)
+	}
+
+	fn cancel_reserve(
+		id: [u8; 16],
+		sponsor: <T as frame_system::Config>::AccountId,
+	) -> Result<u128, DispatchError> {
+		Ok(
+			<Balances as NamedReservableCurrency<AccountId>>::unreserve_named(
+				&id,
+				&(sponsor.into()),
+				u128::MAX,
+			),
+		)
+	}
+}
 
 parameter_types! {
 	pub const NoPreimagePostponement: Option<u32> = Some(10);
@@ -1066,21 +1082,22 @@
 	}
 }
 
-// impl pallet_unique_scheduler::Config for Runtime {
-// 	type Event = Event;
-// 	type Origin = Origin;
-// 	type Currency = Balances;
-// 	type PalletsOrigin = OriginCaller;
-// 	type Call = Call;
-// 	type MaximumWeight = MaximumSchedulerWeight;
-// 	type ScheduleOrigin = EnsureSigned<AccountId>;
-// 	type MaxScheduledPerBlock = MaxScheduledPerBlock;
-// 	type WeightInfo = ();
-// 	type CallExecutor = SchedulerPaymentExecutor;
-// 	type OriginPrivilegeCmp = OriginPrivilegeCmp;
-// 	type PreimageProvider = ();
-// 	type NoPreimagePostponement = NoPreimagePostponement;
-// }
+#[cfg(feature = "scheduler")]
+impl pallet_unique_scheduler::Config for Runtime {
+	type Event = Event;
+	type Origin = Origin;
+	type Currency = Balances;
+	type PalletsOrigin = OriginCaller;
+	type Call = Call;
+	type MaximumWeight = MaximumSchedulerWeight;
+	type ScheduleOrigin = EnsureSigned<AccountId>;
+	type MaxScheduledPerBlock = MaxScheduledPerBlock;
+	type WeightInfo = ();
+	type CallExecutor = SchedulerPaymentExecutor;
+	type OriginPrivilegeCmp = OriginPrivilegeCmp;
+	type PreimageProvider = ();
+	type NoPreimagePostponement = NoPreimagePostponement;
+}
 
 type EvmSponsorshipHandler = (
 	UniqueEthSponsorshipHandler<Runtime>,
@@ -1166,7 +1183,7 @@
 	frame_system::CheckEra<Runtime>,
 	frame_system::CheckNonce<Runtime>,
 	frame_system::CheckWeight<Runtime>,
-	pallet_charge_transaction::ChargeTransactionPayment<Runtime>,
+	ChargeTransactionPayment,
 	//pallet_contract_helpers::ContractHelpersExtension<Runtime>,
 	pallet_ethereum::FakeTransactionFinalizer<Runtime>,
 );