ERC20 Transfers

The ERC20 tokens transfers table contains the details of all transfer events of ERC20 tokens on the Optimism network.

It includes information such as the sender and receiver addresses, the amount of tokens transferred, the transaction hash, and the block timestamp.

Query

Stablecoin transfers on Optimism.

select
    date_trunc('month', block_timestamp) as date,
    token_symbol,
    sum(amount) as volume
from
    optimism.assets.erc20_token_transfers
where
    1 = 1
    and block_timestamp >= '2022-01-01'
    and token_address IN (
        '0x7f5c764cbc14f9669b88837ca1490cca17c31607', --  USDC
        '0x94b008aa00579c1307b0ef2c499ad98a8ce58e58', --  USDT
        '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1' --  DAI
    )
    group by 1,2

Table Columns

Column NameDescriptionExample

from_address

Address where the token is being transferred from.

0x078f65c0e854ab7fa3baa2cff62a4f9cb4031382

to_address

Address where the token is being transferred to.

0x6789097c06c588f91b1a659f3d55110f35f48412

token_address

Token address of the asset transferred.

0xda10009cbd5d07dd0cecc66161fc93d7c9000da1

token_name

Name of the asset transferred.

Dai Stablecoin

token_symbol

Token symbol of the asset transferred.

DAI

raw_amount

Amount of tokens moved (unnormalized).

4,127,259,762,749,190

raw_amount_str

Amount of tokens moved (unnormalized) in string

4127259762749193

amount

Amount of token moved, normalized.

0.004127259763

amount_str

Amount of token moved, normalized in string.

0.004127259763

usd_amount

The amount of tokens moved, in $USD.

0.004123957955

usd_exchange_rate

The exchange rate used to calculate the usd_value.

0.9992

transaction_from_address

The address of the sending party of this transaction.

0x232212e6438724d1342ddc157407541e8a11466a

transaction_to_address

The address of the receiving party of this transaction (could be a contract address).

0x9c12939390052919af3155f41bf4160fd3666a6f

transaction_hash

Transaction hash that this transfer belongs to.

0x19ca54f831e73b1c7952a408fdc09584479c41519c3d93ea9c39b25ed9e14116

log_index

The log index that corresponds to this transfer.

12

block_timestamp

The time when the block that contains this transaction was included on the blockchain.

2023-01-12 19:37:31

block_number

The block number that the corresponding transaction of this transfer belongs to.

65,269,332

block_hash

The block hash that the corresponding transaction of this transfer belongs to.

0x084de45f79066c25ea6fba16525b2b19c68e9432e925a9aba2b84db6c427fa73

unique_id

Unique id generated to each transfer. Includes transaction hash and log index.

txn-0x19ca54f831e73b1c7952a408fdc09584479c41519c3d93ea9c39b25ed9e14116_log_index-12

Last updated