Skip to main content

EVM Chain Nuances

Gas prices

Smart Wallet developers face challenges with varying EVM gas estimates. AbstractionKit provides flexibility through overrides.

Using the createUserOperation function, developers can pass their own values for maxPriorityFeePerGas and maxFeePerGas.

Gas Overrides example
const userOperation = await smartAccount.createUserOperation(
[transaction],
jsonRpcNodeProvider,
bundlerUrl,
{
maxPriorityFeePerGas: 56139916666n,
maxFeePerGas: 134386409498n,
}
)

Polygon

Dealing with Polygon's occasional gas fee spikes poses challenges. AbstractionKit provides out of the box support for Polygon's Gas Station API for reliable real-time gas prices. Opt for the 'Fast' fee prediction to add a multiplier during congestion to optimize transaction costs

Using the createUserOperation function, developers can pass select the polygon network and the gas multiplier.

Gas Overrides example
import { PolygonChain, GasOption } from "abstractionkit";

const userOperation = await smartAccount.createUserOperation(
[transaction],
jsonRpcNodeProvider,
bundlerUrl,
{
gasLevel: GasOption.Fast, // Slow, Medium, Fast
polygonGasStation: PolygonChain.Mainnet, // fetched from Polygon Gas Station
}
)