zerot
    Preparing search index...

    Class ContractDebugger

    Provides debugging utilities for contract execution. It logs contract execution history and provides a summary report. This class is primarily intended for use in development environments.

    Index

    Constructors

    Methods

    • Generates a report summarizing the contract execution history. This report includes total executions, success/failure counts, success rate, and stats per layer.

      Returns string

      A JSON string representing the contract execution report.

    • Logs the execution of a contract method. This method is active only in development environments.

      Parameters

      • contractName: string

        The full name of the contract method (e.g., "UserService.createUser").

      • layer: string

        The layer of the application where the contract is applied.

      • input: any

        The input arguments passed to the contract method.

      • Optionaloutput: any

        The output returned by the contract method (if successful).

      • Optionalerror: any

        Any error that occurred during contract execution (if failed).

      Returns void