-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
59 lines (42 loc) · 1.24 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
type User @entity {
" accountAddress "
id: ID!
" balances for all rewards held by the user "
balances: [AccountBalance!]! @derivedFrom(field: "user")
}
type Reward @entity {
" tokenAddress-tokenId "
id: ID!
" IPFS uri containing metadata "
metadataUri: String!
" contract address "
tokenAddress: String!
" tokenId representing the reward "
tokenId: BigInt!
" total number of issued tokens for this reward "
supply: BigInt!
" name as defined in metadata "
name: String
" description as defined in metadata "
description: String
" link to the image as defined in metadata "
image: String
" account balances for this reward "
balances: [AccountBalance!]! @derivedFrom(field: "reward")
}
type AccountBalance @entity {
" rewardId-userId "
id: ID!
" user whose balance is tracked "
user: User!
" token for which balance is tracked "
reward: Reward!
" amount of tokens user is whitelisted for, for this reward "
amountWhitelisted: BigInt!
" amount of tokens already claimed "
amountClaimed: BigInt!
" amount of claimable tokens (= whitelisted - claimed)"
amountClaimable: BigInt!
" amount of owned tokens, also includes tokens that were purchased or received "
amountOwned: BigInt!
}