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
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -120,6 +120,7 @@
 limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
 quartz-runtime = []
 
+scheduler = []
 rmrk = []
 
 ################################################################################
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
before · runtime/unique/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Unique Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'unique-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', 'unique-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    'up-data-structs/runtime-benchmarks',45]46try-runtime = [47    'frame-try-runtime',48    'frame-executive/try-runtime',49    'frame-system/try-runtime',50]51std = [52    'codec/std',53    'cumulus-pallet-aura-ext/std',54    'cumulus-pallet-parachain-system/std',55    'cumulus-pallet-xcm/std',56    'cumulus-pallet-xcmp-queue/std',57    'cumulus-primitives-core/std',58    'cumulus-primitives-utility/std',59    'frame-try-runtime/std',60    'frame-executive/std',61    'frame-support/std',62    'frame-system/std',63    'frame-system-rpc-runtime-api/std',64    'pallet-aura/std',65    'pallet-balances/std',66    # 'pallet-contracts/std',67    # 'pallet-contracts-primitives/std',68    # 'pallet-contracts-rpc-runtime-api/std',69    # 'pallet-contract-helpers/std',70    'pallet-randomness-collective-flip/std',71    'pallet-sudo/std',72    'pallet-timestamp/std',73    'pallet-transaction-payment/std',74    'pallet-transaction-payment-rpc-runtime-api/std',75    'pallet-treasury/std',76    # 'pallet-vesting/std',77    'pallet-evm/std',78    'pallet-evm-migration/std',79    'pallet-evm-contract-helpers/std',80    'pallet-evm-transaction-payment/std',81    'pallet-evm-coder-substrate/std',82    'pallet-ethereum/std',83    'pallet-base-fee/std',84    'fp-rpc/std',85    'up-rpc/std',86    'fp-evm-mapping/std',87    'fp-self-contained/std',88    'parachain-info/std',89    'serde',90    'pallet-inflation/std',91    'pallet-common/std',92    'pallet-structure/std',93    'pallet-fungible/std',94    'pallet-refungible/std',95    'pallet-nonfungible/std',96    'pallet-proxy-rmrk-core/std',97    'pallet-proxy-rmrk-equip/std',98    'pallet-unique/std',99    'pallet-unique-scheduler/std',100    'pallet-charge-transaction/std',101    'up-data-structs/std',102    'sp-api/std',103    'sp-block-builder/std',104    "sp-consensus-aura/std",105    'sp-core/std',106    'sp-inherents/std',107    'sp-io/std',108    'sp-offchain/std',109    'sp-runtime/std',110    'sp-session/std',111    'sp-std/std',112    'sp-transaction-pool/std',113    'sp-version/std',114    'xcm/std',115    'xcm-builder/std',116    'xcm-executor/std',117    'unique-runtime-common/std',118119    "orml-vesting/std",120]121limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']122unique-runtime = []123124################################################################################125# Substrate Dependencies126127[dependencies.codec]128default-features = false129features = ['derive']130package = 'parity-scale-codec'131version = '3.1.2'132133[dependencies.frame-benchmarking]134default-features = false135git = "https://github.com/paritytech/substrate"136optional = true137branch = "polkadot-v0.9.24"138139[dependencies.frame-try-runtime]140default-features = false141git = 'https://github.com/paritytech/substrate'142optional = true143branch = 'polkadot-v0.9.24'144145[dependencies.frame-executive]146default-features = false147git = "https://github.com/paritytech/substrate"148branch = "polkadot-v0.9.24"149150[dependencies.frame-support]151default-features = false152git = "https://github.com/paritytech/substrate"153branch = "polkadot-v0.9.24"154155[dependencies.frame-system]156default-features = false157git = "https://github.com/paritytech/substrate"158branch = "polkadot-v0.9.24"159160[dependencies.frame-system-benchmarking]161default-features = false162git = "https://github.com/paritytech/substrate"163optional = true164branch = "polkadot-v0.9.24"165166[dependencies.frame-system-rpc-runtime-api]167default-features = false168git = "https://github.com/paritytech/substrate"169branch = "polkadot-v0.9.24"170171[dependencies.hex-literal]172optional = true173version = '0.3.3'174175[dependencies.serde]176default-features = false177features = ['derive']178optional = true179version = '1.0.130'180181[dependencies.pallet-aura]182default-features = false183git = "https://github.com/paritytech/substrate"184branch = "polkadot-v0.9.24"185186[dependencies.pallet-balances]187default-features = false188git = "https://github.com/paritytech/substrate"189branch = "polkadot-v0.9.24"190191# Contracts specific packages192# [dependencies.pallet-contracts]193# git = 'https://github.com/paritytech/substrate'194# default-features = false195# branch = 'master'196# version = '4.0.0-dev'197198# [dependencies.pallet-contracts-primitives]199# git = 'https://github.com/paritytech/substrate'200# default-features = false201# branch = 'master'202# version = '4.0.0-dev'203204# [dependencies.pallet-contracts-rpc-runtime-api]205# git = 'https://github.com/paritytech/substrate'206# default-features = false207# branch = 'master'208# version = '4.0.0-dev'209210[dependencies.pallet-randomness-collective-flip]211default-features = false212git = "https://github.com/paritytech/substrate"213branch = "polkadot-v0.9.24"214215[dependencies.pallet-sudo]216default-features = false217git = "https://github.com/paritytech/substrate"218branch = "polkadot-v0.9.24"219220[dependencies.pallet-timestamp]221default-features = false222git = "https://github.com/paritytech/substrate"223branch = "polkadot-v0.9.24"224225[dependencies.pallet-transaction-payment]226default-features = false227git = "https://github.com/paritytech/substrate"228branch = "polkadot-v0.9.24"229230[dependencies.pallet-transaction-payment-rpc-runtime-api]231default-features = false232git = "https://github.com/paritytech/substrate"233branch = "polkadot-v0.9.24"234235[dependencies.pallet-treasury]236default-features = false237git = "https://github.com/paritytech/substrate"238branch = "polkadot-v0.9.24"239240# [dependencies.pallet-vesting]241# default-features = false242# git = 'https://github.com/paritytech/substrate'243# branch = 'master'244245[dependencies.sp-arithmetic]246default-features = false247git = "https://github.com/paritytech/substrate"248branch = "polkadot-v0.9.24"249250[dependencies.sp-api]251default-features = false252git = "https://github.com/paritytech/substrate"253branch = "polkadot-v0.9.24"254255[dependencies.sp-block-builder]256default-features = false257git = "https://github.com/paritytech/substrate"258branch = "polkadot-v0.9.24"259260[dependencies.sp-core]261default-features = false262git = "https://github.com/paritytech/substrate"263branch = "polkadot-v0.9.24"264265[dependencies.sp-consensus-aura]266default-features = false267git = "https://github.com/paritytech/substrate"268branch = "polkadot-v0.9.24"269270[dependencies.sp-inherents]271default-features = false272git = "https://github.com/paritytech/substrate"273branch = "polkadot-v0.9.24"274275[dependencies.sp-io]276default-features = false277git = "https://github.com/paritytech/substrate"278branch = "polkadot-v0.9.24"279280[dependencies.sp-offchain]281default-features = false282git = "https://github.com/paritytech/substrate"283branch = "polkadot-v0.9.24"284285[dependencies.sp-runtime]286default-features = false287git = "https://github.com/paritytech/substrate"288branch = "polkadot-v0.9.24"289290[dependencies.sp-session]291default-features = false292git = "https://github.com/paritytech/substrate"293branch = "polkadot-v0.9.24"294295[dependencies.sp-std]296default-features = false297git = "https://github.com/paritytech/substrate"298branch = "polkadot-v0.9.24"299300[dependencies.sp-transaction-pool]301default-features = false302git = "https://github.com/paritytech/substrate"303branch = "polkadot-v0.9.24"304305[dependencies.sp-version]306default-features = false307git = "https://github.com/paritytech/substrate"308branch = "polkadot-v0.9.24"309310[dependencies.smallvec]311version = '1.6.1'312313################################################################################314# Cumulus dependencies315316[dependencies.parachain-info]317default-features = false318git = "https://github.com/paritytech/cumulus"319branch = "polkadot-v0.9.24"320321[dependencies.cumulus-pallet-aura-ext]322git = "https://github.com/paritytech/cumulus"323branch = "polkadot-v0.9.24"324default-features = false325326[dependencies.cumulus-pallet-parachain-system]327git = "https://github.com/paritytech/cumulus"328branch = "polkadot-v0.9.24"329default-features = false330331[dependencies.cumulus-primitives-core]332git = "https://github.com/paritytech/cumulus"333branch = "polkadot-v0.9.24"334default-features = false335336[dependencies.cumulus-pallet-xcm]337git = "https://github.com/paritytech/cumulus"338branch = "polkadot-v0.9.24"339default-features = false340341[dependencies.cumulus-pallet-dmp-queue]342git = "https://github.com/paritytech/cumulus"343branch = "polkadot-v0.9.24"344default-features = false345346[dependencies.cumulus-pallet-xcmp-queue]347git = "https://github.com/paritytech/cumulus"348branch = "polkadot-v0.9.24"349default-features = false350351[dependencies.cumulus-primitives-utility]352git = "https://github.com/paritytech/cumulus"353branch = "polkadot-v0.9.24"354default-features = false355356[dependencies.cumulus-primitives-timestamp]357git = "https://github.com/paritytech/cumulus"358branch = "polkadot-v0.9.24"359default-features = false360361################################################################################362# Polkadot dependencies363364[dependencies.polkadot-parachain]365git = "https://github.com/paritytech/polkadot"366branch = "release-v0.9.24"367default-features = false368369[dependencies.xcm]370git = "https://github.com/paritytech/polkadot"371branch = "release-v0.9.24"372default-features = false373374[dependencies.xcm-builder]375git = "https://github.com/paritytech/polkadot"376branch = "release-v0.9.24"377default-features = false378379[dependencies.xcm-executor]380git = "https://github.com/paritytech/polkadot"381branch = "release-v0.9.24"382default-features = false383384[dependencies.pallet-xcm]385git = "https://github.com/paritytech/polkadot"386branch = "release-v0.9.24"387default-features = false388389[dependencies.orml-vesting]390git = "https://github.com/uniquenetwork/open-runtime-module-library"391branch = "unique-polkadot-v0.9.24"392version = "0.4.1-dev"393default-features = false394395################################################################################396# local dependencies397398[dependencies]399log = { version = "0.4.16", default-features = false }400unique-runtime-common = { path = "../common", default-features = false }401scale-info = { version = "2.0.1", default-features = false, features = [402    "derive",403] }404derivative = "2.2.0"405pallet-unique = { path = '../../pallets/unique', default-features = false }406up-rpc = { path = "../../primitives/rpc", default-features = false }407rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }408pallet-inflation = { path = '../../pallets/inflation', default-features = false }409up-data-structs = { path = '../../primitives/data-structs', default-features = false }410pallet-common = { default-features = false, path = "../../pallets/common" }411pallet-structure = { default-features = false, path = "../../pallets/structure" }412pallet-fungible = { default-features = false, path = "../../pallets/fungible" }413pallet-refungible = { default-features = false, path = "../../pallets/refungible" }414pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }415pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }416pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }417pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }418# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }419pallet-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" }420pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }421pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }422pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }423pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }424pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }425pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }426pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }427fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }428fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }429fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }430431################################################################################432# Build Dependencies433434[build-dependencies.substrate-wasm-builder]435git = "https://github.com/paritytech/substrate"436branch = "polkadot-v0.9.24"
after · runtime/unique/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Unique Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'unique-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', 'unique-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    'up-data-structs/runtime-benchmarks',45]46try-runtime = [47    'frame-try-runtime',48    'frame-executive/try-runtime',49    'frame-system/try-runtime',50]51std = [52    'codec/std',53    'cumulus-pallet-aura-ext/std',54    'cumulus-pallet-parachain-system/std',55    'cumulus-pallet-xcm/std',56    'cumulus-pallet-xcmp-queue/std',57    'cumulus-primitives-core/std',58    'cumulus-primitives-utility/std',59    'frame-try-runtime/std',60    'frame-executive/std',61    'frame-support/std',62    'frame-system/std',63    'frame-system-rpc-runtime-api/std',64    'pallet-aura/std',65    'pallet-balances/std',66    # 'pallet-contracts/std',67    # 'pallet-contracts-primitives/std',68    # 'pallet-contracts-rpc-runtime-api/std',69    # 'pallet-contract-helpers/std',70    'pallet-randomness-collective-flip/std',71    'pallet-sudo/std',72    'pallet-timestamp/std',73    'pallet-transaction-payment/std',74    'pallet-transaction-payment-rpc-runtime-api/std',75    'pallet-treasury/std',76    # 'pallet-vesting/std',77    'pallet-evm/std',78    'pallet-evm-migration/std',79    'pallet-evm-contract-helpers/std',80    'pallet-evm-transaction-payment/std',81    'pallet-evm-coder-substrate/std',82    'pallet-ethereum/std',83    'pallet-base-fee/std',84    'fp-rpc/std',85    'up-rpc/std',86    'fp-evm-mapping/std',87    'fp-self-contained/std',88    'parachain-info/std',89    'serde',90    'pallet-inflation/std',91    'pallet-common/std',92    'pallet-structure/std',93    'pallet-fungible/std',94    'pallet-refungible/std',95    'pallet-nonfungible/std',96    'pallet-proxy-rmrk-core/std',97    'pallet-proxy-rmrk-equip/std',98    'pallet-unique/std',99    'pallet-unique-scheduler/std',100    'pallet-charge-transaction/std',101    'up-data-structs/std',102    'sp-api/std',103    'sp-block-builder/std',104    "sp-consensus-aura/std",105    'sp-core/std',106    'sp-inherents/std',107    'sp-io/std',108    'sp-offchain/std',109    'sp-runtime/std',110    'sp-session/std',111    'sp-std/std',112    'sp-transaction-pool/std',113    'sp-version/std',114    'xcm/std',115    'xcm-builder/std',116    'xcm-executor/std',117    'unique-runtime-common/std',118119    "orml-vesting/std",120]121limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']122unique-runtime = []123124scheduler = []125rmrk = []126127################################################################################128# Substrate Dependencies129130[dependencies.codec]131default-features = false132features = ['derive']133package = 'parity-scale-codec'134version = '3.1.2'135136[dependencies.frame-benchmarking]137default-features = false138git = "https://github.com/paritytech/substrate"139optional = true140branch = "polkadot-v0.9.24"141142[dependencies.frame-try-runtime]143default-features = false144git = 'https://github.com/paritytech/substrate'145optional = true146branch = 'polkadot-v0.9.24'147148[dependencies.frame-executive]149default-features = false150git = "https://github.com/paritytech/substrate"151branch = "polkadot-v0.9.24"152153[dependencies.frame-support]154default-features = false155git = "https://github.com/paritytech/substrate"156branch = "polkadot-v0.9.24"157158[dependencies.frame-system]159default-features = false160git = "https://github.com/paritytech/substrate"161branch = "polkadot-v0.9.24"162163[dependencies.frame-system-benchmarking]164default-features = false165git = "https://github.com/paritytech/substrate"166optional = true167branch = "polkadot-v0.9.24"168169[dependencies.frame-system-rpc-runtime-api]170default-features = false171git = "https://github.com/paritytech/substrate"172branch = "polkadot-v0.9.24"173174[dependencies.hex-literal]175optional = true176version = '0.3.3'177178[dependencies.serde]179default-features = false180features = ['derive']181optional = true182version = '1.0.130'183184[dependencies.pallet-aura]185default-features = false186git = "https://github.com/paritytech/substrate"187branch = "polkadot-v0.9.24"188189[dependencies.pallet-balances]190default-features = false191git = "https://github.com/paritytech/substrate"192branch = "polkadot-v0.9.24"193194# Contracts specific packages195# [dependencies.pallet-contracts]196# git = 'https://github.com/paritytech/substrate'197# default-features = false198# branch = 'master'199# version = '4.0.0-dev'200201# [dependencies.pallet-contracts-primitives]202# git = 'https://github.com/paritytech/substrate'203# default-features = false204# branch = 'master'205# version = '4.0.0-dev'206207# [dependencies.pallet-contracts-rpc-runtime-api]208# git = 'https://github.com/paritytech/substrate'209# default-features = false210# branch = 'master'211# version = '4.0.0-dev'212213[dependencies.pallet-randomness-collective-flip]214default-features = false215git = "https://github.com/paritytech/substrate"216branch = "polkadot-v0.9.24"217218[dependencies.pallet-sudo]219default-features = false220git = "https://github.com/paritytech/substrate"221branch = "polkadot-v0.9.24"222223[dependencies.pallet-timestamp]224default-features = false225git = "https://github.com/paritytech/substrate"226branch = "polkadot-v0.9.24"227228[dependencies.pallet-transaction-payment]229default-features = false230git = "https://github.com/paritytech/substrate"231branch = "polkadot-v0.9.24"232233[dependencies.pallet-transaction-payment-rpc-runtime-api]234default-features = false235git = "https://github.com/paritytech/substrate"236branch = "polkadot-v0.9.24"237238[dependencies.pallet-treasury]239default-features = false240git = "https://github.com/paritytech/substrate"241branch = "polkadot-v0.9.24"242243# [dependencies.pallet-vesting]244# default-features = false245# git = 'https://github.com/paritytech/substrate'246# branch = 'master'247248[dependencies.sp-arithmetic]249default-features = false250git = "https://github.com/paritytech/substrate"251branch = "polkadot-v0.9.24"252253[dependencies.sp-api]254default-features = false255git = "https://github.com/paritytech/substrate"256branch = "polkadot-v0.9.24"257258[dependencies.sp-block-builder]259default-features = false260git = "https://github.com/paritytech/substrate"261branch = "polkadot-v0.9.24"262263[dependencies.sp-core]264default-features = false265git = "https://github.com/paritytech/substrate"266branch = "polkadot-v0.9.24"267268[dependencies.sp-consensus-aura]269default-features = false270git = "https://github.com/paritytech/substrate"271branch = "polkadot-v0.9.24"272273[dependencies.sp-inherents]274default-features = false275git = "https://github.com/paritytech/substrate"276branch = "polkadot-v0.9.24"277278[dependencies.sp-io]279default-features = false280git = "https://github.com/paritytech/substrate"281branch = "polkadot-v0.9.24"282283[dependencies.sp-offchain]284default-features = false285git = "https://github.com/paritytech/substrate"286branch = "polkadot-v0.9.24"287288[dependencies.sp-runtime]289default-features = false290git = "https://github.com/paritytech/substrate"291branch = "polkadot-v0.9.24"292293[dependencies.sp-session]294default-features = false295git = "https://github.com/paritytech/substrate"296branch = "polkadot-v0.9.24"297298[dependencies.sp-std]299default-features = false300git = "https://github.com/paritytech/substrate"301branch = "polkadot-v0.9.24"302303[dependencies.sp-transaction-pool]304default-features = false305git = "https://github.com/paritytech/substrate"306branch = "polkadot-v0.9.24"307308[dependencies.sp-version]309default-features = false310git = "https://github.com/paritytech/substrate"311branch = "polkadot-v0.9.24"312313[dependencies.smallvec]314version = '1.6.1'315316################################################################################317# Cumulus dependencies318319[dependencies.parachain-info]320default-features = false321git = "https://github.com/paritytech/cumulus"322branch = "polkadot-v0.9.24"323324[dependencies.cumulus-pallet-aura-ext]325git = "https://github.com/paritytech/cumulus"326branch = "polkadot-v0.9.24"327default-features = false328329[dependencies.cumulus-pallet-parachain-system]330git = "https://github.com/paritytech/cumulus"331branch = "polkadot-v0.9.24"332default-features = false333334[dependencies.cumulus-primitives-core]335git = "https://github.com/paritytech/cumulus"336branch = "polkadot-v0.9.24"337default-features = false338339[dependencies.cumulus-pallet-xcm]340git = "https://github.com/paritytech/cumulus"341branch = "polkadot-v0.9.24"342default-features = false343344[dependencies.cumulus-pallet-dmp-queue]345git = "https://github.com/paritytech/cumulus"346branch = "polkadot-v0.9.24"347default-features = false348349[dependencies.cumulus-pallet-xcmp-queue]350git = "https://github.com/paritytech/cumulus"351branch = "polkadot-v0.9.24"352default-features = false353354[dependencies.cumulus-primitives-utility]355git = "https://github.com/paritytech/cumulus"356branch = "polkadot-v0.9.24"357default-features = false358359[dependencies.cumulus-primitives-timestamp]360git = "https://github.com/paritytech/cumulus"361branch = "polkadot-v0.9.24"362default-features = false363364################################################################################365# Polkadot dependencies366367[dependencies.polkadot-parachain]368git = "https://github.com/paritytech/polkadot"369branch = "release-v0.9.24"370default-features = false371372[dependencies.xcm]373git = "https://github.com/paritytech/polkadot"374branch = "release-v0.9.24"375default-features = false376377[dependencies.xcm-builder]378git = "https://github.com/paritytech/polkadot"379branch = "release-v0.9.24"380default-features = false381382[dependencies.xcm-executor]383git = "https://github.com/paritytech/polkadot"384branch = "release-v0.9.24"385default-features = false386387[dependencies.pallet-xcm]388git = "https://github.com/paritytech/polkadot"389branch = "release-v0.9.24"390default-features = false391392[dependencies.orml-vesting]393git = "https://github.com/uniquenetwork/open-runtime-module-library"394branch = "unique-polkadot-v0.9.24"395version = "0.4.1-dev"396default-features = false397398################################################################################399# local dependencies400401[dependencies]402log = { version = "0.4.16", default-features = false }403unique-runtime-common = { path = "../common", default-features = false }404scale-info = { version = "2.0.1", default-features = false, features = [405    "derive",406] }407derivative = "2.2.0"408pallet-unique = { path = '../../pallets/unique', default-features = false }409up-rpc = { path = "../../primitives/rpc", default-features = false }410rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }411pallet-inflation = { path = '../../pallets/inflation', default-features = false }412up-data-structs = { path = '../../primitives/data-structs', default-features = false }413pallet-common = { default-features = false, path = "../../pallets/common" }414pallet-structure = { default-features = false, path = "../../pallets/structure" }415pallet-fungible = { default-features = false, path = "../../pallets/fungible" }416pallet-refungible = { default-features = false, path = "../../pallets/refungible" }417pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }418pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }419pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }420pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }421# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }422pallet-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" }423pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }424pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }425pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }426pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }427pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }428pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }429pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }430fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }431fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }432fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }433434################################################################################435# Build Dependencies436437[build-dependencies.substrate-wasm-builder]438git = "https://github.com/paritytech/substrate"439branch = "polkadot-v0.9.24"
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>,
 );