@hashgraph/sdk
    Preparing search index...

    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.

    Index

    Constructors

    • Constructor isn't part of the stable API

      Parameters

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

      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<ArrayBufferLike>

    Bloom filter for record

    bytes: Uint8Array<ArrayBufferLike>
    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[]

    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<ArrayBufferLike>
    functionParameters: Uint8Array<ArrayBufferLike>

    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.

    signerNonce: null | Long

    If not null this field specifies what the value of the signer account nonce is post transaction execution. For transactions that don't update the signer nonce (like HAPI ContractCall and ContractCreate transactions) this field should be null.

    stateChanges: ContractStateChange[]
    • Use mirror node for contract traceability instead

    Methods

    • Parameters

      • types: (string | ParamType)[]

      Returns any

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