NEAR Gas Guzzlers
Methods :
-
finding top 10 contract that users spent the most gas on
using
flipside_prod_db.mdao_near.transactions table.
\
-
creating a visualization of cumulative used gas for each contract ,each day for last month
\
-
creating a visualization of cumulative used gas for each contract each hour for
we found top 10 contract sthat users spent the most gas on by using ==TX_RECEIVER== column of flipside_prod_db.mdao_near.transactions table.
here is the code :
select TX_RECEIVER as contract , (sum (GAS_USED))/(power(10,12)) as used_gas from flipside_prod_db.mdao_near.transactions group by 1 order by 2 desc limit 10
to see how contracts used gas last month , we should sum cumulative of ==GAS_USED== column from flipside_prod_db.mdao_near.transactions
table for each contract per day.
here is the code :
with top_20_contracts_that_users_spending_the_most_gas_on as ( select TX_RECEIVER as contract , (sum (GAS_USED))/(power(10,12)) as used_gas from flipside_prod_db.mdao_near.transactions
group by 1 order by 2 desc limit 20 )
SELECT date(BLOCK_TIMESTAMP) as date_, TX_RECEIVER, sum(GAS_USED)/pow(10,12) as sum_gas, sum(sum_gas)over(partition by TX_RECEIVER order by date_) as cumulative_gas FROM flipside_prod_db.mdao_near.transactions where date_ > '2022-07-01 00:00:00.000' and TX_RECEIVER in (select contract from top_20_contracts_that_users_spending_the_most_gas_on) group by 1 , 2 order by 4 desc
here is the result :
to see how contracts used gas last week , we should sum cumulative of ==GAS_USED== column from flipside_prod_db.mdao_near.transactions
table for each contract per hour.
here is the result :
conclusion :
as we can see aurora is the contract that users spent the most gas on .
app.near.crowd.near is in second place and after that we have zomland.near
these three are are the most spent gas on contracts last month and also last week . \n
contact info :
Discord : MOHAMAD23#9722
Appendix :
Data provided here are from app.flipsidecrypto.com .