Estimate the consume limit of a transaction based on the simulation results of the transaction.

  • Parameters

    • connection: Connection

      The connection to the RPC

    • tx: VersionedTransaction

      The transaction to estimate the consume limit for

    • options: GetConsumeLimitEstimateOptions = {}

      The options for the estimate

    Returns Promise<
        {
            data: RpcResponseAndContext<SimulatedTransactionResponse>;
            unitsConsumed: undefined | number;
        },
    >

    The consume limit estimate multiplied by a multiplier percent or undefined and the native simulation results