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.
The body is of type object
.
Response
200 - application/json
Successful response with gas estimation.
The response is of type object
.