Trait polkadot_service::runtime_traits::Applyable [−][src]
pub trait Applyable: Send + Sync {
type Call: Dispatchable;
fn validate<V>(
&self,
source: TransactionSource,
info: &<Self::Call as Dispatchable>::Info,
len: usize
) -> Result<ValidTransaction, TransactionValidityError>
where
V: ValidateUnsigned<Call = Self::Call>;
fn apply<V>(
self,
info: &<Self::Call as Dispatchable>::Info,
len: usize
) -> Result<Result<<Self::Call as Dispatchable>::PostInfo, DispatchErrorWithPostInfo<<Self::Call as Dispatchable>::PostInfo>>, TransactionValidityError>
where
V: ValidateUnsigned<Call = Self::Call>;
}
Expand description
An “executable” piece of information, used by the standard Substrate Executive in order to enact a piece of extrinsic information by marshalling and dispatching to a named function call.
Also provides information on to whom this information is attributable and an index that allows each piece of attributable information to be disambiguated.
Associated Types
type Call: Dispatchable
type Call: Dispatchable
Type by which we can dispatch. Restricts the UnsignedValidator
type.
Required methods
fn validate<V>(
&self,
source: TransactionSource,
info: &<Self::Call as Dispatchable>::Info,
len: usize
) -> Result<ValidTransaction, TransactionValidityError> where
V: ValidateUnsigned<Call = Self::Call>,
fn validate<V>(
&self,
source: TransactionSource,
info: &<Self::Call as Dispatchable>::Info,
len: usize
) -> Result<ValidTransaction, TransactionValidityError> where
V: ValidateUnsigned<Call = Self::Call>,
Checks to see if this is a valid transaction. It returns information on it if so.
fn apply<V>(
self,
info: &<Self::Call as Dispatchable>::Info,
len: usize
) -> Result<Result<<Self::Call as Dispatchable>::PostInfo, DispatchErrorWithPostInfo<<Self::Call as Dispatchable>::PostInfo>>, TransactionValidityError> where
V: ValidateUnsigned<Call = Self::Call>,
fn apply<V>(
self,
info: &<Self::Call as Dispatchable>::Info,
len: usize
) -> Result<Result<<Self::Call as Dispatchable>::PostInfo, DispatchErrorWithPostInfo<<Self::Call as Dispatchable>::PostInfo>>, TransactionValidityError> where
V: ValidateUnsigned<Call = Self::Call>,
Executes all necessary logic needed prior to dispatch and deconstructs into function call, index and sender.
Implementations on Foreign Types
pub fn validate<U>(
&self,
source: TransactionSource,
info: &<<TestXt<Call, Extra> as Applyable>::Call as Dispatchable>::Info,
len: usize
) -> Result<ValidTransaction, TransactionValidityError> where
U: ValidateUnsigned<Call = <TestXt<Call, Extra> as Applyable>::Call>,
pub fn validate<U>(
&self,
source: TransactionSource,
info: &<<TestXt<Call, Extra> as Applyable>::Call as Dispatchable>::Info,
len: usize
) -> Result<ValidTransaction, TransactionValidityError> where
U: ValidateUnsigned<Call = <TestXt<Call, Extra> as Applyable>::Call>,
Checks to see if this is a valid transaction. It returns information on it if so.
pub fn apply<U>(
self,
info: &<<TestXt<Call, Extra> as Applyable>::Call as Dispatchable>::Info,
len: usize
) -> Result<Result<<<TestXt<Call, Extra> as Applyable>::Call as Dispatchable>::PostInfo, DispatchErrorWithPostInfo<<<TestXt<Call, Extra> as Applyable>::Call as Dispatchable>::PostInfo>>, TransactionValidityError> where
U: ValidateUnsigned<Call = <TestXt<Call, Extra> as Applyable>::Call>,
pub fn apply<U>(
self,
info: &<<TestXt<Call, Extra> as Applyable>::Call as Dispatchable>::Info,
len: usize
) -> Result<Result<<<TestXt<Call, Extra> as Applyable>::Call as Dispatchable>::PostInfo, DispatchErrorWithPostInfo<<<TestXt<Call, Extra> as Applyable>::Call as Dispatchable>::PostInfo>>, TransactionValidityError> where
U: ValidateUnsigned<Call = <TestXt<Call, Extra> as Applyable>::Call>,
Executes all necessary logic needed prior to dispatch and deconstructs into function call, index and sender.