EVM Smart Accounts

Get user operation

Changed on

Gets a user operation by its hash.

get/v2/evm/smart-accounts/{address}/user-operations/{userOpHash}

Request

  • Base URL
    https://api.cdp.coinbase.com/platform
  • Auth
    HTTP bearer

Path parameters

address, string required

The address of the Smart Account the user operation belongs to.

userOpHash, string required

The hash of the user operation to fetch.

Response

Successfully retrieved the user operation.

EvmUserOperation required

A smart account operation response.

network, 'base-sepolia' | 'base' | 'arbitrum' | 'optimism' | 'zora' | 'polygon' | 'bnb' | 'avalanche' | 'ethereum' | 'ethereum-sepolia' required

The network the user operation is for.

userOpHash, string required

The hash of the user operation. This is not the transaction hash, as a transaction consists of multiple user operations. The user operation hash is the hash of this particular user operation which gets signed by the owner of the Smart Account.

calls, EvmCall[] required

The list of calls in the user operation.

status, 'pending' | 'signed' | 'broadcast' | 'complete' | 'dropped' | 'failed' required

The status of the user operation.

transactionHash, string

The hash of the transaction that included this particular user operation. This gets set after the user operation is broadcasted and the transaction is included in a block.

receipts, UserOperationReceipt[]

The list of receipts associated with the user operation.

expiresAt, string date-time

The timestamp at which the prepared user operation expires.

Example response

{
  "network": "base",
  "userOpHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
  "calls": [
    {
      "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "value": "0",
      "data": "0xa9059cbb000000000000000000000000fc807d1be4997e5c7b33e4d8d57e60c5b0f02b1a0000000000000000000000000000000000000000000000000000000000000064"
    },
    {
      "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "value": "1000000000000000",
      "data": "0x"
    }
  ],
  "status": "pending",
  "transactionHash": "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
  "receipts": [
    {
      "revert": {
        "data": "0x123",
        "message": "reason for failure"
      },
      "blockHash": "0x386544b58930c0ec9e8f3ed09fb4cdb76b9ae0a1a37ddcacebe3925b57978e65",
      "blockNumber": 29338819,
      "gasUsed": "100000"
    }
  ],
  "expiresAt": "2025-03-25T12:00:00Z"
}

Changes

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    2 more changes in this revision