binhachon2. Visualize governance staking of $MINE over time - Base query
Updated 2021-10-31
99
1
2
3
4
5
6
7
8
9
10
11
12
›
⌄
with pylon_governance as(
select block_timestamp, msg_value:sender as address, 0 as deposit_amount, msg_value:execute_msg:withdraw_voting_tokens:amount::float/1e6 as withdraw_amount from terra.msgs
where msg_value:contract::string = 'terra1xu8utj38xuw6mjwck4n97enmavlv852zkcvhgp'
and msg_value:execute_msg:withdraw_voting_tokens:amount is not null
union all
select block_timestamp, msg_value:sender as address, msg_value:execute_msg:send:amount::float/1e6 as deposit_amount, 0 as withdraw_amount from terra.msgs
where msg_value:contract::string = 'terra1kcthelkax4j9x8d3ny6sdag0qmxxynl3qtcrpy'
and msg_value:execute_msg:send:contract::string = 'terra1xu8utj38xuw6mjwck4n97enmavlv852zkcvhgp'
)
select date_trunc('day', block_timestamp) as blocktime, sum(deposit_amount) as deposit_amount, sum(withdraw_amount) as withdraw_amount, sum(deposit_amount) - sum(withdraw_amount) as net_deposit_amount from pylon_governance
group by blocktime
order by blocktime desc
Run a query to Download Data