pub trait Tracer {
// Required methods
fn enter_child_span(
&mut self,
from: H160,
to: H160,
is_delegate_call: bool,
is_read_only: bool,
value: U256,
input: &[u8],
gas: Weight,
);
fn log_event(&mut self, event: H160, topics: &[H256], data: &[u8]);
fn exit_child_span(&mut self, output: &ExecReturnValue, gas_left: Weight);
fn exit_child_span_with_error(
&mut self,
error: DispatchError,
gas_left: Weight,
);
}
Expand description
Defines methods to trace contract interactions.
Required Methods§
Sourcefn enter_child_span(
&mut self,
from: H160,
to: H160,
is_delegate_call: bool,
is_read_only: bool,
value: U256,
input: &[u8],
gas: Weight,
)
fn enter_child_span( &mut self, from: H160, to: H160, is_delegate_call: bool, is_read_only: bool, value: U256, input: &[u8], gas: Weight, )
Called before a contract call is executed
Sourcefn exit_child_span(&mut self, output: &ExecReturnValue, gas_left: Weight)
fn exit_child_span(&mut self, output: &ExecReturnValue, gas_left: Weight)
Called after a contract call is executed
Sourcefn exit_child_span_with_error(&mut self, error: DispatchError, gas_left: Weight)
fn exit_child_span_with_error(&mut self, error: DispatchError, gas_left: Weight)
Called when a contract call terminates with an error