alchemy_requestGasAndPaymasterAndData
Requests gas coverage for a UserOperation
. Optionally accepts fee parameter overrides to be used in the UserOperation
.
Path parameters
Request
The EntryPoint address the request should be sent through. This MUST be one of the EntryPoints returned by the supportedEntryPoints
RPC call and match the version of the userOperation in the userOperation
field.
Dummy signature for the userOperation. This is useful for estimating gas costs. Check our FAQs to learn what a dummy signature is.
An object containing optional gas parameters, paymasterAndData
, and signature fields. It can be either a v0.6 or v0.7 userOperation but must match the version of the EntryPoint at the specified entryPoint
.
Erc20 context, required to enable users to pay gas with ERC-20 tokens.
Optional fields that override our gas and fee estimates. Use this parameter to override: maxFeePerGas
, maxPriorityFeePerGas
, callGasLimit
, verificationGasLimit
, or preVerificationGas
.
This will apply either:
- absolutes overrides (using a hex string) simply overriding estimated values entirely OR
- multiplier overrides relative to our estimates (in the format of { “multiplier”: number } with max precision of 4 decimal places). 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 estimatedmaxPriorityFeePerGas
of the userOp.
A higher buffer may give userOps a better chance to mine if the L1/L2 gas and fees change.
Allows changes to the state of a contract before executing the call. For example, you can modify variable values (like balances or approvals) for that call without changing the contract itself on the blockchain.
In more technical terms, the state override set is an optional parameter that allows executing the call against a modified chain state. It is an address-to-state mapping, where each entry specifies some state to be overridden prior to executing the call.
Response
The response object may be one of two types: