pub trait TraceHandler: Send + Sync {
// Required methods
fn handle_trace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
trace: &'life1 CallTrace,
ctx: &'life2 IndexContext,
) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn name(&self) -> &str;
}Expand description
Trait for user-provided trace processing logic.
Implement this to react to call traces during indexing (e.g., track ETH transfers, monitor contract creations, record internal function calls).
Required Methods§
Sourcefn handle_trace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
trace: &'life1 CallTrace,
ctx: &'life2 IndexContext,
) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_trace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
trace: &'life1 CallTrace,
ctx: &'life2 IndexContext,
) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called for each trace that passes the handler’s filter.