SandeshContracts deployed per network Optimism
    Updated 2024-04-15
    -- forked from Contracts deployed per network optimism @ https://flipsidecrypto.xyz/edit/queries/deecc66a-4f8d-4e18-b65e-306f8ce16ab7


    with hlg_contracts_optimism as
    (
    select
    CONTRACT_ADDRESS as address
    from optimism.core.fact_event_logs
    where 1=1
    and origin_to_address in
    ('0x4f92ae4960a6ac49fa88bcf9d6d4b8c53f626a55',
    '0xf3ddf3dc6ebb5c5dc878c7a0c8b2c5e051c37594')
    and CONTRACT_ADDRESS not in
    ('0x4f92ae4960a6ac49fa88bcf9d6d4b8c53f626a55',
    '0xf3ddf3dc6ebb5c5dc878c7a0c8b2c5e051c37594')
    group by contract_address

    ),
    NFTs_table as (

    select
    contract_address as contract,
    topics[3] as tokenId
    from optimism.core.fact_event_logs
    where 1=1
    and contract_address in (select distinct address from hlg_contracts_optimism)
    and topics[0]='0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
    AND topics[1] = '0x0000000000000000000000000000000000000000000000000000000000000000'
    and topics[3] is not null
    and tx_hash not in
    (
    select distinct tx_hash from optimism.core.fact_decoded_event_logs
    where event_name='FinishedOperatorJob'
    )

    group by contract_address, tokenId
    QueryRunArchived: QueryRun has been archived