forked from 1Hive/honeyfarm-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
197 lines (134 loc) · 3.02 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# HoneyFarm
type HoneyFarm @entity {
# Contract address
id: ID!
# Owner
owner: Bytes!
# StartTime
startTime: BigInt!
# EndTime
endTime: BigInt!
# the negative slope of the distribution line scaled by SCALE, how much
# less is being distributed per unit of time.
distributionSlope: BigInt!
#starting distribution rate / unit time scaled by SCALE
startDistribution: BigInt!
# minimum time someone can lock their liquidity for
minTimeLock: BigInt!
# maximum time someone can lock their liquidity for
maxTimeLock: BigInt!
# multiplier for time locked deposits / second locked scaled by SCALE
timeLockMultiplier: BigInt!
# constant added to the timeLockMultiplier scaled by SCALE
timeLockConstant: BigInt!
# One time fee that is deducted from time-locked deposits given to whoever
# downgrades it, scaled by SCALE
#downgradeFee: BigInt!
# whether this contract has been disabled
#contractDisabledAt: BigInt!
# What fractional numbers are scaled by
scale: BigInt!
# xComb/HSF
hsf: Bytes!
# Total HSF supply
totalHsf: BigInt!
# Total allocation point
totalAllocPoint: BigInt!
# Pools
pools: [Pool!]! @derivedFrom(field: "owner")
# Pool count
poolCount: BigInt!
# History
history: [History!]! @derivedFrom(field: "owner")
# Upated at
updatedAt: BigInt!
}
type History @entity {
# HoneyFarm id concatenated with timestamp
id: ID!
# Owner (HoneyFarm, Pool, or User).
owner: HoneyFarm!
# Timestamp
timestamp: BigInt!
# Block
block: BigInt!
}
# Pool
type Pool @entity {
# Address of pool token
id: ID!
# Owner
owner: HoneyFarm!
# Pool token balance
balance: BigInt!
# Deposit count
openDepositCount: BigInt!
# How many allocation points assigned to this pool.
allocPoint: BigInt!
# Last block timestamp that HSFs distribution occured
lastRewardTimestamp: BigInt!
# Accumulated HSFs per share, times SCALE.
accHsfPerShare: BigInt!
# total shares stored in pool
totalShares: BigInt!
# Pool deposits
deposits: [Deposit!]! @derivedFrom(field: "pool")
# Timestamp
timestamp: BigInt!
# Block
block: BigInt!
# Upated at
updatedAt: BigInt!
}
type User @entity {
# User address
id: ID!
# Pool users
deposits: [Deposit!]! @derivedFrom(field: "user")
# Amount
amount: BigInt!
# Reward debt
rewardDebt: BigInt!
# Timestamp
timestamp: BigInt!
# Block
block: BigInt!
}
type Deposit @entity {
# Deposit id
id: ID!
# User address
user: User
# Related pool
pool: Pool
# Amount
amount: BigInt!
# Reward debt
rewardDebt: BigInt!
# Unlock time
unlockTime: BigInt!
# Reward share
rewardShare: BigInt!
# Set rewards
setRewards: BigInt!
# referrer
referrer: Bytes!
# Timestamp
timestamp: BigInt!
# Block
block: BigInt!
# Status
status: DepositStatus!
}
type HsfToken @entity {
# Deposit id
id: ID!
totalSupply: BigInt!
totalHsfHarvested: BigInt!
totalHsfClaimed: BigInt!
totalHsfBurned: BigInt!
}
enum DepositStatus {
Open,
Closed
}