Block-range windowed eth_getLogs paging -- newest window first, walking
back toward genesis without overlaps or gaps.
-- start: latest window
( pager, range ) =
PaginatedLogs.init { latest = 21688204, window = 5000 }
-- fire getLogs for range.fromBlock..range.toBlock, then:
pager2 = PaginatedLogs.onLoaded (List.length logs) pager
-- "Load older" click:
case PaginatedLogs.next pager2 of
Just ( pager3, olderRange ) -> fire the next query
Nothing -> at genesis; nothing older existsRanges tile exactly: [latest-window+1 .. latest], then
[latest-2w+1 .. latest-w], ... clamped at 0.
CSS classes: web3-pagedlogs__more.
An inclusive block range for one getLogs query.
The newest window. window is clamped to >= 1.
Total logs recorded via onLoaded.
A load-more button that disappears at genesis.
At genesis the whole button is gone, so there is no element left to carry
attrs -- the same convention as
Web3.Ui.PendingOverlay.conditionalView.
Style the surrounding slot, not this node, if you need a stable box.
What the load-more button says and what it fires.
Opaque paging state.