Estimates the gas values for a UserOperation
.
Supported EntryPoints
eth_sendUserOperation
supports versions v0.6 and v0.7 of ERC-4337. Check our FAQs to determine which version you should use.
Dummy Signature
This endpoint requires a dummy signature in the
userOp
. Check our FAQs to learn what a dummy signature is and which dummy signature you should use.
Parameters
-
UserOperation
(Object
): Contains gas limits and prices (optional). This can be either a v0.6 or v0.7 user operation but must match the version of the EntryPoint at the address of the second parameter. -
entryPoint
(String
): The address to which the request should be sent. This must be one of the EntryPoint returned by thesupportedEntryPoints
method and should match the version of the userOp in the first parameter. -
stateOverrideSet
(Object
): 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. Each address maps to an object containing:
FIELD TYPE BYTES DESCRIPTION balance
Quantity
(Hex string
)≤32 Fake balance to set for the account before executing the call. nonce
Quantity
(Hex string
)≤8 Fake nonce to set for the account before executing the call. code
Binary
(Hex string
)any Fake EVM bytecode to inject into the account before executing the call. state
Object
any Fake key-value mapping to override all slots in the account storage before executing the call. stateDiff
Object
any Fake key-value mapping to override individual slots in the account storage before executing the call.