@hashgraph/sdk
    Preparing search index...

    Class MirrorNodeContractEstimateQuery

    A query that estimates the gas required for a contract function call using the Hedera Mirror Node.

    This query simulates a contract call to estimate the amount of gas that would be required to execute the same call on the main network. It's useful for determining the appropriate gas limit before submitting an actual transaction.

    Hierarchy

    • default
      • MirrorNodeContractEstimateQuery
    Index

    Constructors

    Properties

    _blockNumber: null | Long
    _contractEvmAddress: any
    _contractId: null | ContractId
    _functionName: any
    _functionParameters: null | Uint8Array<ArrayBufferLike>
    _gasLimit: null | Long
    _gasPrice: null | Long
    _sender: null | AccountId
    _senderEvmAddress: null | string
    _value: null | Long

    Accessors

    • get callData(): undefined | null | Uint8Array<ArrayBufferLike>

      Returns undefined | null | Uint8Array<ArrayBufferLike>

    Methods

    • Parameters

      • client: Client<any, any>
      • jsonPayload: object

      Returns Promise<MirrorNodeResponse>

    • Parameters

      • sender: string

      Returns MirrorNodeContractEstimateQuery

      Set the 20-byte EVM address of the sender. This method must be used explicitly when working with accounts that have ECDSA keys with aliases, as their EVM addresses cannot be automatically derived and must be retrieved from the Mirror Node API. The EVM address can be filled using accountId.populateAccountEvmAddress(client)