referrerpolicy=no-referrer-when-downgrade
pallet_contracts::debug

Trait Tracing

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

    // Required method
    fn new_call_span(
        contract_address: &T::AccountId,
        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: &T::AccountId, 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Source§

type CallSpan = ()

Source§

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

Implementors§