Class ContractFunctionResult

The result returned by a call to a smart contract function. This is part of the response to a ContractCallLocal query, and is in the record for a ContractCall or ContractCreateInstance transaction. The ContractCreateInstance transaction record has the results of the call to the constructor.

Hierarchy

  • ContractFunctionResult

Constructors

  • Constructor isn't part of the stable API

    Parameters

    • result: {
          _createResult: boolean;
          amount: Long;
          bloom: Uint8Array;
          bytes: Uint8Array;
          contractId: null | ContractId;
          contractNonces: ContractNonceInfo[];
          createdContractIds: ContractId[];
          errorMessage: null | string;
          evmAddress: null | Uint8Array;
          functionParameters: Uint8Array;
          gas: Long;
          gasUsed: Long;
          logs: ContractLogInfo[];
          senderAccountId: null | AccountId;
          stateChanges: default[];
      }
      • _createResult: boolean
      • amount: Long
      • bloom: Uint8Array
      • bytes: Uint8Array
      • contractId: null | ContractId
      • contractNonces: ContractNonceInfo[]
      • createdContractIds: ContractId[]
      • errorMessage: null | string
      • evmAddress: null | Uint8Array
      • functionParameters: Uint8Array
      • gas: Long
      • gasUsed: Long
      • logs: ContractLogInfo[]
      • senderAccountId: null | AccountId
      • stateChanges: default[]

    Returns ContractFunctionResult

Properties

_createResult: boolean

Determines if this result came from record.contractCreateResult if true or record.contractCallResult if false

amount: Long

Number of tinybars sent (the function must be payable if this is nonzero).

bloom: Uint8Array

Bloom filter for record

bytes: Uint8Array
contractId: null | ContractId

The smart contract instance whose function was called.

contractNonces: ContractNonceInfo[]

A list of updated contract account nonces containing the new nonce value for each contract account. This is always empty in a ContractCallLocalResponse#ContractFunctionResult message, since no internal creations can happen in a static EVM call.

createdContractIds: ContractId[]

Deprecated

the list of smart contracts that were created by the function call.

The created ids will now also be externalized through internal transaction records, where each record has its alias field populated with the new contract's EVM address. (This is needed for contracts created with CREATE2, since there is no longer a simple relationship between the new contract's 0.0.X id and its Solidity address.)

errorMessage: null | string

Message In case there was an error during smart contract execution.

evmAddress: null | Uint8Array
functionParameters: Uint8Array

The parameters passed into the contract call.

gas: Long

The amount of gas available for the call, aka the gasLimit.

gasUsed: Long

Units of gas used to execute contract.

The log info for events returned by the function.

senderAccountId: null | AccountId

The account that is the "sender." If not present it is the accountId from the transactionId.

This field should only be populated when the paired TransactionBody in the record stream is not a ContractCreateTransactionBody or a ContractCallTransactionBody.

stateChanges: default[]

Deprecated

  • Use mirror node for contract traceability instead

Methods

  • Parameters

    • types: (string | ParamType)[]

    Returns any

    Description

    Decode the data according to the array of types, each of which may be a string or ParamType.

Generated using TypeDoc