Trait novax_executor::TransactionExecutor

source ·
pub trait TransactionExecutor: Send + Sync {
    // Required method
    fn sc_call<'life0, 'life1, 'async_trait, OutputManaged>(
        &'life0 mut self,
        to: &'life1 Address,
        function: String,
        arguments: Vec<Vec<u8>>,
        gas_limit: u64,
        egld_value: BigUint,
        esdt_transfers: Vec<TokenTransfer>,
    ) -> Pin<Box<dyn Future<Output = Result<CallResult<OutputManaged::Native>, ExecutorError>> + Send + 'async_trait>>
       where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

A trait defining the necessary operations for executing smart contract transactions.

Implementations of this trait can vary based on the specific environment (e.g., real blockchain, mock blockchain).

Required Methods§

source

fn sc_call<'life0, 'life1, 'async_trait, OutputManaged>( &'life0 mut self, to: &'life1 Address, function: String, arguments: Vec<Vec<u8>>, gas_limit: u64, egld_value: BigUint, esdt_transfers: Vec<TokenTransfer>, ) -> Pin<Box<dyn Future<Output = Result<CallResult<OutputManaged::Native>, ExecutorError>> + Send + 'async_trait>>
where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Executes a smart contract call with the specified parameters.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: TransactionExecutor> TransactionExecutor for Arc<Mutex<T>>

An implementation of TransactionExecutor trait for types wrapped in Arc<Mutex<T>>.

This implementation allows shared access to a transaction executor instance across multiple threads.

source§

fn sc_call<'life0, 'life1, 'async_trait, OutputManaged>( &'life0 mut self, to: &'life1 Address, function: String, arguments: Vec<Vec<u8>>, gas_limit: u64, egld_value: BigUint, esdt_transfers: Vec<TokenTransfer>, ) -> Pin<Box<dyn Future<Output = Result<CallResult<OutputManaged::Native>, ExecutorError>> + Send + 'async_trait>>
where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Executes a smart contract call using the underlying TransactionExecutor implementation.

Implementors§