-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathschema.graphql
More file actions
60 lines (57 loc) · 1.42 KB
/
schema.graphql
File metadata and controls
60 lines (57 loc) · 1.42 KB
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
type Listing @entity {
id: ID! # listingHash
owner: User!
whitelisted: Boolean!
wasRemoved: Boolean!
wasWithdrawn: Boolean!
deposit: BigInt!
applicationExpiry: BigInt!
data: String
}
type Challenge @entity {
id: ID! # challengeID
listing: Listing
status: String! # one of "Pending", "Voting", "Revealing", "Successful", "Failed"
createdAtTimestamp: BigInt
creator: User
stake: BigInt
resolved: Boolean!
voteCommitEndTimestamp: BigInt!
voteRevealEndTimestamp: BigInt!
quorumRequired: BigInt!
totalNumberOfVotesCommitted: BigInt
totalNumberOfVotesRevealed: BigInt
totalVotesCommitted: BigInt
totalVotesRevealed: BigInt
totalNumberOfVotesFor: BigInt!
totalVotesFor: BigInt!
totalNumberOfVotesAgainst: BigInt!
totalVotesAgainst: BigInt!
votes: [Vote!]
committedUsers: [User!]
revealedUsers: [User!]
rewardPool: BigInt!
data: String
}
type User @entity {
id: ID! # ethereum address of user
numChallenges: BigInt!
numListingApplications: BigInt!
numListingsWhitelisted: BigInt!
numVotesCommitted: BigInt!
numVotesRevealed: BigInt!
totalAmountStaked: BigInt!
totalMapRewards: BigInt!
}
type Vote @entity {
id: ID! # challengeId + '_' + ethereum address of user
challenge: Challenge!
voter: User!
isRevealed: Boolean!
isChallengeResolved: Boolean!
isForChallenge: Boolean
voteAmount: BigInt!
wonChallenge: Boolean
rewardAmount: BigInt
rewardClaimed: Boolean!
}