Bundler RPC
estimateUserOperationGas
Learn how to use the estimateUserOperationGas JSON-RPC method.
POST
Understanding estimateUserOperationGas
estimateUserOperationGas
takes a partial UserOperation object and returns detailed gas estimates to be used in continued UserOperation construction. It takes:- Partial user operation object:
sender
- string.nonce
- string.initCode
- string.callData
- string.signature
- string.signature
can be a dummy string, such as0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c
.entrypointAddress
- string.
- Partial user operation object:
Query example
JSON
Body
application/json
Request to estimate the gas cost of a user operation.
Version of the JSON-RPC protocol, should be 2.0.
Example:
"2.0"
The request identifier.
Example:
1
The chain ID.
Example:
80001
API method being called.
Available options:
eth_estimateUserOperationGas
Parameters for gas estimation.
Response
200 - application/json
Successful response with gas estimation.
Version of the JSON-RPC protocol, should be 2.0.
Example:
"2.0"
The request identifier.
Example:
1
The chain ID.
Example:
80001
Was this page helpful?