setComputeUnitLimit method
Set a specific compute unit limit that the transaction is allowed to consume.
units- Transaction-wide compute unit limit.
Implementation
TransactionInstruction setComputeUnitLimit({required final u32 units}) {
final List<Iterable<u8>> data = [borsh.u32.encode(units)];
return _instance.createTransactionIntruction(
ComputeBudgetInstruction.setComputeUnitLimit,
keys: const [],
data: data,
);
}