BlockTrackertop Gas Guzzling contract
    Updated 2025-04-06
    -- forked from top Gas Guzzling contract @ https://flipsidecrypto.xyz/studio/queries/08b9bd89-017e-4439-bd4f-b94c4b1d0cce

    with contract_list as (
    select
    distinct to_address as address
    from swell.core.fact_traces
    where type ilike '%CREATE%'
    and TX_SUCCEEDED
    and input <> '0x'
    and to_address is not null
    and ORIGIN_FUNCTION_SIGNATURE <> '0x'
    )

    select
    to_address as contract_address,
    c.LABEL as contract_name,
    count(DISTINCT tx_hash) as n_transaction,
    round(sum(tx_fee),2) as total_fee_eth,
    round(sum(tx_fee * p.price),2) as total_fee_usd,
    count(distinct from_address) as wallets
    from swell.core.fact_transactions a
    join contract_list b ON a.to_address = b.address
    left join swell.core.dim_labels c ON a.to_address = c.address
    left join (
    select
    price
    from crosschain.price.ez_prices_hourly
    where blockchain = 'ethereum'
    and is_native = 'TRUE'
    qualify row_number() over (order by hour desc) = 1
    ) p ON TRUE
    where block_timestamp::date >= current_date - 30
    group by 1 , 2
    order by total_fee_eth desc
    limit 100


    Last run: 22 days ago
    CONTRACT_ADDRESS
    CONTRACT_NAME
    N_TRANSACTION
    TOTAL_FEE_ETH
    TOTAL_FEE_USD
    WALLETS
    1
    0x3a464f746d23ab22155710f44db16dca53e0775e15780.0357.653
    2
    0x3ef3d8ba38ebe18db133cec108f4d14ce00dd9ae23720.0229.31226
    3
    0x24c8964338deb5204b096039147b8e8c3aea42cc110860.0231.126
    4
    0xe5c689d34e03611ac55a603831b00606a880051415570.0117.74225
    5
    0x652e53c6a4fe39b6b30426d9c96376a105c89a9530340.0112.5309
    6
    0x5baeaf138bb7ca908269340e240cbbdbe73021133860.019.631
    7
    0x3c2269811836af69497e5f486a85d7316753cf62508240.0120.661
    8
    0xa38978e46ba5f6974f3dbfe0e2963028b83833db490.018.941
    9
    0xaaaaaaaa82812f0a1f274016514ba2ca933bf24d141540.0116.39336
    10
    0xec4181ee959e47f72e9cc60274fbe53d68949e4749650.0110.982
    11
    0xe69446ee5500d5764e304af0092c6a7ea2b1f750500.014
    12
    0x24f61a1000dc3268c712cfc27341c0be260451115001
    13
    0x35da0e38907b194e7ea2d8701204ce4aa632c5644001
    14
    0x00000000001594c61dd8a6804da9ab58ed2483ce2200.0616
    15
    0xc184b499516df823dfec3705a4ea84155f2fd6681200.073
    16
    0x27cead7232f64c63368f575aff10ad2dbfe220762001
    17
    0xfb249a06ec61595ea97e0e908506218c46bce31a1001
    18
    0x77bca770aa34ed9032107931a604bd8abb0153ee5001
    19
    0x00000000009a1e02f00e280dcfa4c81c557242127006
    20
    0x86116fbd26e6e83ffaf24112875d1bcb8f40799f1001
    100
    6KB
    2s