gill

compute-budget

Enumerations

EnumerationDescription
ComputeBudgetInstruction-

Type Aliases

Variables

VariableDescription
COMPUTE_BUDGET_PROGRAM_ADDRESS-
MAX_COMPUTE_UNIT_LIMITThe maximum compute unit limit that can be set for a transaction.
PROVISORY_COMPUTE_UNIT_LIMITA provisory compute unit limit is used to indicate that the transaction should be estimated for compute units before being sent to the network.
REQUEST_HEAP_FRAME_DISCRIMINATOR-
REQUEST_UNITS_DISCRIMINATOR-
SET_COMPUTE_UNIT_LIMIT_DISCRIMINATOR-
SET_COMPUTE_UNIT_PRICE_DISCRIMINATOR-
SET_LOADED_ACCOUNTS_DATA_SIZE_LIMIT_DISCRIMINATOR-

Functions

FunctionDescription
estimateAndUpdateProvisoryComputeUnitLimitFactoryGiven a transaction message, if it does not have an explicit compute unit limit, estimates the compute unit limit and updates the transaction message with the estimated limit. Otherwise, returns the transaction message unchanged.
estimateComputeUnitLimitFactoryUse this utility to estimate the actual compute unit cost of a given transaction message.
fillProvisorySetComputeUnitLimitInstructionAppends a SetComputeUnitLimit instruction with a provisory compute unit limit to a given transaction message if and only if it does not already have one.
getRequestHeapFrameDiscriminatorBytes-
getRequestHeapFrameInstruction-
getRequestHeapFrameInstructionDataCodec-
getRequestHeapFrameInstructionDataDecoder-
getRequestHeapFrameInstructionDataEncoder-
getRequestUnitsDiscriminatorBytes-
getRequestUnitsInstruction-
getRequestUnitsInstructionDataCodec-
getRequestUnitsInstructionDataDecoder-
getRequestUnitsInstructionDataEncoder-
getSetComputeUnitLimitDiscriminatorBytes-
getSetComputeUnitLimitInstruction-
getSetComputeUnitLimitInstructionDataCodec-
getSetComputeUnitLimitInstructionDataDecoder-
getSetComputeUnitLimitInstructionDataEncoder-
getSetComputeUnitPriceDiscriminatorBytes-
getSetComputeUnitPriceInstruction-
getSetComputeUnitPriceInstructionDataCodec-
getSetComputeUnitPriceInstructionDataDecoder-
getSetComputeUnitPriceInstructionDataEncoder-
getSetLoadedAccountsDataSizeLimitDiscriminatorBytes-
getSetLoadedAccountsDataSizeLimitInstruction-
getSetLoadedAccountsDataSizeLimitInstructionDataCodec-
getSetLoadedAccountsDataSizeLimitInstructionDataDecoder-
getSetLoadedAccountsDataSizeLimitInstructionDataEncoder-
hasSetComputeLimitInstructionCheck if a given transaction contains a SetComputeUnitLimit instruction
hasSetComputeUnitPriceInstructionCheck if a given transaction contains a SetComputeUnitPrice instruction
identifyComputeBudgetInstruction-
isSetComputeLimitInstructionCheck if a given instruction is a SetComputeUnitLimit instruction
isSetComputeUnitPriceInstructionCheck if a given instruction is a SetComputeUnitPrice instruction
parseRequestHeapFrameInstruction-
parseRequestUnitsInstruction-
parseSetComputeUnitLimitInstruction-
parseSetComputeUnitPriceInstruction-
parseSetLoadedAccountsDataSizeLimitInstruction-
setTransactionMessageComputeUnitPriceSets the compute unit price of a transaction message in micro-Lamports.
updateOrAppendSetComputeUnitLimitInstructionUpdates the first SetComputeUnitLimit instruction in a transaction message with the given units, or appends a new instruction if none exists. A function of the current value can be provided instead of a static value.
updateOrAppendSetComputeUnitPriceInstructionUpdates the first SetComputeUnitPrice instruction in a transaction message with the given micro-Lamports, or appends a new instruction if none exists. A function of the current value can be provided instead of a static value.

On this page