estimateUserOpGas

Estimate the gas cost of a user operation.

Example

import { estimateUserOpGas } from "thirdweb/wallets/smart";
const gasCost = await estimateUserOpGas({
userOp,
options,
});
function estimateUserOpGas(args: {
options: BundlerOptions;
userOp: UserOperation;
}): Promise<EstimationResult>;

Parameters

The options for estimating the gas cost of a user operation.

Type

let args: { options: BundlerOptions; userOp: UserOperation };

Returns

let returnType: Promise<EstimationResult>;

The estimated gas cost of the user operation.