maybeyonasanc_basset_bals
Updated 2022-01-29
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
lock_collat as (
select distinct
block_timestamp,
tx_id,
msg_value:sender::string as user,
case msg_value:execute_msg:lock_collateral:collaterals[0][0]::string
when 'terra1kc87mu460fwkqte29rquh4hc20m54fxwtsx7gp' then 'bluna'
when 'terra1dzhzukyezv0etz22ud940z7adyv7xgcjkahuun' then 'beth'
end as collateral,
msg_value:execute_msg:lock_collateral:collaterals[0][1]::string/pow(10,6) as amount,
amount as vector
from terra.msgs
where tx_status = 'SUCCEEDED'
and msg_value:execute_msg:lock_collateral:collaterals[0][0]::string in (
'terra1kc87mu460fwkqte29rquh4hc20m54fxwtsx7gp', -- bluna
'terra1dzhzukyezv0etz22ud940z7adyv7xgcjkahuun' -- beth
)
and msg_value:contract::string = 'terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8' --overseer
),
unlock_collat as (
select distinct
block_timestamp,
tx_id,
msg_value:sender::string as user,
case msg_value:execute_msg:lock_collateral:collaterals[0][0]::string
when 'terra1kc87mu460fwkqte29rquh4hc20m54fxwtsx7gp' then 'bluna'
when 'terra1dzhzukyezv0etz22ud940z7adyv7xgcjkahuun' then 'beth'
end as collateral,
msg_value:execute_msg:unlock_collateral:collaterals[0][1]::string/pow(10,6) as amount,
-amount as vector
from terra.msgs
where tx_status = 'SUCCEEDED'
and msg_value:execute_msg:lock_collateral:collaterals[0][0]::string in (
'terra1kc87mu460fwkqte29rquh4hc20m54fxwtsx7gp', -- bluna
'terra1dzhzukyezv0etz22ud940z7adyv7xgcjkahuun' -- beth
Run a query to Download Data