generated from TomAFrench/subgraph-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
124 lines (113 loc) · 4.85 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
type Distribution @entity {
id: ID! # unique distribution id, distributor + token + distributionId
distributionId: BigInt! # Distribution ID
distributionAmount: BigInt! # The distribution amount, in wei
claimedAmount: BigInt! # The total amount claimed, in wei
unclaimedAmount: BigInt! # The amount unclaimed for this distribution
claimCount: BigInt! # the amount of times a claim was made
createdAt: BigInt! # Timestamp for when the distribution was added
token: String! # Token address
distributor: Bytes!
transactionHash: Bytes! # transaction hash for when the distribution was added
}
type Distributor @entity {
id: ID! # The distributor id
distributionCount: BigInt! # The number of distributions
distributionAmount: BigInt! # The amount of distributions made
claimedAmount: BigInt! # The amount of distributions claimed
claimedCount: BigInt! # The number of claims made
unclaimedAmount: BigInt! # The amount unclaimed for this distributor
}
type Token @entity {
id: ID! # The token id, address of token
distributionCount: BigInt! # The number of distributions with this token
distributionAmount: BigInt! # The total value of distributions with this token
claimedAmount: BigInt! # The total claimed amount for this token
unclaimedAmount: BigInt! # The amount unclaimed for this token
claimedCount: BigInt! # The number of times
}
# When a user makes a claim, there can be many claims at the same time.
# This entity is a pointer to all claims that occured.
type ClaimRoot @entity {
id: ID! # The claim transaction id
numClaims: BigInt! # The number of claims made at the same time
amount: BigInt! # The total amount of all claims
claimer: Bytes!
claimCaller: Bytes!
recipient: Bytes!
gasPrice: BigInt! # gas price of the claim
claimedAt: BigInt! # timestamp for the claim being made
}
type Claim @entity {
id: ID! # The claim transaction id, `claimGroupId-index`
claimRootId: Bytes! # The ID of the claim group
index: BigInt! # The index of the claim in the claim group
distributionUniqueId: String! # unique distribution id, distributor + token + distributionId - this maps to Distribution entitity
distributionId: BigInt!
distribution: Distribution!
claimedAmount: BigInt! # The amount claimed, in Wei
claimedAt: BigInt! # Timestamp for when the distribution was claimed
claimer: Bytes!
recipient: Bytes!
claimCaller: Bytes!
token: Bytes! # The token being claimed
distributor: Bytes! # The distributor of the token
type: String! # was the claim made internally, externally or to a contract
}
type Claimer @entity {
id: ID! # The claimer address
claimedCount: BigInt! # Total number of claims made
claimedAmount: BigInt! # Total number of claims by value
lastClaim: BigInt # Timestamp for when the claimer last made a claim
}
type OverallMetric @entity {
id: ID! # zero wallet
distributionCount: BigInt! # total number of distributions
distributionAmount: BigInt! # total value of distributions
claimedAmount: BigInt! # total amount of claims
unclaimedAmount: BigInt! # total amount yet to be claimed
claimedCount: BigInt! # total number of claims
}
type ClaimerSnapshot @entity {
id: ID! # claimerId-date
timestamp: Int! # timestamp representation of date
claimer: Bytes! # Claimer's address
claimedCount: BigInt! # The number of claims made for a given date
claimedAmount: BigInt! # The amount claimed by the claimer for a given day
}
type DistributionSnapshot @entity {
id: ID! # String for distributionId+date
timestamp: Int! # timetsamp representation
distributionUniqueId: String! # unique distribution id, distributor + token + distributionId
distributionId: BigInt!
claimedAmount: BigInt! # the amount of the distribution that was claimed, daily
claimedCount: BigInt! # number of claims
distributionAmount: BigInt! # the amount distributed, daily
distributionCount: BigInt! # number of distributions
}
type DistributorSnapshot @entity {
id: ID! # String for distributorId-date
timestamp: Int!
distributorId: Bytes!
claimedAmount: BigInt! # the amount claimed for this distributor
claimedCount: BigInt! # the number of claims
distributionAmount: BigInt! # the amount distributed for this
distributionCount: BigInt! # the number of distributions
}
type TokenSnapshot @entity {
id: ID! # string token-date
timestamp: Int!
token: Bytes! # address for token
claimedAmount: BigInt! # amount that has been claimed
claimedCount: BigInt! # the number of claims
distributionAmount: BigInt! # amount that has been distributed
distributionCount: BigInt! # the number of distributions
}
type OverallMetricSnapshot @entity {
id: ID! # date
timestamp: Int!
claimedAmount: BigInt! # the total value of claims
claimedCount: BigInt! # the number of claims
distributionAmount: BigInt! # the total amount of distributions
distributionCount: BigInt! # the number of distributions
}