theericstoneETH xfer origins
Updated 2021-12-02
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
›
⌄
-- grab all txns where an eth xfer occurred
-- but the origin function was not simply transfer
with eth_xfer_ids as (
select distinct(tx_id) from ethereum.udm_events
where block_timestamp > current_date - interval '3 days'
and symbol = 'ETH'
and contract_address IS NULL
and amount > 0
and origin_function_name <> 'transfer'
and event_type = 'native_eth'
)
-- now pull txn details
-- [notes: swap out udm_events for events_emitted here to see more detailed logs + inputs if you like
-- you could also do a different summary, or just pull raw txn details if you like! just chose a
-- simple summary to start]
select
origin_function_name,
to_label,
count(*) as n_events
from
ethereum.udm_events
where block_timestamp > current_date - interval '3 days'
and tx_id in (select tx_id from eth_xfer_ids)
group by 1,2
order by 3 desc;
Run a query to Download Data