SectorContract Deployments copy
    Updated 2024-06-10
    -- forked from rezarwz / Contract Deployments @ https://flipsidecrypto.xyz/rezarwz/q/Lp1h5OwGBlvG/contract-deployments

    with all_contracts as (
    SELECT
    count(*)
    from
    blast.core.fact_traces
    WHERE
    TYPE ILIKE 'create%'
    AND to_address IS NOT NULL
    AND input IS NOT NULL
    AND input != '0x'
    AND tx_status = 'SUCCESS'
    AND trace_status = 'SUCCESS'
    )
    SELECT
    date_trunc('day',block_timestamp) as date,
    count(tx_hash) as "# of deployed contracts",
    sum(count(tx_hash)) over (ORDER by date_trunc('day',block_timestamp) asc) as "Total contract deployments"
    from
    all_contracts
    group by
    1


    QueryRunArchived: QueryRun has been archived