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

    // Required method
    fn new_call_span(
        code_hash: &<T as Config>::Hash,
        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( code_hash: &<T as Config>::Hash, 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
  • code_hash - The code hash of the contract being called.
  • entry_point - Describes whether the call is the constructor or a regular call.
  • input_data - The raw input data of the call.

Implementations on Foreign Types§

source§

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

§

type CallSpan = ()

source§

fn new_call_span( code_hash: &<T as Config>::Hash, entry_point: ExportedFunction, input_data: &[u8] )

Implementors§