Changes in balances in ERC20 contracts

Chains supported: Ethereum, Base, Arbitrum (post Nitro)

🟦

Block-level table

For efficiency, we only emit one record per block for each (token_address, account_address) pair. If there are 2+ changes for the same pair in a given block, we emit the last one. This more efficiently serves queries where you want to know state after a given block, but precludes queries that need intra-block (i.e., transaction-level) state.

Schema

Column NameData Type
chain_idlong
txn_hashstring
block_numberlong
block_timestamplong
token_addressstring
token_namestring
token_symbolstring
token_decimalsbigDecimal
account_addressstring
balancebigDecimal

Source

This table was built in sim's ERC20 Balance Changes - Block canvas.

Usage notes

It tracks balance values in the uint256 format of contract storage. For the presentation users expect, divide values here by 10 to the power of d, where d is the decimals() of the given contract. See sample queries below.

Sample queries

getERC20Balances