0xbicandle
Updated 2023-09-22
999
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
›
⌄
-- WHERE topic0 = 0x137a44067c8961cd7e1d876f4754a5a3a75989b4552f1843fc69c3b372def160
-- and topic1 = 0xe096982abd597114bdaa4a60612f87fabfcc7206aa12d61c50e7ba1e6c291100
-- and contract_address = 0xc8ee91a54287db53897056e12d9819156d3822fb
with gmx_v2_tx as
(
SELECT
TX_HASH
FROM arbitrum.core.fact_event_logs
WHERE CONTRACT_ADDRESS = '0xc8ee91a54287db53897056e12d9819156d3822fb'
group by 1
),
swap_detail as
(
SELECT
BLOCK_TIMESTAMP
,TX_HASH
,CONTRACT_ADDRESS
,DECODED_LOG['from'] as from_address
,DECODED_LOG['to'] as to_address
,DECODED_LOG['value'] as value
FROM arbitrum.core.fact_decoded_event_logs
WHERE TX_HASH in (select TX_HASH from gmx_v2_tx group by 1)
and EVENT_NAME='Transfer'
and TO_ADDRESS not in ('0x0000000000000000000000000000000000000000')
)
SELECT
*
from
(
SELECT
TX_HASH
,count(*) as cnt
from swap_detail
group by 1
Run a query to Download Data