openzeppelin_relayer::repositories

Trait TransactionCounterTrait

Source
pub trait TransactionCounterTrait {
    // Required methods
    fn get(
        &self,
        relayer_id: &str,
        address: &str,
    ) -> Result<Option<u64>, TransactionCounterError>;
    fn get_and_increment(
        &self,
        relayer_id: &str,
        address: &str,
    ) -> Result<u64, TransactionCounterError>;
    fn decrement(
        &self,
        relayer_id: &str,
        address: &str,
    ) -> Result<u64, TransactionCounterError>;
    fn set(
        &self,
        relayer_id: &str,
        address: &str,
        value: u64,
    ) -> Result<(), TransactionCounterError>;
}

Required Methods§

Source

fn get( &self, relayer_id: &str, address: &str, ) -> Result<Option<u64>, TransactionCounterError>

Source

fn get_and_increment( &self, relayer_id: &str, address: &str, ) -> Result<u64, TransactionCounterError>

Source

fn decrement( &self, relayer_id: &str, address: &str, ) -> Result<u64, TransactionCounterError>

Source

fn set( &self, relayer_id: &str, address: &str, value: u64, ) -> Result<(), TransactionCounterError>

Implementors§