-
Notifications
You must be signed in to change notification settings - Fork 22
/
schema.graphql
512 lines (496 loc) · 15.7 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
type Moloch @entity {
"unique identifier and primary key of the entity"
id: ID!
"version of moloch contract (v1, v2, v2.1, v2.2)"
version: String
"address that created the dao"
summoner: Bytes!
"deprecated"
newContract: String
"deprecated"
deleted: Boolean
"timestamp of the block when the dao was summoned - duplicated"
summoningTime: BigInt!
"timestamp of the block when the dao was summoned"
createdAt: String!
"length in seconds of the current voting period and grace period"
periodDuration: BigInt!
"length in seconds of the current voting period"
votingPeriodLength: BigInt!
"length in seconds of the current grace period"
gracePeriodLength: BigInt!
"deposit amount required to submit a proposal"
proposalDeposit: BigInt!
"(1/dilutionBound) is the minimum membership treshold for a ragequit to pass"
dilutionBound: BigInt!
"reward amount for processing a proposal"
processingReward: BigInt!
"token address for the dao's primary token"
depositToken: Token!
"approved tokens scoped to this dao"
approvedTokens: [Token!]!
"the dao's treasury address"
guildBankAddress: Bytes
"deprecated"
guildBankBalanceV1: BigInt
"tokens scoped to this dao"
tokens: [Token!]! @derivedFrom(field: "moloch")
"member addresses scoped to this dao"
members: [Member!] @derivedFrom(field: "moloch")
"token balances scoped to this dao"
tokenBalances: [TokenBalance!] @derivedFrom(field: "moloch")
"proposals scoped to this dao"
proposals: [Proposal!] @derivedFrom(field: "moloch")
"ragequits scoped to this dao"
rageQuits: [RageQuit!] @derivedFrom(field: "moloch")
"minion addresses scoped to this dao"
minions: [Minion!] @derivedFrom(field: "moloch")
"shamans scoped to this dao"
shamans: [Shaman!] @derivedFrom(field: "moloch")
"documents scoped to this dao"
documents: [Content!] @derivedFrom(field: "moloch")
"records scoped to this dao"
records: [Record!] @derivedFrom(field: "moloch")
"total circulating shares tokens"
totalShares: BigInt!
"total circulating loot tokens"
totalLoot: BigInt!
"boolean value of whether v2.2 is set up"
v22Setup: Boolean
"unused - address that receives tributes for submitting a proposal"
spamPreventionAddress: Bytes
"unused - tribute amount required for submitting a proposal"
spamPreventionAmount: BigInt
}
type TokenBalance @entity {
"unique identifier and primary key of the entity"
id: ID!
"moloch dao scoped to this token balance"
moloch: Moloch!
"token scoped to this token balance"
token: Token!
"amount of tokens in balance"
tokenBalance: BigInt!
"address of the associated member"
member: Member
"boolean value of whether the token balance belongs to the moloch dao"
guildBank: Boolean!
"boolean value of whether the token balance belongs in the escrow"
ecrowBank: Boolean!
"boolean value of whether the token balance belongs to the member"
memberBank: Boolean!
}
type Token @entity {
"unique identifier and primary key of the entity"
id: ID!
"moloch dao scoped to this token"
moloch: Moloch!
"token address"
tokenAddress: Bytes!
"boolean value of whether token is whitelisted"
whitelisted: Boolean!
"token symbol"
symbol: String
"token decimals"
decimals: BigInt
}
type Member @entity {
"unique identifier and primary key of the entity"
id: ID!
"timestamp when the member was created"
createdAt: String!
"moloch dao scoped to this member"
moloch: Moloch!
"related dao address"
molochAddress: Bytes!
"address of the member"
memberAddress: Bytes!
"address that has received delegated shares from the member (most often, the member's own address)"
delegateKey: Bytes!
"current shares held by the member"
shares: BigInt!
"current loot held by the member"
loot: BigInt!
"deprecated"
exists: Boolean!
"latest proposal that the member has voted yes on (helper value for disabling ragequit if member has a yes vote on an active proposal)"
highestIndexYesVote: Proposal
"amount of token tributed when the member first joined the dao"
tokenTribute: BigInt!
"boolean value of whether member ragequit from the dao"
didRagequit: Boolean!
"votes scoped to this member"
votes: [Vote!] @derivedFrom(field: "member")
"submitted proposals scoped to this member"
submissions: [Proposal!] @derivedFrom(field: "member")
"token balances scoped to this member"
tokenBalances: [TokenBalance!] @derivedFrom(field: "member")
"rage quits scoped to this member"
rageQuits: [RageQuit!] @derivedFrom(field: "member")
"boolean value of whether member was proposed to be kicked from the dao"
proposedToKick: Boolean
"boolean value of whether member was kicked from the dao"
kicked: Boolean
"proposal index of the proposal that kicked the member from the dao (0 if member is unkicked)"
jailed: BigInt
"moloch dao address (if the member is a dao)"
isDao: Moloch
"safe minion address (if the member is a safe minion)"
isSafeMinion: SafeMinion
}
type Vote @entity {
"unique identifier and primary key of the entity"
id: ID!
"block timestamp when the vote was submitted"
createdAt: String!
"related proposal"
proposal: Proposal!
"related/voting member"
member: Member!
"whether the dao member has voted yes or no (1 for yes, 2 for no)"
uintVote: Int!
"contract address of the DAO related to this vote"
molochAddress: Bytes!
"related/voting member address"
memberAddress: Bytes
"member's proportional share of all dao shares at time of vote"
memberPower: BigInt
"order that the proposal went through sponsorship process"
proposalIndex: BigInt
"address that has received delegated shares from the member (most often, the member's own address)"
delegateKey: Bytes
}
type Proposal @entity {
"unique identifier and primary key of the entity"
id: ID!
"block timestamp when the proposal was submitted"
createdAt: String!
"address that submitted the proposal"
createdBy: Bytes!
"order that the proposal went through sponsorship process"
proposalIndex: BigInt
"id of the proposal"
proposalId: BigInt!
"moloch dao scoped to this proposal"
moloch: Moloch!
"contract address of the DAO related to this proposal"
molochAddress: Bytes!
"member scoped to this proposal"
member: Member!
"address of associated member"
memberAddress: Bytes!
"address that has received delegated shares from the member (most often, the member's own address)"
delegateKey: Bytes!
"address of the proposal applicant"
applicant: Bytes!
"address of the proposal proposer"
proposer: Bytes
"address of the proposal sponsor"
sponsor: Bytes!
"address of the proposal processor"
processor: Bytes
"amount of shares requested in this proposal"
sharesRequested: BigInt!
"amount of loot requested in this proposal"
lootRequested: BigInt!
"amount of tribute offered in this proposal"
tributeOffered: BigInt!
"address of tribute token"
tributeToken: Bytes!
"symbol of tribute token"
tributeTokenSymbol: String
"decimals of tribute token"
tributeTokenDecimals: BigInt
"amount of payment requested"
paymentRequested: BigInt!
"address of payment token requested"
paymentToken: Bytes!
"symbol of payment token requested"
paymentTokenSymbol: String
"decimals of payment token"
paymentTokenDecimals: BigInt
"timestamp when the proposal enters the proposal queue"
startingPeriod: BigInt
"amount of current shares that have voted yes"
yesVotes: BigInt!
"amount of current shares that have voted no"
noVotes: BigInt!
"boolean value of whether proposal was sponsored"
sponsored: Boolean!
"block timestamp when the proposal was sponsored"
sponsoredAt: String
"boolean value of whether proposal was processed"
processed: Boolean!
"block timestamp when the proposal was processed"
processedAt: String
"boolean value of whether proposal was passed"
didPass: Boolean!
"boolean value of whether proposal was cancelled"
cancelled: Boolean
"block timestamp when the proposal was cancelled"
cancelledAt: String
"boolean value of whether this proposal is aborted"
aborted: Boolean
"boolean value of whether this proposal is a whitelist token proposal"
whitelist: Boolean
"boolean value of whether this proposal is a guildkick proposal"
guildkick: Boolean
"boolean value of whether this proposal is a new member proposal"
newMember: Boolean
"boolean value of whether this proposal is a trade proposal"
trade: Boolean
"unused"
guildkickOrWhitelistOrMinion: Boolean
"proposal details scoped to this proposal"
details: String
"total dao shares and loot at time of yes vote (helper value for dilution bound calculation)"
maxTotalSharesAndLootAtYesVote: BigInt
"votes scoped to this proposal"
votes: [Vote!] @derivedFrom(field: "proposal")
"number of shares that voted yes"
yesShares: BigInt!
"number of shares that voted no"
noShares: BigInt!
"timestamp when the voting period starts"
votingPeriodStarts: BigInt!
"timestamp when the voting period ends"
votingPeriodEnds: BigInt!
"timestamp when the grace period ends"
gracePeriodEnds: BigInt!
"version of the moloch dao"
molochVersion: String!
"boolean value of whether this is a minion proposal"
isMinion: Boolean!
"unused"
uberHausMinionExecuted: Boolean
"boolean value of whether the proposal is executed (for minion proposals only)"
executed: Boolean
"minion address"
minionAddress: Bytes
"transaction hash scoped to the minion execution for this proposal"
minionExecuteActionTx: MolochTransaction
"minion object scoped to this proposal"
minion: Minion
"escrow minion that holds a nft tribute for a new member proposal"
escrow: ProposalEscrow @derivedFrom(field: "proposal")
"minion action scoped to this proposal"
actions: [MinionAction!] @derivedFrom(field: "proposal")
}
type RageQuit @entity {
"unique identifier and primary key of the entity"
id: ID!
"block timestamp when the member rage quit"
createdAt: String!
"moloch dao scoped to this ragequit"
moloch: Moloch!
"related dao address"
molochAddress: Bytes!
"member scoped to this ragequit"
member: Member!
"related member address"
memberAddress: Bytes!
"number of shares ragequit"
shares: BigInt!
"number of loot ragequit"
loot: BigInt!
}
type DaoMeta @entity {
"unique identifier and primary key of the entity"
id: ID!
"deprecated"
title: String
"deprecated"
version: String
"deprecated"
newContract: String
"deprecated"
http: String
}
type Minion @entity {
"unique identifier and primary key of the entity"
id: ID!
"timestamp of the block when the minion was summoned"
createdAt: String!
"minion address"
minionAddress: Bytes!
"related dao address"
molochAddress: Bytes!
"moloch dao scoped to this minion"
moloch: Moloch!
"name of the minion"
details: String!
"type of minion"
minionType: String!
"proposals scoped to this minion"
proposals: [Proposal!] @derivedFrom(field: "minion")
"address of uberhaus dao"
uberHausAddress: Bytes
"deprecated"
uberHaus: Moloch
"deprecated"
uberHausDelegateRewardFactor: BigInt
"deprecated"
uberHausDelegate: Bytes
"address of related safe"
safeAddress: Bytes
"version of the safe minion"
safeMinionVersion: String
"boolean value of whether this minion is a cross-chain minion"
crossChainMinion: Boolean!
"chain id of the foreign chain"
foreignChainId: String
"safe address on the foreign chain"
foreignSafeAddress: Bytes
"bridge module address for a cross-chain minion"
bridgeModule: String
"version of the minion"
version: String
"minimum quorum percentage of the minion"
minQuorum: BigInt
"minion stream scoped to this minion"
streams: [MinionStream!] @derivedFrom(field: "minion")
}
type MinionStream @entity {
"unique identifier and primary key of the entity"
id: ID!
"related proposal id"
proposalId: String!
"block id when the minion stream was created"
createdAt: String!
"recipient address of minion stream"
to: Bytes!
"token address of minion stream"
tokenAddress: Bytes!
"token address of super token"
superTokenAddress: Bytes!
"rate of minion stream per block"
rate: BigInt!
"minimum deposit amount to start the minion stream"
minDeposit: BigInt!
"member address that proposed the minion stream"
proposer: Bytes!
"boolean value of whether the minion stream was executed"
executed: Boolean!
"block id when the minion stream was executed"
executedBlock: BigInt
"block timestamp when the minion stream was executed"
executedAt: String
"transaction hash when the minion stream was executed"
execTxHash: Bytes
"boolean value of whether the minion stream is active"
active: Boolean!
"transaction hash of cancellation of the minion stream"
ctx: Bytes!
"block timestamp when the minion stream was cancelled"
canceledAt: String
"transaction hash hen the minion stream was cancelled"
canceledBy: Bytes
"minion scoped to this minion stream"
minion: Minion!
}
type SafeMinion @entity {
"unique identifier and primary key of the entity"
id: ID!
"minion scoped to this safe minion"
minions: [Minion!]!
}
type MolochTransaction @entity {
"unique identifier and primary key of the entity"
id: ID!
"block timestamp when the moloch transaction was created"
createdAt: String!
}
type ProposalEscrow @entity {
"unique identifier and primary key of the entity"
id: ID!
"proposal scoped to this proposal escrow"
proposal: Proposal!
"address of the associated minion"
minionAddress: Bytes!
"address of the associated moloch dao"
molochAddress: Bytes!
"address of the user who proposed this proposal escrow"
proposer: Bytes!
"address of the associated token"
tokenAddresses: [Bytes!]
"token standards for tokens in escrow (1 for erc-20, 2 for erc-721, 3 for erc-1155)"
tokenTypes: [BigInt!]
"token IDs for tokens in escrow"
tokenIds: [BigInt!]
"amounts for tokens in escrow"
amounts: [BigInt!]
}
type MinionAction @entity {
"unique identifier and primary key of the entity"
id: ID!
"proposal scoped to this minion action"
proposal: Proposal!
"related minion address"
minionAddress: Bytes!
"related dao address"
molochAddress: Bytes!
"target address of the minion action"
target: Bytes!
"address of the token withdrawn from this minion action"
withdrawToken: Bytes!
"value of the token withdrawn from this minion action"
withdrawValue: BigInt!
"encoded data for minion action"
data: String!
"boolean value on whether the proposal can be executed by members only"
memberOnly: Boolean!
"order of the minion action"
index: BigInt!
}
type Shaman @entity {
"unique identifier and primary key of the entity"
id: ID!
"block timestamp when the shaman was added"
createdAt: String!
"address of the shaman"
shamanAddress: Bytes!
"related dao address"
molochAddress: Bytes!
"moloch dao scoped to this shaman"
moloch: Moloch!
"boolean value of whether this shaman is enabled"
enabled: Boolean!
}
type Content @entity {
"unique identifier and primary key of the entity"
id: ID!
"block timestamp when the content was created"
createdAt: String!
"transaction hash when the content was created"
transactionHash: Bytes!
"related dao address"
molochAddress: String
"moloch dao scoped to this content"
moloch: Moloch
"related member address"
memberAddress: Bytes!
"content of the content"
content: String!
"type of the content"
contentType: String!
"location of the content"
location: String!
"title of the content"
title: String
"description of the content"
description: String
"boolean value of whether the content is ratified by the dao"
ratified: Boolean!
"raw content of the content before parsing"
rawData: String!
}
type Record @entity {
id: ID!
createdAt: String!
createdBy: Bytes!
moloch: Moloch!
tag: Bytes!
table: String!
contentType: String!
content: String!
}