-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
105 lines (88 loc) · 1.63 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
type KlerosStat @entity {
id: ID!
courtCount: BigInt!
disputeCount: BigInt!
activeDisputeCount: BigInt!
uniqueJurorCount: BigInt!
uniqueArbitrableCount: BigInt!
phase: Phase
}
type Court @entity {
id: ID!
subcourtID: BigInt!
parent: Court
hiddenVotes: Boolean!
minStake: BigInt!
alpha: BigInt!
feeForJuror: BigInt!
jurorsForCourtJump: BigInt!
timesPerPeriod: [BigInt!]!
children: [Court!]!
disputeCount: BigInt!
}
type Dispute @entity {
id: ID!
disputeID: BigInt!
arbitrable: Arbitrable! # address
subcourt: Court!
numberOfChoices: BigInt!
period: Period!
lastPeriodChange: BigInt!
drawsInRound: BigInt!
commitsInRound: BigInt!
ruled: Boolean!
latestRound: BigInt!
rounds: [DisputeRound!] ! @derivedFrom(field: "dispute")
}
type Juror @entity {
id: ID!
subCourts: [Court!]!
stakedToken: BigInt!
# lockedToken: BigInt!
jurorStakes: [JurorStake!] ! @derivedFrom(field: "juror")
}
type JurorStake @entity {
id: ID!
juror: Juror!
subcourt: Court!
stakedToken: BigInt!
}
type Policy @entity {
id: ID!
subcourtID: BigInt!
policy: String!
}
type Arbitrable @entity {
id: ID!
disputeCount: BigInt!
}
type DisputeRound @entity {
id: ID!
dispute: Dispute!
round: BigInt!
voteCount: BigInt!
winningChoice: BigInt
tied: Boolean!
castedVoteCounts: [BigInt!]!
votes: [Vote!] ! @derivedFrom(field: "disputeRound")
}
type Vote @entity {
id: ID!
disputeRound: DisputeRound!
juror: Juror!
voted: Boolean!
commit: Bytes
choice: BigInt
}
enum Period {
Evidence,
Commit,
Vote,
Appeal,
Execution
}
enum Phase {
Staking,
Generating,
Drawing
}