referrerpolicy=no-referrer-when-downgrade

Trait pallet_revive::debug::Tracing

source ·
pub trait Tracing<T: Config> {
    type CallSpan: CallSpan;

    // Required method
    fn new_call_span(
        contract_address: &H160,
        entry_point: ExportedFunction,
        input_data: &[u8],
    ) -> Self::CallSpan;
}
Expand description

Defines methods to capture contract calls, enabling external observers to measure, trace, and react to contract interactions.

Required Associated Types§

source

type CallSpan: CallSpan

The type of CallSpan that is created by this trait.

Required Methods§

source

fn new_call_span( contract_address: &H160, entry_point: ExportedFunction, input_data: &[u8], ) -> Self::CallSpan

Creates a new call span to encompass the upcoming contract execution.

This method should be invoked just before the execution of a contract and marks the beginning of a traceable span of execution.

§Arguments
  • contract_address - The address of the contract that is about to be executed.
  • entry_point - Describes whether the call is the constructor or a regular call.
  • input_data - The raw input data of the call.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: Config> Tracing<T> for ()

§

type CallSpan = ()

source§

fn new_call_span( contract_address: &H160, entry_point: ExportedFunction, input_data: &[u8], )

Implementors§