Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public final class ComputeBudget

  1. Object
  2. ComputeBudget
Compute Budget and Memo instructions, the two most transactions add beside their payload.

Methods

public static Instruction setComputeUnitLimit(int units)Caps the compute units the transaction may use.
public static Instruction setComputeUnitPrice(long microLamports)Sets the priority fee, in micro-lamports per compute unit.
public static Instruction memo(String text, SolanaAddress... signers)A Memo program instruction carrying UTF-8 text; each listed signer must sign.

Inherited methods

Method details

setComputeUnitLimit

public static Instruction setComputeUnitLimit(int units)
Caps the compute units the transaction may use.

setComputeUnitPrice

public static Instruction setComputeUnitPrice(long microLamports)
Sets the priority fee, in micro-lamports per compute unit.

memo

public static Instruction memo(String text, SolanaAddress... signers)
A Memo program instruction carrying UTF-8 text; each listed signer must sign.