binhachon103. [Elite] From Wormhole to Terra - Growth rate
Updated 2021-11-22
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 sending_asset as(
select
block_timestamp,
msg_value : sender :: string as address,
case when msg_value : execute_msg : initiate_transfer : asset : info : native_token : denom :: string is not null then msg_value : execute_msg : initiate_transfer : asset : info : native_token : denom :: string when msg_value : execute_msg : initiate_transfer : asset : info : token : contract_addr :: string is not null then msg_value : execute_msg : initiate_transfer : asset : info : token : contract_addr :: string end as symbol,
msg_value : execute_msg : initiate_transfer : recipient_chain :: float as chainID,
case when chainID = 1 then 'Solana' when chainID = 2 then 'Ethereum' when chainID = 4 then 'BSC' when chainID = 5 then 'Polygon' end as chain_name,
msg_value : execute_msg : initiate_transfer : asset : amount :: float / 1e6 as amount,
msg_value
from
terra.msgs
where
msg_value : contract :: string = 'terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf'
and tx_status = 'SUCCEEDED'
and msg_value : execute_msg : initiate_transfer : recipient_chain is not null
)
select
date_trunc('day', block_timestamp) as blocktime,
count(address) as daily_new_unique_address
from
(
select
block_timestamp,
address,
row_number() over (
partition by address
order by
block_timestamp
) as row_number
from
sending_asset
where
symbol = 'uusd' qualify row_number = 1
)
group by
blocktime