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 Name | Data Type |
---|---|
chain_id | long |
txn_hash | string |
block_number | long |
block_timestamp | long |
token_address | string |
token_name | string |
token_symbol | string |
token_decimals | bigDecimal |
account_address | string |
balance | bigDecimal |
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.