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.rsdiffbeforeafterboth56 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}831831832pub 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 Executor834where834where835 C: Member835 <T as frame_system::Config>::Call: Member836 + Dispatchable<Origin = Origin, Info = DispatchInfo>836 + Dispatchable<Origin = Origin, Info = DispatchInfo>837 + SelfContainedCall<SignedInfo = SelfContainedSignedInfo>837 + SelfContainedCall<SignedInfo = SelfContainedSignedInfo>838 + GetDispatchInfo838 + GetDispatchInfo839 + 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,