messariLayer Zero/Stargate Activity in Event Logs on Ethereum
Updated 2023-07-05
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 eth_totals as (
select
date(block_timestamp) as date,
count(distinct tx_hash) as transactions,
count(distinct from_address) as addresses
from
ethereum.core.fact_transactions
where date >= current_date - interval '{{Days}} days'
group by 1
order by 1 desc
),
contracts as (
select
distinct el.contract_address as contract,
case
when dl.address_name is not null then dl.address_name
when el.contract_address is null then 'transfer'
when el.contract_address = '0x4d73adb72bc3dd368966edd0f0b2148401a178e2' then 'layerzero'
else el.contract_address
end as dapp
from
ethereum.core.fact_decoded_event_logs el
left join
ethereum.core.dim_labels dl
on el.contract_address = dl.address
OR (el.contract_address IS NULL AND dl.address IS NULL)
)
select
date(ft.block_timestamp) as date,
count(distinct ft.tx_hash) as transactions,
count(distinct ft.from_address) as addresses
from
ethereum.core.fact_transactions ft
left join
ethereum.core.fact_decoded_event_logs el
on ft.tx_hash = el.tx_hash
Run a query to Download Data