gill

fillProvisorySetComputeUnitLimitInstruction

function fillProvisorySetComputeUnitLimitInstruction<TTransactionMessage>(transactionMessage): TTransactionMessage;

Appends a SetComputeUnitLimit instruction with a provisory compute unit limit to a given transaction message if and only if it does not already have one.

Example

const transactionMessage = pipe(
  createTransactionMessage({ version: 0 }),
  fillProvisorySetComputeUnitLimitInstruction,
  // ...
);

Type Parameters

Type Parameter
TTransactionMessage extends Readonly<{ instructions: readonly IInstruction<string, readonly (IAccountLookupMeta<string, string> | IAccountMeta<string>)[]>[]; version: TransactionVersion; }>

Parameters

ParameterType
transactionMessageTTransactionMessage

Returns

TTransactionMessage

On this page