0xaimanN_recipient of wsSOL and weWETH on Terra from Wormhole
Updated 2021-11-23
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 soldata as
(SELECT date_trunc('day',t1) as date, count( distinct recipient) as n_WsSol_recipient
from(with soltoken as
(select block_timestamp as t1, tx_id,value::string as token_address-- block_timestamp as t1, msg_value:contract::string as smart_contract_address ,msg_value:sender::string as Receiver,tx_id
from terra.msg_events, table(flatten(input=>event_attributes))F
where event_type='from_contract' and path='contract' and key='contract'
and token_address='terra190tqwgqx7s8qrknz6kckct7v607cu068gfujpk'
),
rec as (select block_timestamp as t2, tx_id,value::string as recipient
from terra.msg_events, table(flatten(input=>event_attributes))F
where event_type='from_contract' and path='recipient' and key='recipient'
)
select t1, recipient
from soltoken
inner join rec on soltoken.tx_id=rec.tx_id
)
group by 1 order by 1
),
ethdata as (
SELECT date_trunc('day',t1) as date, count( distinct recipient) as n_Weweth_recipient
from(with ethtoken as
(select block_timestamp as t1, tx_id,value::string as token_address-- block_timestamp as t1, msg_value:contract::string as smart_contract_address ,msg_value:sender::string as Receiver,tx_id
from terra.msg_events, table(flatten(input=>event_attributes))F
where event_type='from_contract' and path='contract' and key='contract'
and token_address='terra14tl83xcwqjy0ken9peu4pjjuu755lrry2uy25r'
),
Run a query to Download Data