Class ExecutionResult

Represents the result of a transaction execution, which includes the initiator, cost, transfers, and effects.

Hierarchy

  • ExecutionResult

Constructors

Properties

consumed: number

The amount of resources consumed during the transaction execution.

cost: number

The cost associated with the transaction execution.

effects: Transform[] = []

The effects applied during the transaction execution.

errorMessage?: string

The error message, if any, generated during the execution.

initiator: InitiatorAddr

The address of the initiator of the execution.

limit: number

The execution limit for the transaction.

originExecutionResultV1?: ExecutionResultV1

The original execution result in version 1 format, if applicable.

originExecutionResultV2?: ExecutionResultV2

The original execution result in version 2 format, if applicable.

payment?: any

The payment made for the transaction, if any.

sizeEstimate: number

The estimated size of the transaction execution.

transfers: Transfer[] = []

The transfers included in the transaction execution.

Methods

  • Deserializes an ExecutionResult from JSON data. Supports both version 1 and version 2 formats.

    Returns

    The deserialized ExecutionResult.

    Throws

    Error if the data format is invalid or unknown.

    Parameters

    • data: any

      The JSON data representing the execution result.

    Returns ExecutionResult

  • Converts an ExecutionResult instance to a plain JSON object.

    This method serializes an ExecutionResult object into a plain JSON structure using the TypedJSON serializer. It allows for easy conversion of the ExecutionResult to a JSON-compatible format that can be used for logging, transmission over the network, or storage.

    Returns

    A plain JSON object representing the ExecutionResult.

    Parameters

    • executionResult: ExecutionResult

      The ExecutionResult instance to be converted into a plain JSON object.

    Returns JsonTypes

Generated using TypeDoc