pub trait Tracing {
// Provided methods
fn watch_address(&mut self, _addr: &H160) { ... }
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 instantiate_code(&mut self, _code: &Code, _salt: Option<&[u8; 32]>) { ... }
fn balance_read(&mut self, _addr: &H160, _value: U256) { ... }
fn storage_read(&mut self, _key: &Key, _value: Option<&[u8]>) { ... }
fn storage_write(
&mut self,
_key: &Key,
_old_value: Option<Vec<u8>>,
_new_value: Option<&[u8]>,
) { ... }
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.
Provided Methods§
Sourcefn watch_address(&mut self, _addr: &H160)
fn watch_address(&mut self, _addr: &H160)
Register an address that should be traced.
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 instantiate_code(&mut self, _code: &Code, _salt: Option<&[u8; 32]>)
fn instantiate_code(&mut self, _code: &Code, _salt: Option<&[u8; 32]>)
Record the next code and salt to be instantiated.
Sourcefn balance_read(&mut self, _addr: &H160, _value: U256)
fn balance_read(&mut self, _addr: &H160, _value: U256)
Called when a balance is read
Sourcefn storage_read(&mut self, _key: &Key, _value: Option<&[u8]>)
fn storage_read(&mut self, _key: &Key, _value: Option<&[u8]>)
Called when storage read is called
Sourcefn storage_write(
&mut self,
_key: &Key,
_old_value: Option<Vec<u8>>,
_new_value: Option<&[u8]>,
)
fn storage_write( &mut self, _key: &Key, _old_value: Option<Vec<u8>>, _new_value: Option<&[u8]>, )
Called when storage write is called
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