• Creates a Compute Budget Utilities instruction for a given program.

    Parameters

    • programId: PublicKey

      The public key of the target program.

    • OptionalcomputeUnits: string = NEON_COMPUTE_UNITS

      The number of compute units to be used (defaults to NEON_COMPUTE_UNITS).

    Returns TransactionInstruction

    A Solana TransactionInstruction for setting the compute budget.

    const instruction = createComputeBudgetUtilsInstruction(myProgramId, 500_000);
    transaction.add(instruction);