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§
Required Methods§
Sourcefn new_call_span(
contract_address: &T::AccountId,
entry_point: ExportedFunction,
input_data: &[u8],
) -> Self::CallSpan
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.