RamaharWhales native bridge
    Updated 2022-06-20
    with T1 as (
    SELECT
    'Polygon' as chain,
    block_timestamp,
    tx_id,
    IFF(from_address IN ('0x8484ef722627bf18ca5ae6bcf031c23e6e922b30', '0xa0c68c638235ee32657e8f720a23cec1bfc77c77'), null, from_address) as frmaddr,
    IFF(to_address IN ('0x8484ef722627bf18ca5ae6bcf031c23e6e922b30', '0xa0c68c638235ee32657e8f720a23cec1bfc77c77'), null, to_address) as toaddr,
    symbol,
    amount,
    amount_usd
    FROM ethereum.udm_events
    WHERE
    (
    (to_address_name IS NULL AND from_address IN ('0x8484ef722627bf18ca5ae6bcf031c23e6e922b30', '0xa0c68c638235ee32657e8f720a23cec1bfc77c77')) --withdraw
    OR (to_address IN ('0x8484ef722627bf18ca5ae6bcf031c23e6e922b30', '0xa0c68c638235ee32657e8f720a23cec1bfc77c77') ) --deposit
    )


    UNION ALL

    SELECT
    'Optimism' as chain,
    block_timestamp,
    tx_id,
    IFF(from_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1', null, from_address) as frmaddr,
    IFF(to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1', null, to_address) as toaddr,
    symbol,
    amount,
    amount_usd
    FROM ethereum.udm_events
    WHERE
    (
    ( from_address ='0x99c9fc46f92e8a1c0dec1b1747d010903e884be1') --withdraw
    OR (to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1' ) --deposit
    )

    Run a query to Download Data