Trait pallet_contracts::debug::Tracing
source · 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§
Required Methods§
sourcefn new_call_span(
code_hash: &<T as Config>::Hash,
entry_point: ExportedFunction,
input_data: &[u8]
) -> Self::CallSpan
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.