openzeppelin_relayer::repositories::transaction

Trait TransactionRepository

Source
pub trait TransactionRepository: Repository<TransactionRepoModel, String> {
    // Required methods
    fn find_by_relayer_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        relayer_id: &'life1 str,
        query: PaginationQuery,
    ) -> Pin<Box<dyn Future<Output = Result<PaginatedResult<TransactionRepoModel>, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn find_by_status<'life0, 'async_trait>(
        &'life0 self,
        status: TransactionStatus,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionRepoModel>, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn find_by_nonce<'life0, 'life1, 'async_trait>(
        &'life0 self,
        relayer_id: &'life1 str,
        nonce: u64,
    ) -> Pin<Box<dyn Future<Output = Result<Option<TransactionRepoModel>, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update_status<'life0, 'async_trait>(
        &'life0 self,
        tx_id: String,
        status: TransactionStatus,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn partial_update<'life0, 'async_trait>(
        &'life0 self,
        tx_id: String,
        update: TransactionUpdateRequest,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_network_data<'life0, 'async_trait>(
        &'life0 self,
        tx_id: String,
        network_data: NetworkTransactionData,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_sent_at<'life0, 'async_trait>(
        &'life0 self,
        tx_id: String,
        sent_at: String,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_confirmed_at<'life0, 'async_trait>(
        &'life0 self,
        tx_id: String,
        confirmed_at: String,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A trait defining transaction repository operations

Required Methods§

Source

fn find_by_relayer_id<'life0, 'life1, 'async_trait>( &'life0 self, relayer_id: &'life1 str, query: PaginationQuery, ) -> Pin<Box<dyn Future<Output = Result<PaginatedResult<TransactionRepoModel>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find transactions by relayer ID with pagination

Source

fn find_by_status<'life0, 'async_trait>( &'life0 self, status: TransactionStatus, ) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionRepoModel>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Find transactions by status

Source

fn find_by_nonce<'life0, 'life1, 'async_trait>( &'life0 self, relayer_id: &'life1 str, nonce: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<TransactionRepoModel>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find a transaction by relayer ID and nonce

Source

fn update_status<'life0, 'async_trait>( &'life0 self, tx_id: String, status: TransactionStatus, ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update the status of a transaction

Source

fn partial_update<'life0, 'async_trait>( &'life0 self, tx_id: String, update: TransactionUpdateRequest, ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Partially update a transaction

Source

fn update_network_data<'life0, 'async_trait>( &'life0 self, tx_id: String, network_data: NetworkTransactionData, ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update the network data of a transaction

Source

fn set_sent_at<'life0, 'async_trait>( &'life0 self, tx_id: String, sent_at: String, ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set the sent_at timestamp of a transaction

Source

fn set_confirmed_at<'life0, 'async_trait>( &'life0 self, tx_id: String, confirmed_at: String, ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set the confirmed_at timestamp of a transaction

Implementors§