← notes

Two block explorers, one address graph, and a result cap that truncates silently

Jun 2, 2024

Get every address that sent a transaction to a target address, across Ethereum and Base, as a CSV. Useful for allowlists and for seeing who actually interacted with something.

Etherscan and Basescan are the same API family, which makes this look like one script with a chain parameter. The part that is not is paging. Explorer APIs cap results, typically around ten thousand, and they truncate rather than error. A naive query against a busy address returns a full-looking result set that is silently incomplete. The fix is block-range windowing: split the range, query each window, narrow further whenever one comes back at the cap. That is the difference between a correct answer and a plausible one.

“Transactions to an address” is also three endpoints, normal, internal, and token transfers, and which of them count depends entirely on what you are trying to learn.

The output is a claim about interaction and nothing more. The same address on two chains may be two people, one person, or a contract, and a CSV of addresses invites conclusions it cannot support. Worth saying, given the obvious use is deciding who gets something.