openzeppelin_monitor::bootstrapFunction create_trigger_handler
Source pub fn create_trigger_handler<S: TriggerExecutionServiceTrait + Send + Sync + 'static>(
shutdown_tx: Sender<bool>,
trigger_service: Arc<S>,
active_monitors_trigger_scripts: HashMap<String, (ScriptLanguage, String)>,
) -> Arc<impl Fn(&ProcessedBlock) -> JoinHandle<()> + Send + Sync>
Expand description
Creates a trigger handler function that processes trigger events from the block processing
pipeline.
§Arguments
shutdown_tx
- Watch channel for shutdown signals
trigger_service
- Service for executing triggers
§Returns
Returns a function that handles trigger execution for matching monitors