kakamorascratch pad
    Updated 2022-06-20
    with hop_bridges as (
    select
    address,
    address_name
    from ethereum.core.DIM_LABELS
    where LABEL = 'hop protocol'
    and address_name like '%bridge%'
    UNION
    select
    lower('0x3666f603cc164936c1b87e207f36beba4ac5f18a'),
    'hop protocol: usdc bridge'
    ),
    transfers as (
    SELECT
    tx_hash,
    block_timestamp,
    to_date(block_timestamp) as date,
    origin_from_address as wallet,
    symbol as token,
    amount as token_amount,
    amount_usd as token_amount_usd
    FROM flipside_prod_db.ethereum_core.ez_token_transfers
    INNER JOIN hop_bridges ON TO_ADDRESS = address and address_name not ilike '%eth%'
    UNION
    SELECT
    tx_hash,
    block_timestamp,
    to_date(block_timestamp) as date,
    origin_from_address as wallet,
    'ETH' as token,
    amount as token_amount,
    amount_usd as token_amount_usd
    FROM ethereum.core.ez_eth_transfers
    INNER JOIN hop_bridges ON ORIGIN_TO_ADDRESS = address and address_name like '%eth%'
    ),
    Run a query to Download Data