Skip to content

cc_estimateUserOperation

Estimate the gas fees, gas limits and requried credit of a user operation.

request example

{
  "method": "cc_estimateUserOperation",
  "params": [
    {
      "sender": "0x2ae4ca6c56feb873e7d60f3dee3388c9eab09837",
      "to": "0x4bc54260ec3617b3f73fdb1fa22417ed109f372c",
      "value": "0",
      "callData": "0x0fe1597f0000000000000000000000000d3f6ec061a5565512c2bb04897d7190c88e822c000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000002ae4ca6c56feb873e7d60f3dee3388c9eab09837000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000",
      "nonce": null,
      "ep": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
    },
    {
      "owner": "0x777a85ca007c49a85ea1a69dd381a6c3009a7777"
    }
  ],
  "id": 0,
  "jsonrpc": "2.0"
}

response example

{
  "id": 0,
  "jsonrpc": "2.0",
  "result": {
    "totalGasLimit": "0x5049f473c292",
    "totalGasFee": "0x5049f473c292",
    "maxFeePerGas": "0x7e8cfb6",
    "maxPriorityFeePerGas": "0x6422c40",
    "requiredCredit": "0x267d7"
  }
}