scottincryptoTop 5 Delegate Voting Activity
Updated 2021-07-04
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 pre_format as (
select
block_timestamp,
concat(substr(tx_from_address, 0, 4),'..',substr(tx_from_address, 41, 2)) as voter_address,
event_inputs:votes/1e18 as votes,
case
when event_inputs:proposalId = 3 then 'Proposal 0.3'
when event_inputs:proposalId = 4 then 'Proposal 0.4'
when event_inputs:proposalId = 4 then 'Proposal 0.5'
when event_inputs:proposalId = 1 then 'Proposal 1.1'
else event_inputs:proposalId
end as proposal_id,
event_inputs:support as support
from ethereum.events_emitted
where contract_address in('0x5e4be8bc9637f0eaa1a755019e06a68ce081d58f' ,'0xc4e172459f1e7939d522503b81afaac1014ce6f6','0xeCa491E162d157760F167c4DD92b45AE6E5Cf0f1') -- UNI gov contract
and tx_from_address in ('0xe02457a1459b6c49469bf658d4fe345c636326bf',
'0x7e4a8391c728fed9069b2962699ab416628b19fa',
'0x2b1ad6184a6b0fac06bd225ed37c2abc04415ff4',
'0xbbf3f1421d886e9b2c5d716b5192ac998af2012c',
'0x6626593c237f530d15ae9980a95ef938ac15c35c')
and event_name = 'VoteCast'
-- and tx_succeeded = 'TRUE'
and block_timestamp > '2019-01-01'
order by 1
),
voters as (
select voter_address
from (values ('0xe0..bf'),('0x7e..fa'),('0x2b..f4'),('0xbb..2c'),('0x66..5c')) as v1 (voter_address)
)
select
v.voter_address,
case when p3.votes > 0 then 'voted' else 'abstained' end as "Proposal 0_3",
case when p4.votes > 0 then 'voted' else 'abstained' end as "Proposal 0_4",
Run a query to Download Data