adriaparcerisasflow new contracts vs l2
    Updated 2025-04-28
    WITH flow_contracts AS (
    -- Your existing Flow query
    WITH core_news AS (
    SELECT DISTINCT event_contract AS new_contract,
    MIN(trunc(block_timestamp, 'day')) AS debut
    FROM flow.core.fact_events
    GROUP BY 1
    ),
    evm_news AS (
    SELECT DISTINCT contract AS new_contract,
    MIN(trunc(block_timestamp, 'day')) AS debut
    FROM (
    select x.block_timestamp, x.from_address as creator,y.contract_address as contract
    from flow.core_evm.fact_transactions x
    join flow.core_evm.fact_event_logs y on x.tx_hash=y.tx_hash
    where y.topics[0] ilike '%0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0%'
    UNION
    select x.block_timestamp, x.from_address as creator, x.tx_hash as contract
    from flow.core_evm.fact_transactions x
    where (x.origin_function_signature='0x60c06040' or x.origin_function_signature='0x60806040')
    and tx_hash not in (
    select x.tx_hash
    from flow.core_evm.fact_transactions x
    join flow.core_evm.fact_event_logs y on x.tx_hash=y.tx_hash
    where y.topics[0] ilike '%0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0%'
    )
    )
    GROUP BY 1
    ),
    combined_news AS (
    SELECT new_contract, debut FROM core_news
    UNION ALL
    SELECT new_contract, debut FROM evm_news
    )
    SELECT
    debut AS date,
    Last run: 14 days ago
    DATE
    NEW_CONTRACTS
    CHAIN
    1
    2025-04-27 00:00:00.000269Arbitrum
    2
    2025-04-27 00:00:00.0004861Base
    3
    2025-04-27 00:00:00.0009151Flow
    4
    2025-04-27 00:00:00.00023Mantle
    5
    2025-04-27 00:00:00.0001289Optimism
    6
    2025-04-26 00:00:00.000338Arbitrum
    7
    2025-04-26 00:00:00.0005588Base
    8
    2025-04-26 00:00:00.0009463Flow
    9
    2025-04-26 00:00:00.00036Mantle
    10
    2025-04-26 00:00:00.0003133Optimism
    11
    2025-04-25 00:00:00.000430Arbitrum
    12
    2025-04-25 00:00:00.0005393Base
    13
    2025-04-25 00:00:00.0002802Flow
    14
    2025-04-25 00:00:00.00028Mantle
    15
    2025-04-25 00:00:00.0001293Optimism
    16
    2025-04-24 00:00:00.000516Arbitrum
    17
    2025-04-24 00:00:00.0007794Base
    18
    2025-04-24 00:00:00.000291Flow
    19
    2025-04-24 00:00:00.00021Mantle
    20
    2025-04-24 00:00:00.0001432Optimism
    ...
    585
    23KB
    153s