Skip to content

@armada/sdk / index / fetchLogsRanged

Function: fetchLogsRanged()

fetchLogsRanged<T>(getLogs, options): Promise<T[]>

Defined in: src/sync/ranged-fetch.ts:25

Fetch logs across [fromBlock, toBlock] in windows of maxRange, bisecting any window whose getLogs call throws (a provider range-limit) down to minRange. A throw at/below minRange is re-thrown as a genuine error (not a range-size issue). Results are returned in block order.

Type Parameters

T

T

Parameters

getLogs

GetLogsFn<T>

options

RangedFetchOptions

Returns

Promise<T[]>