Understanding estimateUserOperationGas
estimateUserOperationGastakes 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.signaturecan 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 the API method call. Parameters for gas estimation.
