openzeppelin_monitor::bootstrap

Function create_block_handler

Source
pub fn create_block_handler<P: ClientPoolTrait + 'static>(
    shutdown_tx: Sender<bool>,
    filter_service: Arc<FilterService>,
    active_monitors: Vec<Monitor>,
    client_pools: Arc<P>,
    contract_specs: Vec<(String, ContractSpec)>,
) -> Arc<impl Fn(BlockType, Network) -> BoxFuture<'static, ProcessedBlock> + Send + Sync>
Expand description

Creates a block handler function that processes new blocks from the blockchain.

§Arguments

  • shutdown_tx - Watch channel for shutdown signals
  • filter_service - Service for filtering blockchain data
  • active_monitors - List of active monitors
  • client_pools - Client pools for accessing blockchain clients

§Returns

Returns a function that handles incoming blocks