binhachonUST BRIDGE
Updated 2021-10-08
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 sent_across_the_bridge as (
select
date(block_timestamp) as block_date,
'Sent to Ethereum' as transaction_type,
msg_value:amount[0]:denom as original_denom,
substring(msg_value:amount[0]:denom, 2, 6) as dervied_denom,
concat(dervied_denom, ' sent to Ethereum') as derived_transaction_type,
sum(msg_value:amount[0]:amount / POW(10, 6)) as derived_amount
from terra.msgs m
where msg_value:to_address::string = 'terra13yxhrk08qvdf5zdc9ss5mwsg5sf7zva9xrgwgc'
and tx_status = 'SUCCEEDED'
and original_denom in ('uusd')
group by 1, 2, 3, 4
),
received_from_bridge as (
select
date(block_timestamp) as block_date,
'Received from Ethereum' as transaction_type,
msg_value:amount[0]:denom as original_denom,
substring(msg_value:amount[0]:denom, 2, 6) as dervied_denom,
concat(dervied_denom, ' received from Ethereum') as derived_transaction_type,
sum(msg_value:amount[0]:amount / POW(10, 6)) as derived_amount
from terra.msgs m
where msg_value:from_address::string = 'terra13yxhrk08qvdf5zdc9ss5mwsg5sf7zva9xrgwgc'
and tx_status = 'SUCCEEDED'
and original_denom in ('uusd')
group by 1, 2, 3, 4
),
joined_bridge_transactions as (
select
*
from sent_across_the_bridge
union
select
*
from received_from_bridge
Run a query to Download Data