rezarwzAmount of USDB on blast
    Updated 2024-03-22
    with all_tx as (
    SELECT
    TX_hash,
    block_timestamp,
    'Deposit' as action,
    amount as USDB_amount
    FROM
    blast.core.ez_token_transfers
    Where
    from_address = '0x0000000000000000000000000000000000000000'
    and ORIGIN_FUNCTION_SIGNATURE = '0xd764ad0b'
    and CONTRACT_ADDRESS = '0x4300000000000000000000000000000000000003'
    UNION
    all
    SELECT
    TX_hash,
    block_timestamp,
    'Withdraw' as action,
    amount as USDB_amount
    FROM
    blast.core.ez_token_transfers
    Where
    to_address = '0x0000000000000000000000000000000000000000'
    and origin_to_address in (
    '0x4300000000000000000000000000000000000005',
    '0x4200000000000000000000000000000000000010'
    )
    and CONTRACT_ADDRESS = '0x4300000000000000000000000000000000000003'
    ),
    TimeFrame_data as (
    SELECT
    date_trunc('{{TimeFrame}}', block_timestamp) AS date,
    SUM(
    COALESCE(
    CASE
    WHEN action = 'Deposit' THEN USDB_amount
    QueryRunArchived: QueryRun has been archived