estimateConsumeLimit()
estimateConsumeLimit()
function estimateConsumeLimit(
connection,
tx,
options?): Promise<{
data: RpcResponseAndContext<SimulatedTransactionResponse>;
unitsConsumed: number;
}>;Defined in: estimate.ts:12
Estimate the consume limit of a transaction based on the simulation results of the transaction.
Parameters
| Parameter | Type | Description |
|---|---|---|
connection | Connection | The connection to the RPC |
tx | VersionedTransaction | The transaction to estimate the consume limit for |
options | GetConsumeLimitEstimateOptions | The options for the estimate |
Returns
Promise<{
data: RpcResponseAndContext<SimulatedTransactionResponse>;
unitsConsumed: number;
}>
The consume limit estimate multiplied by a multiplier percent or undefined and the native simulation results