waitForUserOperationReceipt
Waits for the User Operation to be included on a block (one confirmation), and then returns the User Operation Receipt.
Usage
example.ts
import { bundlerClient } from "./client"
const receipt = await bundlerClient.waitForUserOperationReceipt({
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.
pollingInterval (optional)
- Type:
number
Polling frequency (in ms). Defaults to the client's pollingInterval
config
timeout (optional)
- Type:
number
Optional timeout (in milliseconds) to wait before polling is stopped.