mz0111ETH bridge from Ethereum to Optimism
    Updated 2022-09-14
    SELECT
    'OPT bridge' as "name",
    count(*) as "op bridge",
    sum(AMOUNT) as "ETH amount",
    sum(AMOUNT_USD) as "USDC amount"
    FROM ethereum.core.ez_eth_transfers
    WHERE ETH_TO_ADDRESS = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'

    union all

    (with tab1 AS
    (select
    TX_HASH
    from ethereum.core.fact_event_logs
    where ORIGIN_TO_ADDRESS = '0xb8901acb165ed027e32754e0ffe830802919727f' --HOP ETH bridge L2
    and CONTRACT_ADDRESS = '0xb8901acb165ed027e32754e0ffe830802919727f'
    and ORIGIN_FUNCTION_SIGNATURE = '0xdeace8f5'
    and EVENT_INPUTS :: object : chainId = '10'--FILTER OPTI
    )

    SELECT
    'HOP bridge' as "name",
    count (*) as "op bridge",
    sum(AMOUNT) as "ETH amount",
    sum(AMOUNT_USD) as "USD amount"
    from ethereum.core.ez_eth_transfers b
    inner join tab1 a on a.TX_HASH = b.TX_HASH
    )

    Run a query to Download Data