Token standards

Interfaces

When we’re interested in a subset of events fired regardless of the origin contract, Dune uses interface-decoding. Notable examples include erc20, erc721 and erc1155 transfer events. This method is reserved for special cases. These tables make it easy to keep track of ERC20 tokens and NFT's flowing in and out of contracts and wallets and are widely used across dune.
erc20."ERC20_evt_Transfer"
column name
data type
description
from
bytea
the transactions sender
to
bytea
the transaction receiver
value
numeric
the amount of erc20 tokens sent. Notice that you have divide this by the relevant decimals of the erc20 token.
contract_address
bytea
the contract_address of the erc20 token
evt_tx_hash
bytea
the transaction hash
evt_index
numeric
the transaction index
evt_block_time
timestamptz
the time at which the transaction occurred
evt_block_number
int8
the length of the blockchain
erc721."ERC721_evt_Transfer"
column name
data type
description
from
bytea
the transactions sender
to
bytea
the transaction receiver
tokenID
numeric
The Token ID which uniquely identifies this NFT
contract_address
bytea
the contract_address of the erc20 token
evt_tx_hash
bytea
the transaction hash
evt_index
numeric
the transaction index
evt_block_time
timestamptz
the time at which the transaction occurred
evt_block_number
int8
the length of the blockchain
You can query for special tables using this query:
Contracts that are “interface”-decoded
1
SELECT * FROM ethereum."contracts" WHERE address IS NULL;
Copied!
Last modified 2mo ago
Copy link