Trait Authorize
pub trait Authorize {
    // Required methods
    fn authorize(
        &self,
        source: TransactionSource,
    ) -> Option<Result<(ValidTransaction, Weight), TransactionValidityError>>;
    fn weight_of_authorize(&self) -> Weight;
}Expand description
A trait to allow calls to authorize themselves from the origin None.
It is implemented by the crate::pallet macro and used by the
frame_system::AuthorizeCall transaction extension.
Pallet writers can declare the authorization logic for a call using the call attribute:
crate::pallet_macros::authorize.
Required Methods§
The authorize function.
Returns
Some(Ok((valid_transaction, unspent weight)))if the call is successfully authorized,Some(Err(error))if the call authorization is invalid,Noneif the call doesn’t provide any authorization.
The weight of the authorization function.