eth_estimateUserOperationGas

Estimate UserOperation Gas

Estimates the gas values for a UserOperation

Parameters

Body

Param
Type
Description
Required

method

string

Name of method in this case: eth_estimateUserOperationGas

Required

params

array

An array consisting of the UserOperation object, Entrypoint contract address

Required

id

string

id for request determined by client for JSON RPC requests

Required

jsonrpc

string

JSON RPC version in this case 2.0.0

Required

Request

Request Type: POST

{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_estimateUserOperationGas",
    "params": [
        {
            "sender": "0xAC2d0022eC931a7048e8752e9E73ec78212992e8",
            "nonce": "0x35bf2a054f92f3730b87582ef223c8d663f9eb01158154750000000000000000",
            "initCode": "0x",
            "callData": "0xb61d27f6000000000000000000000000530fff22987e137e7c8d2adcc4c15eb45b4fa752000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000184165398be00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000002fcf1000000000000000000000000000000000000000000000000000000e8d4ac25fd000000000000000000000000000000000000000000000000000001d1a94f86e3000000000000000000000000000000000000000000000000000000e8d4ac13d6000000000000000000000000000000000000000000000000000001d1a94edaef000000000000000000000000000000000000000000000000000000e8d4ac25fa00000000000000000000000000000000000000000000000000000000",
            "signature": "0xa6cc6589c8bd561cfd68d7b6b0757ef6f208e7438782939938498eee7d703260137856c840c491b3d415956265e81bf5c2184a725be2abfc365f7536b6af525e1c"
        },
        "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
    ]
}

Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "preVerificationGas": "0xb518",
        "verificationGasLimit": "0x1c422",
        "callGasLimit": "0xb63d",
        "verificationGas": "0x1c422",
        "maxFeePerGas": "0x59682f1e",
        "maxPriorityFeePerGas": "0x59682f00",
        "validUntil": "0xffffffffffff"
    }
}

Last updated