difftreelog
Trait changed
in: master
2 files changed
pallets/scheduler/src/lib.rsdiffbeforeafterboth79use sp_runtime::{MultiSignature};79use sp_runtime::{MultiSignature};80use sp_core::{H160};80use sp_core::{H160};818182pub trait ApplyCall<C: Dispatchable, SelfContainedSignedInfo> {82pub trait ApplyCall<T: frame_system::Config + Config, SelfContainedSignedInfo> {83 fn apply_call(signer: Address, function: C);83 fn apply_call(signer: T::AccountId, function: <T as Config>::Call); //<T as system::Config>84}84}858586/// The address format for describing accounts.86/// The address format for describing accounts.87pub type Signature = MultiSignature;87//pub type Signature = MultiSignature;88pub type Address = sp_runtime::MultiAddress<AccountId, ()>;88// pub type Address = sp_runtime::MultiAddress<AccountId, ()>;89pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;89//pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;909091/// Our pallet's configuration trait. All our types and constants go in here. If the91/// Our pallet's configuration trait. All our types and constants go in here. If the92/// pallet is dependent on specific other pallets, then their configuration traits92/// pallet is dependent on specific other pallets, then their configuration traits127 type WeightInfo: WeightInfo;127 type WeightInfo: WeightInfo;128128129 /// A type that allows you to use SignedExtra additional logic when dispatching call129 /// A type that allows you to use SignedExtra additional logic when dispatching call130 type Executor: ApplyCall<<Self as system::Config>::Call, H160>;130 type Executor: ApplyCall<Self, H160>;131}131}132132133pub const MAX_TASK_ID_LENGTH_IN_BYTES: u8 = 16;133pub const MAX_TASK_ID_LENGTH_IN_BYTES: u8 = 16;runtime/src/lib.rsdiffbeforeafterboth--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -56,7 +56,7 @@
WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients,
},
};
-use pallet_unq_scheduler::ApplyExtrinsic;
+use pallet_unq_scheduler::ApplyCall;
use up_data_structs::*;
// use pallet_contracts::weights::WeightInfo;
// #[cfg(any(feature = "std", test))]
@@ -830,17 +830,17 @@
}
pub struct Executor;
-impl<C, SelfContainedSignedInfo> ApplyExtrinsic<C, SelfContainedSignedInfo> for Executor
+impl<T: frame_system::Config + pallet_unq_scheduler::Config, SelfContainedSignedInfo> ApplyCall<T, SelfContainedSignedInfo> for Executor
where
- C: Member
+ <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<C> + SelfContainedCall<SignedInfo = SelfContainedSignedInfo>,
+ Call: From<<T as frame_system::Config>::Call> + From<<T as pallet_unq_scheduler::Config>::Call> + SelfContainedCall<SignedInfo = SelfContainedSignedInfo>
{
- fn apply_call(signer: Address, call: C) {
+ fn apply_call(signer: <T as frame_system::Config>::AccountId, call: <T as pallet_unq_scheduler::Config>::Call) {
let dispatch_info = call.get_dispatch_info();
let extrinsic = fp_self_contained::CheckedExtrinsic::<
AccountId,