Learn how to use the estimateUserOperationGas JSON-RPC method.
estimateUserOperationGas
estimateUserOperationGas
takes a partial UserOperation object and returns detailed gas estimates to be used in continued UserOperation construction. It takes:
sender
- string.nonce
- string.initCode
- string.callData
- string.signature
- string.signature
can be a dummy string, such as 0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c
.entrypointAddress
- string.Request to estimate the gas cost of a user operation.
The body is of type object
.
Successful response with gas estimation.
The response is of type object
.