The problem
Users expect full history and balances at any date, not just the current balance.
How archive RPC helps
- eth_getBalance and ERC-20 balanceOf at past blocks for balance charts.
- eth_getLogs on Transfer events for a complete token history of an address.
- eth_getTransactionReceipt to show status and fees.
Methods you will call
- eth_getBalanceReturns the native token balance of an address at a given block.
- eth_getLogsReturns all logs (events) that match a filter over a block range.
- eth_getTransactionReceiptReturns the receipt of a mined transaction: status, gas used and emitted logs.
- eth_callExecutes a read-only contract call against the state of a given block, without sending a transaction.
Example
Incoming USDT transfers to an address
const logs = await client.getLogs({
address: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
event: parseAbiItem("event Transfer(address indexed from, address indexed to, uint256 value)"),
args: { to: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" },
fromBlock: 18_900_000n,
toBlock: 18_908_895n,
});Which plan
Builder to start; Growth when histories are built for many users. See pricing or how it compares.