openzeppelin_relayer::domain

Trait Transaction

Source
pub trait Transaction {
    // Required methods
    fn prepare_transaction<'life0, 'async_trait>(
        &'life0 self,
        tx: TransactionRepoModel,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn submit_transaction<'life0, 'async_trait>(
        &'life0 self,
        tx: TransactionRepoModel,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn resubmit_transaction<'life0, 'async_trait>(
        &'life0 self,
        tx: TransactionRepoModel,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn handle_transaction_status<'life0, 'async_trait>(
        &'life0 self,
        tx: TransactionRepoModel,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn cancel_transaction<'life0, 'async_trait>(
        &'life0 self,
        tx: TransactionRepoModel,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn replace_transaction<'life0, 'async_trait>(
        &'life0 self,
        tx: TransactionRepoModel,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sign_transaction<'life0, 'async_trait>(
        &'life0 self,
        tx: TransactionRepoModel,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn validate_transaction<'life0, 'async_trait>(
        &'life0 self,
        tx: TransactionRepoModel,
    ) -> Pin<Box<dyn Future<Output = Result<bool, TransactionError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A trait that defines the operations for handling transactions across different networks.

Required Methods§

Source

fn prepare_transaction<'life0, 'async_trait>( &'life0 self, tx: TransactionRepoModel, ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Prepares a transaction for submission.

§Arguments
  • tx - A TransactionRepoModel representing the transaction to be prepared.
§Returns

A Result containing the prepared TransactionRepoModel or a TransactionError.

Source

fn submit_transaction<'life0, 'async_trait>( &'life0 self, tx: TransactionRepoModel, ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Submits a transaction to the network.

§Arguments
  • tx - A TransactionRepoModel representing the transaction to be submitted.
§Returns

A Result containing the submitted TransactionRepoModel or a TransactionError.

Source

fn resubmit_transaction<'life0, 'async_trait>( &'life0 self, tx: TransactionRepoModel, ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Resubmits a transaction with updated parameters.

§Arguments
  • tx - A TransactionRepoModel representing the transaction to be resubmitted.
§Returns

A Result containing the resubmitted TransactionRepoModel or a TransactionError.

Source

fn handle_transaction_status<'life0, 'async_trait>( &'life0 self, tx: TransactionRepoModel, ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handles the status of a transaction.

§Arguments
  • tx - A TransactionRepoModel representing the transaction whose status is to be handled.
§Returns

A Result containing the updated TransactionRepoModel or a TransactionError.

Source

fn cancel_transaction<'life0, 'async_trait>( &'life0 self, tx: TransactionRepoModel, ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cancels a transaction.

§Arguments
  • tx - A TransactionRepoModel representing the transaction to be canceled.
§Returns

A Result containing the canceled TransactionRepoModel or a TransactionError.

Source

fn replace_transaction<'life0, 'async_trait>( &'life0 self, tx: TransactionRepoModel, ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Replaces a transaction with a new one.

§Arguments
  • tx - A TransactionRepoModel representing the transaction to be replaced.
§Returns

A Result containing the new TransactionRepoModel or a TransactionError.

Source

fn sign_transaction<'life0, 'async_trait>( &'life0 self, tx: TransactionRepoModel, ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, TransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Signs a transaction.

§Arguments
  • tx - A TransactionRepoModel representing the transaction to be signed.
§Returns

A Result containing the signed TransactionRepoModel or a TransactionError.

Source

fn validate_transaction<'life0, 'async_trait>( &'life0 self, tx: TransactionRepoModel, ) -> Pin<Box<dyn Future<Output = Result<bool, TransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Validates a transaction.

§Arguments
  • tx - A TransactionRepoModel representing the transaction to be validated.
§Returns

A Result containing a boolean indicating the validity of the transaction or a TransactionError.

Implementors§