BatchRun

Trait BatchRun 

Source
pub trait BatchRun {
    type TransactionReceipt;
    type Error;

    // Required methods
    fn add_transaction(&mut self, tx: TransactionRequest);
    fn run<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<Self::TransactionReceipt, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

Batch transaction runner trait Allows multiple transactions to be batched and executed atomically

Required Associated Types§

Source

type TransactionReceipt

Transaction receipt type - using generic to avoid viem dependency

Source

type Error

Error type for batch operations

Required Methods§

Source

fn add_transaction(&mut self, tx: TransactionRequest)

Add a transaction to the batch

Source

fn run<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<Self::TransactionReceipt, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Execute all batched transactions Returns single transaction receipt for the entire batch

Implementors§