Helius SDK - v3.1.0
    Preparing search index...

    Function makeGetComputeUnits

    • Estimates the compute units a transaction message will consume, then applies a floor and a safety buffer.

      The estimator comes from @solana/kit rather than @solana-program/compute-budget. Both raise the limit to the maximum before simulating, but the compute-budget one does it by appending a SetComputeUnitLimit instruction — a no-op on version 1 transactions (SIMD-0385), which would leave v1 simulations running against the default limit and failing on compute exhaustion. Kit's estimator sets the limit through a version-aware helper that writes v1's header config instead.

      Kit 7 supersedes this with estimateResourceLimitsFactory, which also returns v1's loaded-accounts-data-size limit; it does not exist in the currently supported kit 6.x range.

      Parameters

      • raw: Rpc<SolanaRpcApi>

      Returns GetComputeUnitsFn