openzeppelin_monitor::services::blockchain

Trait EvmClientTrait

Source
pub trait EvmClientTrait {
    // Required methods
    fn get_transaction_receipt<'life0, 'async_trait>(
        &'life0 self,
        transaction_hash: String,
    ) -> Pin<Box<dyn Future<Output = Result<EVMTransactionReceipt, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_logs_for_blocks<'life0, 'async_trait>(
        &'life0 self,
        from_block: u64,
        to_block: u64,
        addresses: Option<Vec<String>>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<EVMReceiptLog>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Extended functionality specific to EVM-compatible blockchains

Required Methods§

Source

fn get_transaction_receipt<'life0, 'async_trait>( &'life0 self, transaction_hash: String, ) -> Pin<Box<dyn Future<Output = Result<EVMTransactionReceipt, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a transaction receipt by its hash

§Arguments
  • transaction_hash - The hash of the transaction to look up
§Returns
  • Result<TransactionReceipt, anyhow::Error> - Transaction receipt or error
Source

fn get_logs_for_blocks<'life0, 'async_trait>( &'life0 self, from_block: u64, to_block: u64, addresses: Option<Vec<String>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<EVMReceiptLog>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves logs for a range of blocks

§Arguments
  • from_block - Starting block number
  • to_block - Ending block number
  • addresses - Optional list of addresses to filter logs by
§Returns
  • Result<Vec<Log>, anyhow::Error> - Collection of matching logs or error

Implementors§