cfx_executor/observer/
call_tracer.rs

1use crate::stack::FrameResult;
2use cfx_vm_types::ActionParams;
3
4use impl_tools::autoimpl;
5use impl_trait_for_tuples::impl_for_tuples;
6
7#[impl_for_tuples(3)]
8#[autoimpl(for<T: trait + ?Sized> &mut T)]
9#[allow(unused_variables)]
10pub trait CallTracer {
11    /// Prepares call trace for given params.
12    fn record_call(&mut self, params: &ActionParams) {}
13
14    /// Prepares call result trace
15    fn record_call_result(&mut self, result: &FrameResult) {}
16
17    /// Prepares create trace for given params.
18    fn record_create(&mut self, params: &ActionParams) {}
19
20    /// Prepares create result trace
21    fn record_create_result(&mut self, result: &FrameResult) {}
22}