function estimateFeesPerGas<TTransport, TChain, TAccount>(
bundlerClient,
): Promise<{
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
}>;Defined in: packages/aa-infra/src/estimateFeesPerGas.ts:50
A custom estimateFeesPerGas function for viem bundler clients to use rundler_getUserOperationGasPrice for fee estimation.
It fetches gas price via rundler_getUserOperationGasPrice and returns the
suggested.maxFeePerGas and suggested.maxPriorityFeePerGas values directly.
import { createBundlerClient } from "viem/account-abstraction";
import { estimateFeesPerGas as alchemyEstimateFeesPerGas } from "@alchemy/aa-infra";
const bundler = createBundlerClient({
transport: http("<rundler-url>"),
userOperation: {
estimateFeesPerGas: alchemyEstimateFeesPerGas,
},
});| Type Parameter | Default type |
|---|---|
| |
|
|
| | |
| Parameter | Type | Description |
|---|---|---|
| { | Bundler client with the rundler RPC method. |
| ‐ | |
|
| ‐ |
| ‐ |
Promise<{
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
}>
Estimated fee values.