Learn how to use the estimateUserOperationGas JSON-RPC method.
estimateUserOperationGasestimateUserOperationGas 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.
Version of the JSON-RPC protocol, should be 2.0.
"2.0"
The request identifier.
1
The chain ID.
80001
API method being called.
eth_estimateUserOperationGas Parameters for the API method call. Parameters for gas estimation.