referrerpolicy=no-referrer-when-downgrade
pallet_revive::tracing

Trait Tracer

Source
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§

Source

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

Source

fn log_event(&mut self, event: H160, topics: &[H256], data: &[u8])

Record a log event

Source

fn exit_child_span(&mut self, output: &ExecReturnValue, gas_left: Weight)

Called after a contract call is executed

Source

fn exit_child_span_with_error(&mut self, error: DispatchError, gas_left: Weight)

Called when a contract call terminates with an error

Implementors§

Source§

impl<Gas: Default, GasMapper: Fn(Weight) -> Gas> Tracer for CallTracer<Gas, GasMapper>