The problem
Eligibility is decided by balances and activity at one snapshot block, for thousands of addresses.
How archive RPC helps
- balanceOf for every holder at the snapshot block, batched.
- eth_getLogs to rebuild the holder list from Transfer events.
- erigon_getBlockByTimestamp to find the snapshot block from a date.
Methods you will call
- eth_callExecutes a read-only contract call against the state of a given block, without sending a transaction.
- eth_getLogsReturns all logs (events) that match a filter over a block range.
- erigon_getBlockByTimestampReturns the block closest to a Unix timestamp. The fastest way to turn a date into a block number.
- eth_getBalanceReturns the native token balance of an address at a given block.
Example
Balances of many holders at one block (Multicall3)
const results = await client.multicall({
contracts: holders.map((holder) => ({ address: TOKEN, abi: erc20Abi, functionName: "balanceOf", args: [holder] })),
blockNumber: SNAPSHOT_BLOCK,
});Which plan
Builder for one snapshot; Growth for recurring programs. See pricing or how it compares.