waitForTransactionReceipt
waitForTransactionReceipt<
chain>(client,parameters):Promise<WaitForTransactionReceiptReturnType<chain>>
Defined in: packages/synapse-core/src/utils/wait-for-transaction-receipt.ts:96
viem’s waitForTransactionReceipt, tolerant of Filecoin null rounds.
While the receipt is missing, viem fetches every block it polls, missed heights included, to look for a replacement, and treats any error other than a missing block as fatal. Lotus answers a null round with an error, which would abort the wait. A null round holds no transactions, so the block lookups of this wait see it as an empty block and the scan carries on to the next height.
Takes the same parameters as viem’s action.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
chain extends Chain | undefined |
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client |
Client<Transport, chain> |
The client to read the chain with. |
parameters |
WaitForTransactionReceiptParameters<chain> |
viem’s WaitForTransactionReceiptParameters. |
Returns
Section titled “Returns”Promise<WaitForTransactionReceiptReturnType<chain>>
The transaction receipt.
Example
Section titled “Example”import { waitForTransactionReceipt } from '@filoz/synapse-core/utils'
const receipt = await waitForTransactionReceipt(client, { hash })Throws
Section titled “Throws”Errors viem’s waitForTransactionReceipt throws, except null round errors.