binhachonWho's That Going Across My Bridge (Redux)
Updated 2022-04-18
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 contract_address as (
-- select
-- 'terra1g6llg3zed35nd3mh9zx6n64tfw3z67w2c48tn2' as address,
-- 'Terra Bridge BSC' as name
-- union all
select
'terra13yxhrk08qvdf5zdc9ss5mwsg5sf7zva9xrgwgc' as address,
'Terra Bridge ETH' as name
-- union all
-- select
-- 'terra1rtn03a9l3qsc0a9verxwj00afs93mlm0yr7chk' as address,
-- 'Terra Bridge ONE' as name
),
receive_from_Terra_bridge as(
select
distinct tx_id,
block_timestamp,
msg_value : amount[0] : denom :: string as denom,
msg_value : amount[0] : amount :: float / 1e6 as amount_receive,
msg_value : to_address :: string as recipient
from terra.msgs
where msg_value : from_address :: string in (
select
address
from contract_address
)
and msg_value : amount[0] is not null
and tx_status = 'SUCCEEDED'
and denom = 'uusd'
),
send_to_Terra_bridge as(
select
distinct tx_id,
block_timestamp,
msg_value : amount[0] : denom :: string as denom,
Run a query to Download Data