Trait Transactionable

Source
pub trait Transactionable: Send + Sync {
    // Required methods
    fn prepopulated(&self) -> PrepopulateTransaction;
    fn validate_with_network<'life0, 'life1, 'async_trait>(
        &'life0 self,
        network: &'life1 NetworkConfig,
    ) -> Pin<Box<dyn Future<Output = Result<(), ValidationError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn edit_with_network<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        _network: &'life1 NetworkConfig,
    ) -> Pin<Box<dyn Future<Output = Result<(), ValidationError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

fn prepopulated(&self) -> PrepopulateTransaction

Source

fn validate_with_network<'life0, 'life1, 'async_trait>( &'life0 self, network: &'life1 NetworkConfig, ) -> Pin<Box<dyn Future<Output = Result<(), ValidationError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Validate the transaction before sending it to the network

Provided Methods§

Source

fn edit_with_network<'life0, 'life1, 'async_trait>( &'life0 mut self, _network: &'life1 NetworkConfig, ) -> Pin<Box<dyn Future<Output = Result<(), ValidationError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Edit the transaction before sending it to the network. This is useful for example to add storage deposit to the transaction if it’s needed. Though, it won’t be called if the user has presigned the transaction.

Implementors§