pub async fn execute_monitor<M: MonitorRepositoryTrait<N, TR>, N: NetworkRepositoryTrait + Send + Sync + 'static, TR: TriggerRepositoryTrait + Send + Sync + 'static, CP: ClientPoolTrait + Send + Sync + 'static>(
config: MonitorExecutionConfig<M, N, TR, CP>,
) -> ExecutionResult<String>
Expand description
Executes a monitor against a specific block number on a blockchain network.
This function allows testing monitors by running them against historical blocks. It supports both EVM and Stellar networks, retrieving the block data and applying the monitor’s filters to check for matches.
§Arguments
monitor_name
- The name of the monitor to executenetwork_slug
- The network identifier to run the monitor againstblock_number
- The specific block number to analyzeactive_monitors
- List of currently active monitorsnetwork_service
- The network service to usefilter_service
- The filter service to useclient_pool
- The client pool to use
§Returns
Result<String, ExecutionError>
- JSON string containing matches or error