zone.waitForDepositStatus
Waits until a zone has processed the deposits from a Tempo block.
Usage
import { client } from './zones.config'
const status = await client.zone.waitForDepositStatus({
tempoBlockNumber: 123456n,
})
console.log('Deposits:', status.deposits)import { privateKeyToAccount } from 'viem/accounts'
import { createClient } from 'viem/tempo'
import { http, zoneModerato } from 'viem/tempo/zones'
export const client = createClient({
account: privateKeyToAccount('0x...'),
chain: zoneModerato(7),
transport: http(),
})The action polls zone.getDepositStatus and resolves when processed is true.
Return Type
type ReturnType = {
deposits: Deposit[]
processed: boolean
tempoBlockNumber: bigint
zoneProcessedThrough: bigint
}Parameters
tempoBlockNumber
- Type:
bigint
Tempo block number containing the deposits.
pollingInterval (optional)
- Type:
number - Default:
client.pollingInterval
Polling frequency in milliseconds.
timeout (optional)
- Type:
number - Default:
60_000
Maximum time to wait in milliseconds. Set to 0 to disable the timeout.