misaghlbMiso User Base
    Updated 2022-09-18
    with all_chains as (
    select BLOCK_TIMESTAMP, event_inputs:addr::string as wallet, CONTRACT_ADDRESS as contract, 'Polygon' as chain
    from polygon.core.fact_event_logs
    where origin_function_signature in ('0x29762960', '0xdc97e082')
    and EVENT_NAME = 'AddedCommitment'
    and TX_STATUS = 'SUCCESS'

    UNION

    select BLOCK_TIMESTAMP, event_inputs:addr::string as wallet, CONTRACT_ADDRESS as contract, 'Arbitrum' as chain
    from arbitrum.core.fact_event_logs
    where origin_function_signature in ('0x29762960', '0xdc97e082')
    and EVENT_NAME = 'AddedCommitment'
    and TX_STATUS = 'SUCCESS'

    UNION

    select BLOCK_TIMESTAMP, event_inputs:addr::string as wallet, CONTRACT_ADDRESS as contract, 'Avalanche' as chain
    from avalanche.core.fact_event_logs
    where origin_function_signature in ('0x29762960', '0xdc97e082')
    and EVENT_NAME = 'AddedCommitment'
    and TX_STATUS = 'SUCCESS'


    UNION

    select BLOCK_TIMESTAMP, event_inputs:addr::string as wallet, CONTRACT_ADDRESS as contract, 'BSC' as chain
    from bsc.core.fact_event_logs
    where origin_function_signature in ('0x29762960', '0xdc97e082')
    and EVENT_NAME = 'AddedCommitment'
    and TX_STATUS = 'SUCCESS'

    UNION

    select BLOCK_TIMESTAMP, event_inputs:addr::string as wallet, CONTRACT_ADDRESS as contract, 'Ethereum' as chain
    from ethereum.core.fact_event_logs
    Run a query to Download Data