Trait fc_api::backend::Backend

source ·
pub trait Backend<Block: BlockT>: Send + Sync {
    // Required methods
    fn block_hash<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ethereum_block_hash: &'life1 H256
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Block::Hash>>, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn transaction_metadata<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ethereum_transaction_hash: &'life1 H256
    ) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionMetadata<Block>>, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn log_indexer(&self) -> &dyn LogIndexerBackend<Block>;

    // Provided method
    fn is_indexed(&self) -> bool { ... }
}
Expand description

The frontier backend interface.

Required Methods§

source

fn block_hash<'life0, 'life1, 'async_trait>( &'life0 self, ethereum_block_hash: &'life1 H256 ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Block::Hash>>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the substrate hash with the given ethereum block hash.

source

fn transaction_metadata<'life0, 'life1, 'async_trait>( &'life0 self, ethereum_transaction_hash: &'life1 H256 ) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionMetadata<Block>>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the transaction metadata with the given ethereum block hash.

source

fn log_indexer(&self) -> &dyn LogIndexerBackend<Block>

Returns reference to log indexer backend.

Provided Methods§

source

fn is_indexed(&self) -> bool

Indicate whether the log indexing feature is supported.

Implementors§