gill

setTransactionMessageComputeUnitPrice

function setTransactionMessageComputeUnitPrice<TTransactionMessage>(microLamports, transactionMessage): TTransactionMessage;

Sets the compute unit price of a transaction message in micro-Lamports.

Example

const transactionMessage = pipe(
  createTransactionMessage({ version: 0 }),
  (m) => setTransactionMessageComputeUnitPrice(10_000, m),
  // ...
);

Type Parameters

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

Parameters

ParameterType
microLamportsnumber | bigint
transactionMessageTTransactionMessage

Returns

TTransactionMessage

On this page