ensureBudget
@algorandfoundation/algorand-typescript
@algorandfoundation/algorand-typescript / index / ensureBudget
Function: ensureBudget()
Section titled “Function: ensureBudget()”ensureBudget(
requiredBudget,feeSource):void
Defined in: packages/algo-ts/src/util.ts:130
Ensure the available op code budget is greater than or equal to requiredBudget.
This is done by adding AppCall itxns to the group to increase the available budget. These itxns must be paid for by the caller or the application.
Parameters
Section titled “Parameters”requiredBudget
Section titled “requiredBudget”The total required budget
feeSource
Section titled “feeSource”OpUpFeeSource = OpUpFeeSource.GroupCredit
Which source to withdraw txn fees from.
Returns
Section titled “Returns”void