eth_sendUserOperation

Send UserOperation

This endpoint submits a User Operation object to the Bundler's User Operation pool. Upon successful submission, the result will return a userOpHash, but only if the request passes simulation and is accepted into the Bundler's User Operation pool. If the submission fails due to validation errors, simulation issues, or User Operation pool inclusion problems, the endpoint will return the corresponding failure reason.

For detailed information on the request and response objects, please refer ERC4337 spec

Parameters

Body

Param
Type
Description
Required

method

string

Name of method in this case: eth_sendUserOperation

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

{
  "method": "eth_sendUserOperation",
  "params": [
    {
      "sender": "0x1EcC38166BCB30eBF86d548d83dcE0C14c1a33db",
      "nonce": "0xc",
      "initCode": "0x",
      "callData": "0x47e1da2a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000cd7c976c47f0de6a19de540e473e85894bf9c9b40000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000009184e72a000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000",
      "callGasLimit": "0xb957",
      "verificationGasLimit": "0x9b32",
      "maxFeePerGas": "0x9502f9000",
      "maxPriorityFeePerGas": "0x9502f9000",
      "paymasterAndData": "0x",
      "preVerificationGas": "0xae58",
      "signature": "0x8b331b7b0b2afc9f8f3a5440b675fe3b067559ce6a64fda46e9720313f18ffe63d1f76018a4c2f762cd35a19088d0bf7cf60209bd01415111b1807782933acc31c"
    },
    "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
  ],
  "id": 46,
  "jsonrpc": "2.0"
}

Success Response

{
    "jsonrpc": "2.0",
    "id": 46,
    "result": "0x205bdbbad1e253fdb0e55f7e3e54ef12c80f485b02207b09448f75a851c6575b"
}

Failure Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "message": "AA21 didn't pay prefund",
    "code": -32500
  }
}

Last updated