Skip to main content
Turn token logs into a durable payment feed. A WebSocket subscription provides low-latency wakeups, while eth_getLogs over an overlap window supplies the source of truth after disconnects or reorgs.

Demo

The demo above is mock only. If you want to see onchain demos on Vibenet, head to Base chain demos.

Subscribe and Backfill

TypeScript worker
Implement replaceRange as one database transaction: delete previously indexed rows in the overlap, insert the canonical logs returned now, and advance the cursor only after both operations succeed.
After a reconnect or short reorg, the overlap scan converges on the canonical confirmed logs without fulfilling the same log twice.
Do not fulfill directly from an unconfirmed subscription callback. Wait for your chosen confirmation depth, and identify each event by (blockHash, transactionHash, logIndex) rather than transaction hash alone.
Choose a confirmation policy that matches your risk tolerance. See transaction finality for Base’s confirmation stages.

See Also

Verify a Payment

Validate each candidate transfer against its order.

Reconcile Payments

Produce settlement rows over a block range.