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

Trait SendSignedTransaction

Source
pub trait SendSignedTransaction<T: CreateSignedTransaction<LocalCall>, C: AppCrypto<T::Public, T::Signature>, LocalCall> {
    type Result;

    // Required method
    fn send_signed_transaction(
        &self,
        f: impl Fn(&Account<T>) -> LocalCall,
    ) -> Self::Result;

    // Provided method
    fn send_single_signed_transaction(
        &self,
        account: &Account<T>,
        call: LocalCall,
    ) -> Option<Result<(), ()>> { ... }
}
Expand description

Submit a signed transaction to the transaction pool.

Required Associated Types§

Source

type Result

A submission result.

This should contain an indication of success and the account that was used for signing.

Required Methods§

Source

fn send_signed_transaction( &self, f: impl Fn(&Account<T>) -> LocalCall, ) -> Self::Result

Submit a signed transaction to the local pool.

Given f closure will be called for every requested account and expects a Call object to be returned. The call is then wrapped into a transaction (see #CreateSignedTransaction), signed and submitted to the pool.

Provided Methods§

Source

fn send_single_signed_transaction( &self, account: &Account<T>, call: LocalCall, ) -> Option<Result<(), ()>>

Wraps the call into transaction, signs using given account and submits to the pool.

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§

Source§

impl<T: CreateSignedTransaction<LocalCall> + SigningTypes, C: AppCrypto<T::Public, T::Signature>, LocalCall> SendSignedTransaction<T, C, LocalCall> for Signer<T, C, ForAny>

Source§

impl<T: SigningTypes + CreateSignedTransaction<LocalCall>, C: AppCrypto<T::Public, T::Signature>, LocalCall> SendSignedTransaction<T, C, LocalCall> for Signer<T, C, ForAll>