KaskoazulAddresses that voted Terra/Anchor/Mirror governance
Updated 2022-02-15
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 TERRA_GOV AS(
SELECT
distinct gv.voter as Vote_address,
gv.blockchain as Governance_Protocol,
db.balance_usd,
db.currency
FROM
terra.gov_vote gv
INNER JOIN terra.daily_balances db
ON db.address = gv.voter
WHERE
gv.block_timestamp >= CURRENT_DATE - 90
AND db.date = CURRENT_DATE - 1
AND db.balance > 0
--AND db.balance_type = 'staked'
AND db.currency = 'LUNA'
),
ANCHOR_GOV AS(
SELECT
distinct m.msg_value:sender as Vote_address,
CASE m.msg_value:contract
WHEN 'terra1f32xyep306hhcxxxf7mlyh0ucggc00rm2s9da5' THEN 'anchor'
WHEN 'terra1wh39swv7nq36pnefnupttm2nr96kz7jjddyt2x' THEN 'mirror'
END AS Governance_Protocol,
db.balance_usd,
db.currency
FROM
terra.msgs m
INNER JOIN terra.daily_balances db
ON db.address = m.msg_value:sender
WHERE
m.block_timestamp >= CURRENT_DATE - 90
AND db.date = CURRENT_DATE - 1
AND db.balance > 0
--AND db.balance_type = 'staked'
Run a query to Download Data