maybeyonasabra_ust_bridge
Updated 2021-12-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
›
⌄
-- wluna = '0xd2877702675e6ceb975b4a1dff9fb7baf4c91ea9'
-- bridge terra-side = terra13yxhrk08qvdf5zdc9ss5mwsg5sf7zva9xrgwgc
with
luna_price as(
select
date(block_timestamp) as date,
avg(luna_exchange_rate) as luna_val
from terra.oracle_prices
where symbol = 'UST'
group by 1
),
luna_bridge as(
select
block_timestamp,
tx_id,
msg_value:amount[0]:amount::string/pow(10,6) as amt,
msg_value:amount[0]:denom::string as denom,
msg_value:from_address::string as sender
from terra.msgs
where msg_value:to_address::string = 'terra13yxhrk08qvdf5zdc9ss5mwsg5sf7zva9xrgwgc'
and msg_value:amount[0]:denom::string = 'uluna'
and tx_status = 'SUCCEEDED'
and msg_value:amount[0]:amount::string/pow(10,6) > 0
),
ust_bridge as(
select
block_timestamp,
tx_id,
msg_value:amount[0]:amount::string/pow(10,6) as amt,
msg_value:amount[0]:denom::string as denom,
msg_value:from_address::string as sender
from terra.msgs
where msg_value:to_address::string = 'terra13yxhrk08qvdf5zdc9ss5mwsg5sf7zva9xrgwgc'
and msg_value:amount[0]:denom::string = 'uusd'
Run a query to Download Data