Skip to content

Latest commit

 

History

History
57 lines (49 loc) · 953 Bytes

File metadata and controls

57 lines (49 loc) · 953 Bytes
description generates and returns an estimate of how much gas is necessary to allow the transaction to complete, given a UserOperation.

eth_estimateUserOperationGas

Parameters:

Object -

Returns:

Object

Example:

{% code overflow="wrap" %}

// Request
curl https://optimism.blockpi.network/v1/rpc/your-rpc-key -X POST -H "Content-Type: application/json" 
--data 
'{
  "jsonrpc": "2.0",
  "id": 0,
  "method": "eth_estimateUserOperationGas",
  "params": [
    {
      sender,
      nonce,
      initCode,
      callData,
      callGasLimit,
      verificationGasLimit,
      preVerificationGas,
      maxFeePerGas,
      maxPriorityFeePerGas,
      paymasterAndData,
      signature,
    },
    entrypointAddress,
  ]
}'

// Result
{
    "jsonrpc": "2.0",
    "id": 0,
    "result": {
        callGasLimit
        preVerificationGas,
        verificationGas,
    },
}

{% endcode %}