TokenBridgeDataSource

Trait TokenBridgeDataSource 

Source
pub trait TokenBridgeDataSource<RecipientAddress>: Send + Sync {
    // Required method
    fn get_transfers<'life0, 'async_trait>(
        &'life0 self,
        main_chain_scripts: MainChainScripts,
        data_checkpoint: BridgeDataCheckpoint,
        max_transfers: u32,
        current_mc_block: McBlockHash,
    ) -> Pin<Box<dyn Future<Output = Result<(Vec<BridgeTransferV1<RecipientAddress>>, BridgeDataCheckpoint), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Interface for data sources that can be used by TokenBridgeInherentDataProvider

Required Methods§

Source

fn get_transfers<'life0, 'async_trait>( &'life0 self, main_chain_scripts: MainChainScripts, data_checkpoint: BridgeDataCheckpoint, max_transfers: u32, current_mc_block: McBlockHash, ) -> Pin<Box<dyn Future<Output = Result<(Vec<BridgeTransferV1<RecipientAddress>>, BridgeDataCheckpoint), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetches at most max_transfers of token bridge transfers after data_checkpoint up to current_mc_block

Implementors§