maybeyonasanchor_test
Updated 2021-08-18
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
›
⌄
with borrows as (
select
block_id as block,
block_timestamp as time,
tx_id,
msg_value:sender::string as sender,
msg_value:execute_msg:borrow_stable:borrow_amount as amount,
'borrow' as event,
-msg_value:execute_msg:borrow_stable:borrow_amount as vector
from terra.msgs
where
msg_value:contract = 'terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s'
and msg_value:execute_msg:borrow_stable is not null
and tx_status='SUCCEEDED'
),
deposits as(
select
block_id as block,
block_timestamp as time,
tx_id,
msg_value:sender::string as sender,
msg_value:coins[0]:amount as amount,
'deposit' as event,
msg_value:coins[0]:amount as vector
from terra.msgs
where
msg_value:contract = 'terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s'
and msg_value:execute_msg like '%deposit%'
and tx_status='SUCCEEDED'
),
repays as(
select
block_id as block,
block_timestamp as time,
tx_id,
msg_value:sender::string as sender,
Run a query to Download Data