-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
180 lines (162 loc) · 3.25 KB
/
schema.graphql
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
type Factory {
id: ID!
address: String!
admins: [String!]!
}
type RoundTemplate {
id: ID!
roundVersion: String!
roundAddress: String!
mdProtocol: BigInt!
mdPointer: String!
active: Boolean!
}
type RoundClone {
id: ID!
roundAddress: String!
roundVersion: String!
filterTag: String!
template: RoundTemplate!
}
type ModuleTemplate {
id: ID!
moduleName: String!
templateAddress: String!
mdProtocol: BigInt!
mdPointer: String!
active: Boolean!
}
type ModuleClone {
id: ID!
moduleAddress: String!
roundAddress: String
contest: Round
moduleName: String!
moduleTemplate: ModuleTemplate!
filterTag: String!
}
type Round {
id: ID!
roundAddress: String!
contestStatus: BigInt!
votesModule: ModuleClone!
pointsModule: ModuleClone!
executionModule: ModuleClone!
choicesModule: ModuleClone!
isContinuous: Boolean!
isRetractable: Boolean!
mdProtocol: BigInt!
mdPointer: String!
batchVotes: [BatchVote!]! @derivedFrom(field: "round")
votes: [BasicVote!]! @derivedFrom(field: "round")
totalVoted: BigInt!
}
type TX {
id: ID!
blockNumber: BigInt!
srcAddress: String!
txHash: String!
timestamp: Int!
}
type BasicVote {
id: ID!
round: Round!
choice: BasicChoice!
amount: BigInt!
batch: BatchVote!
voter: String!
}
type BatchVote {
id: ID!
round: Round!
timestamp: Int!
voter: String!
totalVoted: BigInt!
votes: [BasicVote!]! @derivedFrom(field: "batch")
comment: String
}
####################### MODULE SPECIFIC #######################
type Params_BaalPoints_v0_2_0 {
id: ID!
clone: ModuleClone!
dao: String!
lootToken: String!
sharesToken: String!
checkpoint: BigInt!
holderType: BigInt!
}
type Params_BaalGate_v0_2_0 {
id: ID!
clone: ModuleClone!
dao: String!
lootToken: String!
sharesToken: String!
holderType: BigInt!
holderThreshold: BigInt!
checkpoint: BigInt!
timed: Boolean!
startTime: BigInt!
endTime: BigInt!
}
type Params_PrePop_v0_2_0 implements BasicChoices {
id: ID!
clone: ModuleClone!
basicChoices: BasicChoices!
}
type Params_TimedVotes_v0_2_0 {
id: ID!
clone: ModuleClone!
duration: BigInt
startTime: BigInt
endTime: BigInt
}
####################### IMPLEMENTATION SPECIFIC #######################
type BasicChoice {
id: ID!
choiceId: String!
title: String!
color: String
description: String
link: String
bytes: String!
registrar: String!
basicChoices: BasicChoices!
isValid: Boolean!
isActive: Boolean!
amountVoted: BigInt!
postedBy: String!
postedAt: Int!
}
type BasicChoices {
id: ID!
choices: [BasicChoice!]! @derivedFrom(field: "basicChoices")
}
type AskHausPoll {
id: ID!
round: Round!
createdAt: Int!
votesParams: Params_TimedVotes_v0_2_0!
pointsParams: Params_BaalPoints_v0_2_0!
choicesParams: Params_PrePop_v0_2_0!
postedBy: String!
title: String!
description: String
pollLink: String
requestComment: Boolean
answerType: String!
}
type AskHausContest {
id: ID!
createdAt: Int!
round: Round!
votesParams: Params_TimedVotes_v0_2_0!
pointsParams: Params_BaalPoints_v0_2_0!
choicesParams: Params_BaalGate_v0_2_0!
postedBy: String!
title: String!
description: String
link: String
requestComment: Boolean
answerType: String!
basicChoices: BasicChoices!
}