git.delta.rocks / unique-network / refs/commits / a80758751e68

difftreelog

Trait changed

str-mv2022-02-10parent: #1c23d3a.patch.diff
in: master

2 files changed

modifiedpallets/scheduler/src/lib.rsdiffbeforeafterboth
--- a/pallets/scheduler/src/lib.rs
+++ b/pallets/scheduler/src/lib.rs
@@ -79,14 +79,14 @@
 use sp_runtime::{MultiSignature};
 use sp_core::{H160};
 
-pub trait ApplyCall<C: Dispatchable, SelfContainedSignedInfo> {
-	fn apply_call(signer: Address, function: C);
+pub trait ApplyCall<T: frame_system::Config + Config, SelfContainedSignedInfo> {
+	fn apply_call(signer: T::AccountId, function: <T as Config>::Call); //<T as system::Config>
 }
 
 /// The address format for describing accounts.
-pub type Signature = MultiSignature;
-pub type Address = sp_runtime::MultiAddress<AccountId, ()>;
-pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;
+//pub type Signature = MultiSignature;
+// pub type Address = sp_runtime::MultiAddress<AccountId, ()>;
+//pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;
 
 /// Our pallet's configuration trait. All our types and constants go in here. If the
 /// pallet is dependent on specific other pallets, then their configuration traits
@@ -127,7 +127,7 @@
 	type WeightInfo: WeightInfo;
 
 	/// A type that allows you to use SignedExtra additional logic when dispatching call
-	type Executor: ApplyCall<<Self as system::Config>::Call, H160>;
+	type Executor: ApplyCall<Self, H160>;
 }
 
 pub const MAX_TASK_ID_LENGTH_IN_BYTES: u8 = 16;
modifiedruntime/src/lib.rsdiffbeforeafterboth
56 WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients,56 WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients,
57 },57 },
58};58};
59use pallet_unq_scheduler::ApplyExtrinsic;59use pallet_unq_scheduler::ApplyCall;
60use up_data_structs::*;60use up_data_structs::*;
61// use pallet_contracts::weights::WeightInfo;61// use pallet_contracts::weights::WeightInfo;
62// #[cfg(any(feature = "std", test))]62// #[cfg(any(feature = "std", test))]
830}830}
831831
832pub struct Executor;832pub struct Executor;
833impl<C, SelfContainedSignedInfo> ApplyExtrinsic<C, SelfContainedSignedInfo> for Executor833impl<T: frame_system::Config + pallet_unq_scheduler::Config, SelfContainedSignedInfo> ApplyCall<T, SelfContainedSignedInfo> for Executor
834where834where
835 C: Member835 <T as frame_system::Config>::Call: Member
836 + Dispatchable<Origin = Origin, Info = DispatchInfo>836 + Dispatchable<Origin = Origin, Info = DispatchInfo>
837 + SelfContainedCall<SignedInfo = SelfContainedSignedInfo>837 + SelfContainedCall<SignedInfo = SelfContainedSignedInfo>
838 + GetDispatchInfo838 + GetDispatchInfo
839 + From<frame_system::Call<Runtime>>,839 + From<frame_system::Call<Runtime>>,
840 SelfContainedSignedInfo: Send + Sync + 'static,840 SelfContainedSignedInfo: Send + Sync + 'static,
841 Call: From<C> + SelfContainedCall<SignedInfo = SelfContainedSignedInfo>,841 Call: From<<T as frame_system::Config>::Call> + From<<T as pallet_unq_scheduler::Config>::Call> + SelfContainedCall<SignedInfo = SelfContainedSignedInfo>
842{842{
843 fn apply_call(signer: Address, call: C) {843 fn apply_call(signer: <T as frame_system::Config>::AccountId, call: <T as pallet_unq_scheduler::Config>::Call) {
844 let dispatch_info = call.get_dispatch_info();844 let dispatch_info = call.get_dispatch_info();
845 let extrinsic = fp_self_contained::CheckedExtrinsic::<845 let extrinsic = fp_self_contained::CheckedExtrinsic::<
846 AccountId,846 AccountId,