CartanGroup⛽️ Aptos Gas Guzzlers (APT Fees)
Updated 2023-12-01
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with
payload_txs as (
select
block_timestamp
, version
, split(payload_function, '::')[0] as smart_contract
, split(payload_function, '::')[1] as module
, split(payload_function, '::')[2] as function
, payload
, payload_function
, payload :type ::string as payload_type
, gas_used
, gas_unit_price
, (gas_used * gas_unit_price) / pow(10,8) as fee_apt
, ifnull(label, 'unlabeled') as label
from aptos.core.fact_transactions
left join aptos.core.dim_labels
on split(fact_transactions.payload_function, '::')[0] = dim_labels.address
where tx_type = 'user_transaction'
and block_timestamp ::date > current_date() -30
),
aggregated as (
select
case
when payload_type in ('script_payload', 'multisig_payload') then payload_type
when smart_contract in ('0x1', '0x3') then 'aptos_core_contracts'
else smart_contract
end as smart_contract
, case
Run a query to Download Data