forked from AndreiMVP/kleros-display-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.graphql
84 lines (76 loc) · 1.53 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
enum Period {
EVIDENCE
COMMIT
VOTE
APPEAL
EXECUTED
}
type ArbitrableHistory @entity {
id: Bytes!
metaEvidence: String!
disputes: [Dispute!]! @derivedFrom(field: "arbitrableHistory")
}
type Dispute @entity {
id: ID!
arbitrated: Bytes!
metaEvidenceId: BigInt!
arbitrableHistory: ArbitrableHistory
ruling: BigInt!
ruled: Boolean!
period: Period!
createdAtBlock: BigInt!
lastPeriodChange: BigInt!
nbChoices: BigInt!
nbRounds: BigInt!
rounds: [Round!]! @derivedFrom(field: "dispute")
evidenceGroup: EvidenceGroup! @derivedFrom(field: "dispute")
}
type Round @entity {
id: Bytes!
dispute: Dispute!
jurors: [Bytes!]!
}
type Draw @entity {
"disputeID-appeal-voteID"
id: ID!
"Lucky juror who got drawn"
address: Bytes!
"Number of the round"
appeal: BigInt!
"Number of the dispute"
disputeID: BigInt!
"Number of the vote"
voteID: BigInt!
}
type TokenAndETHShift @entity {
"disputeId-address-(discriminator)"
id: ID!
ETHAmount: BigInt!
address: Bytes!
disputeID: BigInt!
tokenAmount: BigInt!
}
type StakeSet @entity {
"address-subcourtId-(discriminator)"
id: ID!
address: Bytes!
subcourtID: BigInt!
stake: BigInt!
newTotalStake: BigInt!
timestamp: BigInt!
blocknumber: BigInt!
logIndex: BigInt!
}
type EvidenceGroup @entity {
id: Bytes!
dispute: Dispute
length: BigInt!
evidence: [Evidence!]! @derivedFrom(field: "group")
}
type Evidence @entity(immutable: true) {
id: Bytes!
group: EvidenceGroup!
creationTime: BigInt!
URI: String!
sender: Bytes!
}