Function getSimulationUnits

  • Gets the compute units used in a transaction by simulating it.

    Parameters

    • transaction: VersionedTransaction

      The transaction to simulate.

    • connection: Connection

      The connection to use for the simulation.

    Returns Promise<undefined | number>

    The number of compute units used in the simulation, or undefined if the simulation failed.

Generated using TypeDoc