saeedmzn$MATIC Staking -
    Updated 2022-09-20
    with maintable as (
    select 'ETHEREUM' as chain,
    origin_from_address,
    origin_to_address,
    tx_hash
    from ethereum.core.fact_event_logs
    where tx_status = 'SUCCESS'--and origin_to_address = '0x5089729df58c7f992f3fa6a6f8a51304a814e958'
    and event_name ilike '%commit%'
    and origin_function_signature in ('0x29762960','0xdc97e082')

    union ALL

    select 'POLYGON' as chain,
    origin_from_address,
    origin_to_address,
    tx_hash
    from polygon.core.fact_event_logs
    where tx_status = 'SUCCESS'--and origin_to_address = '0x5089729df58c7f992f3fa6a6f8a51304a814e958'
    and event_name ilike '%commit%'
    and origin_function_signature in ('0x29762960','0xdc97e082')

    union ALL

    select 'BINANCE SMART CHAIN' as chain,
    origin_from_address,
    origin_to_address,
    tx_hash
    from bsc.core.fact_event_logs
    where tx_status = 'SUCCESS'--and origin_to_address = '0x5089729df58c7f992f3fa6a6f8a51304a814e958'
    and event_name ilike '%commit%'
    and origin_function_signature in ('0x29762960','0xdc97e082')

    UNION ALL
    select 'ARBITRUM' as chain,
    origin_from_address,
    Run a query to Download Data