Skip to content

getUserOperationReceipt

Return a User Operation receipt based on a User Operation hash.

Usage

example.ts
import { bundlerClient } from "./client"
 
const receipt = await bundlerClient.getUserOperationReceipt({
    hash: "0x3c037f957fde5d87e35d5b8582f6c274343bcf3bc0e010d72fc2de0e27f4a6aa"
})
/**
 * {
 *  "userOpHash": "0x3c037f957fde5d87e35d5b8582f6c274343bcf3bc0e010d72fc2de0e27f4a6aa",
 *  "sender": "0x277F6C1D8d4faFA3d8DcC837489cd69d86c682BA",
 *  "nonce": 3n,
 *  "actualGasUsed": 437678n,
 *  "actualGasCost": 1584749056877268n,
 *  "success": true,
 *  "logs": [
 *    ...
 *  ],
 *  "receipt": {
 *    ...
 *  },
 *  "logsBloom": "0x00000400000200000000000100000000400000000000000000000000020000000008000022000000000200110000000004108000000000000000020000000000000001000000000002000000000002800000000000000000000100000001000000000008180000000000000000000000000000000200804080800000000000000000000000000000000000000020001000001200000480000000000000000000200000000000000008400000000400000000800400000408000002000000004000000020000000000001001000040000000000000000800000108000000000000000000000020080000000000800000000000000002000004000000820120000",
 *  "status": "0x1",
 *  "effectiveGasPrice": 24163152145n
 *  }
 * }
 */

Returns

  • Type: UserOperationReceipt

The receipt of the User Operation.

Parameters

hash

  • Type: Hash

The User Operation hash.

JSON-RPC Method

eth_estimateUserOperationGas