Introducing user operation overrides
Author: Alchemy Team

Account Abstraction lets users use smart contract accounts as wallets instead of traditional Externally Owned Accounts (EOAs). When initiating transactions from a smart contract account, User Operations (UserOps or UOs) contain the transaction details similar to regular transactions: sender, to, calldata, maxFeePerGas, maxPriorityFee, signature, and nonce.
Because smart contract accounts rely on Bundlers to execute transactions on their behalf, user operations also contain a new set of fields for estimating gas and sponsoring gas with paymasters including: callGasLimit, verificationGasLimit, preVerificationGas, and paymasterAndData.
Today, we’re launching User Operation Overrides to give developers fine grain control over gas fees. Gas fee markets move fast on L2s, and when that happens pending UOs might fail.
UO Overrides enable you to override gas estimates to get stronger guarantees that UserOps are mined, regardless of gas estimates that are misaligned with actual gas costs.
What user operation overrides do:
By overriding a gas fee estimate, which incorporates a lot of complex inputs and therefore can be hard to estimate accurately, you can get stronger guarantees that your UserOp will successfully be mined regardless of gas fluctuations by setting absolute or multiplier-based override values.
What are the benefits of user operation overrides?
The two main developer benefits of UO Overrides are streamlining the complexity of estimating gas and paymaster values, and increasing the likelihood of UOs getting mined during periods of fee market volatility.
1. Streamline complexity
Today, estimating the right gas fee means incorporating six different gas types, making it hard to get a gas estimate “right”. With Fee Overrides, devs set the parameter to override gas estimates at a certain threshold, so UserOps are mined, regardless of how accurate your estimate was.
2. Own your outcomes
One pain point of using the aa-sdk to date has been that when the network got busy, teams would ask Alchemy engineers to take care of gas estimation and UserOp success for them.
With User Operation Overrides, teams can now choose what UserOps are most important, and set custom override values with greater control to increase the likelihood that their UOs are mined successfully.
What are the features of user operation overrides?
User Operation Overrides allow the specification of override values for:
maxFeePerGasmaxPriorityFeePerGascallGasLimitpreVerificationGasverificationGasLimitpaymasterAndData
Developers building with Alchemy's AA SDK can use User Operation Overrides with any Bundler or Paymaster!
How do user operation overrides work?
Override values are available from each middleware of the SmartAccountProvider. For example, the default middlewares such as gasEstimator or feeDataGetter apply the overrides values to the estimated values if the override values are provided.
Other than the paymasterAndData field, the override fields could be either the absolute value or the multiplier value. In the default middlewares, if the override value is an absolute value, it simply overrides the estimated value.
If the override value is a multiplier value, the estimated value is bumped with the indicated multiplier value. For example, if the override value is \{ multiplier: 1.1 \} for the maxPriorityFeePerGas field, then a 1.1 multiplier, or a 10% increase, is applied to the estimated maxPriorityFeePerGas of the user operation.
To get started, explore the User Operation Override docs!
Alchemy Newsletter
Be the first to know about releases
訂閱我們的電子報
取得 Alchemy 最新產品更新與資源
輸入您的電子郵件地址,即表示您同意接收我們的行銷通訊與產品更新。您了解 Alchemy 會依照我們的隱私權聲明處理所收到的資訊。您可以隨時取消訂閱。
Related articles

What Solana builders ship on Alchemy
See how Solflare, Phantom, Collector Crypt, and other Solana teams build wallets, trading platforms, and real-world assets on Alchemy's Solana RPC and gRPC infrastructure.

Turn Claude Code into an onchain research agent
Turn Claude Code into an onchain research agent with the Alchemy CLI. Trace token launches, deployer wallets, and admin keys by asking the right questions.

Introducing Admin APIs
Apps Management and Usage are generally available. Create apps, manage allowlists, and pull dashboard usage from one endpoint with one Access Key.