From a80758751e68b2a05e2812776f0f74a75ade4945 Mon Sep 17 00:00:00 2001 From: str-mv Date: Thu, 10 Feb 2022 10:53:26 +0000 Subject: [PATCH] Trait changed --- --- 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 { - fn apply_call(signer: Address, function: C); +pub trait ApplyCall { + fn apply_call(signer: T::AccountId, function: ::Call); // } /// The address format for describing accounts. -pub type Signature = MultiSignature; -pub type Address = sp_runtime::MultiAddress; -pub type AccountId = <::Signer as IdentifyAccount>::AccountId; +//pub type Signature = MultiSignature; +// pub type Address = sp_runtime::MultiAddress; +//pub type AccountId = <::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<::Call, H160>; + type Executor: ApplyCall; } pub const MAX_TASK_ID_LENGTH_IN_BYTES: u8 = 16; --- 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 ApplyExtrinsic for Executor +impl ApplyCall for Executor where - C: Member + ::Call: Member + Dispatchable + SelfContainedCall + GetDispatchInfo + From>, SelfContainedSignedInfo: Send + Sync + 'static, - Call: From + SelfContainedCall, + Call: From<::Call> + From<::Call> + SelfContainedCall { - fn apply_call(signer: Address, call: C) { + fn apply_call(signer: ::AccountId, call: ::Call) { let dispatch_info = call.get_dispatch_info(); let extrinsic = fp_self_contained::CheckedExtrinsic::< AccountId, -- gitstuff