forked from defilytica/aura_gauge_vote_scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.py
65 lines (62 loc) · 894 Bytes
/
constants.py
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# constants.py
SNAPSHOT_SUBGRAPH_URL = "https://hub.snapshot.org/graphql"
# Query to fetch votes for a specific proposal
VOTES_QUERY = """
query ($proposalId: String!) {
votes (
first: 1000
skip: 0
where: {
proposal: $proposalId
}
orderBy: "created",
orderDirection: desc
) {
id
voter
vp
vp_by_strategy
vp_state
created
proposal {
id
}
choice
space {
id
}
}
}
"""
# Query to fetch details of a specific proposal
PROPOSAL_QUERY = """
query ($proposalId: String!) {
proposal(id: $proposalId) {
id
title
body
choices
start
end
snapshot
state
author
created
scores
scores_by_strategy
scores_total
scores_updated
plugins
network
strategies {
name
network
params
}
space {
id
name
}
}
}
"""