Changes in allowances 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, owner, spender) tuple. If there are 2+ changes for the same tuple 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
ownerstring
spenderstring
allowancebigDecimal

Source

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

Usage notes

It tracks 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

getERC20Allowance

getERC20Allowances