-
Notifications
You must be signed in to change notification settings - Fork 10
/
schema.graphql
427 lines (404 loc) · 14.4 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
enum Status {
"The item is not registered on the TCR and there are no pending requests."
Absent
"The item is registered and there are no pending requests."
Registered
"The item is not registered on the TCR, but there is a pending registration request."
RegistrationRequested
"The item is registered on the TCR, but there is a pending removal request. These are sometimes also called removal requests."
ClearingRequested
}
enum Ruling {
"The arbitrator did not rule or refused to rule."
None
"The arbitrator ruled in favor of the requester."
Accept
"The arbitrator in favor of the challenger."
Reject
}
type Arbitrator @entity {
"The address of the arbitrator"
id: ID!
}
type LArbitrator @entity {
"The address of the arbitrator"
id: ID!
}
type EvidenceGroup @entity {
"evidenceGroupId@tcrAddress"
id: ID!
"Evidences posted to this evidenceGroupId"
evidences: [Evidence!]! @derivedFrom(field: "evidenceGroup")
"Number of evidences posted in this group"
numberOfEvidence: BigInt!
}
type Evidence @entity {
"evidenceGroupId@tcrAddress-number"
id: ID!
"The arbitrator's address."
arbitrator: Bytes!
"The evidence group"
evidenceGroup: EvidenceGroup!
"The address of the party that sent this piece of evidence."
party: Bytes!
"The URI of the evidence file."
URI: String!
"This is the <number>th evidence submitted (starting at 0) for <request>."
number: BigInt!
"When was this evidence posted"
timestamp: BigInt!
"Tx hash of the evidence submission"
txHash: Bytes!
metadata: EvidenceMetadata
}
type EvidenceMetadata @entity {
id: ID!
"Name of the evidence"
name: String
"Title of the evidence"
title: String
"Description of the evidence"
description: String
"URI of the attached file"
fileURI: String
"File extension of the attached file"
fileTypeExtension: String
}
type Registry @entity {
"The registry address"
id: ID!
"The current registration meta evidence"
registrationMetaEvidence: MetaEvidence!
"The current removal meta evidence"
clearingMetaEvidence: MetaEvidence!
"The number of MetaEvidence event logs emitted."
metaEvidenceCount: BigInt!
"The items submitted to this list"
items: [Item!]! @derivedFrom(field: "registry")
"The requests submitted to this list"
requests: [Request!]! @derivedFrom(field: "registry")
"The number of items submitted to the list."
numberOfItems: BigInt!
"Connected TCR. Can be the 0 address. In practice, will never be null."
connectedTCR: Bytes
}
type LRegistry @entity {
"The registry address"
id: ID!
"The current registration meta evidence"
registrationMetaEvidence: MetaEvidence!
"The current removal meta evidence"
clearingMetaEvidence: MetaEvidence!
"The number of MetaEvidence event logs emitted."
metaEvidenceCount: BigInt!
"The items submitted to this list"
items: [LItem!]! @derivedFrom(field: "registry")
"The requests submitted to this list"
requests: [LRequest!]! @derivedFrom(field: "registry")
"The total number of items in absent state."
numberOfAbsent: BigInt!
"The total number of items in registered state."
numberOfRegistered: BigInt!
"The total number of items in the registration requested state."
numberOfRegistrationRequested: BigInt!
numberOfClearingRequested: BigInt!
"The total number of items in the challenged registration state."
numberOfChallengedRegistrations: BigInt!
"The total number of items in the challenged removal state."
numberOfChallengedClearing: BigInt!
"Connected TCR. Can be the 0 address. In practice, will never be null."
connectedTCR: Bytes
}
type MetaEvidence @entity {
"The meta evidence ID."
id: ID!
"The URI of the meta evidence file."
URI: String!
}
type LItem @entity {
"The id of the item in the subgraph entity. Format: <itemID>@<listaddress_lowercase>"
id: ID!
"The ID of the item in the registry. Also the keccak256 hash of the data."
itemID: Bytes!
"The data describing the item."
data: String!
"The current status of the item."
status: Status!
"List of status change requests made for the item in the form requests[requestID]."
requests: [LRequest!]! @derivedFrom(field: "item")
"The total number of requests for this item."
numberOfRequests: BigInt!
"The registry where this item was submitted."
registry: LRegistry!
"The address of the registry this item was submitted. Redundant with registry field to allow use in conditionals."
registryAddress: Bytes!
"Time when the latest request was made."
latestRequestSubmissionTime: BigInt!
"The time the latest request was resolved."
latestRequestResolutionTime: BigInt!
"Whether the item is currently disputed."
disputed: Boolean!
"The account that made the latest request to the item."
latestRequester: Bytes!
"The account that challenged the latest request, if any."
latestChallenger: Bytes!
metadata: LItemMetadata
}
type LItemMetadata @entity {
"ipfs cid"
id: ID!
"The parsed data describing the item."
props: [ItemProp!]! @derivedFrom(field: "item")
"First indexable value of the json file."
key0: String
"Second indexable value of the json file."
key1: String
"Third indexable value of the json file."
key2: String
"Fourth indexable value of the json file."
key3: String
"Fifth indexable value of the json file."
key4: String
"The item identifiers combined as a single string."
keywords: String
"The item this metadata belongs to"
item: LItem! @derivedFrom(field: "metadata")
}
type _Schema_
@fulltext(
name: "itemSearch"
language: en
algorithm: rank
include: [{ entity: "LItemMetadata", fields: [{ name: "keywords" }] }]
)
type ItemProp @entity {
id: ID!
type: String!
label: String!
description: String!
isIdentifier: Boolean!
value: String
item: LItemMetadata!
}
type LRequest @entity {
"The item ID (which is the keccak256 hash of its data)."
id: ID!
"True if a dispute was raised."
disputed: Boolean!
"ID of the dispute, if any."
disputeID: BigInt!
"Time when the request was made. Used to track when the challenge period ends."
submissionTime: BigInt!
"True if the request was executed and/or any raised disputes were resolved."
resolved: Boolean!
"The address of the party that made a request"
requester: Bytes!
"The address of the party that challenged the request"
challenger: Bytes!
"The arbitrator trusted to solve disputes for this request."
arbitrator: Bytes!
"The extra data for the trusted arbitrator of this request."
arbitratorExtraData: Bytes!
"The deposit that would be awarded to the challenger if challenge is successful"
deposit: BigInt!
"The outcome of the dispute, if any. Note that unsuccessful appeal fundings can invert the arbitrator ruling (so this may differ from the ruling given by the arbitrator)."
disputeOutcome: Ruling!
"Tracks each round of a dispute in the form rounds[roundID]."
rounds: [LRound!]! @derivedFrom(field: "request")
"The evidence group for this request."
evidenceGroup: EvidenceGroup!
"The total number of rounds on this request."
numberOfRounds: BigInt!
"Whether it was requested to add or remove the item to/from the list."
requestType: Status!
"The URI to the meta evidence used for this request."
metaEvidence: MetaEvidence!
"The item this request belongs to."
item: LItem!
"The registry where this request was submitted."
registry: LRegistry!
"The address of the registry this item was submitted. Redundant with registry field to allow use in conditionals."
registryAddress: Bytes!
"The time the request was resolved."
resolutionTime: BigInt!
"Only set if the request was settled by a dispute. Used by the twitter bot"
finalRuling: BigInt
"The hash of the transaction that created this request."
creationTx: Bytes!
"The hash of the transaction that solved this request."
resolutionTx: Bytes
}
type LRound @entity {
id: ID!
"The total amount of appeal fees contributed to the requester in this round."
amountPaidRequester: BigInt!
"The total amount of appeal fees contributed to the challenger in this round."
amountPaidChallenger: BigInt!
"Whether the requester is fully funded."
hasPaidRequester: Boolean!
"Whether the challenger is fully funded."
hasPaidChallenger: Boolean!
"When was the last contribution for requester (hack for curate bot)"
lastFundedRequester: BigInt!
"When was the last contribution for challenger (hack for curate bot)"
lastFundedChallenger: BigInt!
"Sum of reimbursable fees and stake rewards available to the parties that made contributions to the side that ultimately wins a dispute."
feeRewards: BigInt!
"The request to which this round belongs."
request: LRequest!
"The time the appeal period starts, if in the appeal period."
appealPeriodStart: BigInt!
"The time the appeal period ends, if in the appeal period."
appealPeriodEnd: BigInt!
"The time the round received the ruling."
rulingTime: BigInt!
"The ruling given by the arbitrator."
ruling: Ruling!
"The tx hash of the moment appealing became possible"
txHashAppealPossible: Bytes
"The tx hash of the moment the round was appealed"
txHashAppealDecision: Bytes
"The moment the round was created."
creationTime: BigInt!
"The contributions made to this round."
contributions: [LContribution!]! @derivedFrom(field: "round")
"The number of contributions made to this round"
numberOfContributions: BigInt!
"Whether this round was appealed."
appealed: Boolean!
"When this round was appealed, if it was appealed"
appealedAt: BigInt
}
type LContribution @entity {
"The contribution ID."
id: ID!
"The round the contribution was made to."
round: LRound!
"The address that made the contribution."
contributor: Bytes!
"Whether there are any withdrawable contributions."
withdrawable: Boolean!
"To which side the contribution was made."
side: BigInt!
}
type Round @entity {
"<itemID>-<requestID>-<roundID>"
id: ID!
"The total amount of appeal fees contributed to the requester in this round."
amountPaidRequester: BigInt!
"The total amount of appeal fees contributed to the challenger in this round."
amountPaidChallenger: BigInt!
"Whether the requester is fully funded."
hasPaidRequester: Boolean!
"Whether the challenger is fully funded."
hasPaidChallenger: Boolean!
"Sum of reimbursable fees and stake rewards available to the parties that made contributions to the side that ultimately wins a dispute."
feeRewards: BigInt!
"The request to which this round belongs."
request: Request!
"The time the appeal period starts, if in the appeal period."
appealPeriodStart: BigInt!
"The time the appeal period ends, if in the appeal period."
appealPeriodEnd: BigInt!
"The time the round received the ruling."
rulingTime: BigInt!
"The ruling given by the arbitrator."
ruling: Ruling!
"The tx hash of the moment appealing became possible"
txHashAppealPossible: Bytes
"The tx hash of the moment the round was appealed"
txHashAppealDecision: Bytes
"The moment the round was created."
creationTime: BigInt!
"Whether this round was appealed"
appealed: Boolean!
"When this round was appealed, if it was appealed"
appealedAt: BigInt
}
type Item @entity {
"The id of the item in the subgraph entity. Format: <itemID>@<listaddress_lowercase>"
id: ID!
"The ID of the item in the registry. Also the keccak256 hash of the data."
itemID: Bytes!
"The data describing the item."
data: Bytes!
"The current status of the item."
status: Status!
"List of status change requests made for the item in the form requests[requestID]."
requests: [Request!]! @derivedFrom(field: "item")
"The total number of requests for this item."
numberOfRequests: BigInt!
"The registry where this item was submitted."
registry: Registry!
"The address of the registry this item was submitted. Redundant with registry field to allow use in conditionals."
registryAddress: Bytes!
"Time when the latest request was made."
latestRequestSubmissionTime: BigInt!
"The time the latest request was resolved."
latestRequestResolutionTime: BigInt!
"Whether the item is currently disputed."
disputed: Boolean!
"The account that made the latest request to the item."
latestRequester: Bytes!
"The account that challenged the latest request, if any."
latestChallenger: Bytes!
}
type Request @entity {
"<itemID>-<requestId>"
id: ID!
"True if a dispute was raised."
disputed: Boolean!
"ID of the dispute, if any."
disputeID: BigInt!
"Time when the request was made. Used to track when the challenge period ends."
submissionTime: BigInt!
"True if the request was executed and/or any raised disputes were resolved."
resolved: Boolean!
"The address of the party that made a request"
requester: Bytes!
"The address of the party that challenged the request"
challenger: Bytes!
"The arbitrator trusted to solve disputes for this request."
arbitrator: Bytes!
"The extra data for the trusted arbitrator of this request."
arbitratorExtraData: Bytes!
"The deposit that would be awarded to the challenger if challenge is successful"
deposit: BigInt!
"The outcome of the dispute, if any. Note that unsuccessful appeal fundings can invert the arbitrator ruling (so this may differ from the ruling given by the arbitrator)."
disputeOutcome: Ruling!
"Tracks each round of a dispute in the form rounds[roundID]."
rounds: [Round!]! @derivedFrom(field: "request")
"The evidence group for this request."
evidenceGroup: EvidenceGroup!
"The total number of rounds on this request."
numberOfRounds: BigInt!
"Whether it was requested to add or remove the item to/from the list."
requestType: Status!
"The URI to the meta evidence used for this request."
metaEvidence: MetaEvidence!
"The item this request belongs to."
item: Item!
"The registry where this request was submitted."
registry: Registry!
"The address of the registry this item was submitted. Redundant with registry field to allow use in conditionals."
registryAddress: Bytes!
"The time the request was resolved."
resolutionTime: BigInt!
"Only set if the request was settled by a dispute. Used by the twitter bot"
finalRuling: BigInt
"The hash of the transaction that created this request."
creationTx: Bytes!
"The hash of the transaction that solved this request."
resolutionTx: Bytes
}
type HasPaidAppealFee @entity {
"<itemID>-<requestID>-<roundID>-<side>"
id: ID!
item: Item!
request: Request!
round: Round!
"Side the fund is in favor of"
side: BigInt!
"Timestamp of the event"
timestamp: BigInt!
}