referrerpolicy=no-referrer-when-downgrade
frame_system::offchain

Trait CreateAuthorizedTransaction

Source
pub trait CreateAuthorizedTransaction<LocalCall>: CreateTransaction<LocalCall> {
    // Required method
    fn create_extension() -> Self::Extension;

    // Provided method
    fn create_authorized_transaction(call: Self::RuntimeCall) -> Self::Extrinsic { ... }
}
Expand description

Interface for creating a transaction for a call that will be authorized.

Authorized calls are calls that has some specific validation logic execute in the transaction extension: crate::AuthorizeCall. The authorization logic is defined on the call with the attribute: frame_support::pallet_macros::authorize.

This trait allows the runtime to define the extension to be used when creating an authorized transaction. It can be used in the offchain worker to create a transaction from a call.

Required Methods§

Source

fn create_extension() -> Self::Extension

Create the transaction extension to be used alongside an authorized call.

For more information about authorized call see frame_support::pallet_prelude::authorize.

Provided Methods§

Source

fn create_authorized_transaction(call: Self::RuntimeCall) -> Self::Extrinsic

Create a new transaction for an authorized call.

For more information about authorized call see frame_support::pallet_prelude::authorize.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

impl<LocalCall> CreateAuthorizedTransaction<LocalCall> for Runtime
where RuntimeCall: From<LocalCall>,

impl<LocalCall> CreateAuthorizedTransaction<LocalCall> for Runtime
where RuntimeCall: From<LocalCall>,