This repository has been archived by the owner on Mar 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
332 lines (293 loc) · 5.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
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
type DaoAddressSet @entity {
id: ID!
daoAddress: Bytes!
}
type DaoFeeSet @entity {
id: ID!
numerator: BigInt!
denominator: BigInt!
}
type ExitCooldownSet @entity {
id: ID!
cooldown: BigInt!
}
type ExitFeeSet @entity {
id: ID!
numerator: BigInt!
denominator: BigInt!
}
type FundCreated @entity {
id: ID!
fundAddress: Bytes!
isPoolPrivate: Boolean!
fundName: String!
managerName: String!
manager: Bytes!
time: BigInt!
performanceFeeNumerator: BigInt!
managerFeeNumerator: BigInt!
managerFeeDenominator: BigInt!
uniqueManager: Manager!
}
type LogUpgrade @entity {
id: ID!
manager: Bytes!
pool: Bytes!
}
type MaximumSupportedAssetCountSet @entity {
id: ID!
count: BigInt!
}
type OwnershipTransferred @entity {
id: ID!
previousOwner: Bytes!
newOwner: Bytes!
}
type Paused @entity {
id: ID!
account: Bytes!
}
type ProxyCreated @entity {
id: ID!
proxy: Bytes!
}
type SetManagerFeeNumeratorChangeDelay @entity {
id: ID!
delay: BigInt! # uint256
}
type SetAssetHandler @entity {
id: ID!
assetHandler: Bytes! # address
}
type SetMaximumManagerFee @entity {
id: ID!
numerator: BigInt! # uint256
denominator: BigInt! # uint256
}
type SetMaximumManagerFeeNumeratorChange @entity {
id: ID!
amount: BigInt! # uint256
}
type SetPoolManagerFee @entity {
id: ID!
numerator: BigInt! # uint256
denominator: BigInt! # uint256
}
type SetPoolStorageVersion @entity {
id: ID!
poolStorageVersion: BigInt! # uint256
}
type Unpaused @entity {
id: ID!
account: Bytes!
}
type Approval @entity {
id: ID!
owner: Bytes!
spender: Bytes!
value: BigInt!
}
type Deposit @entity {
id: ID!
fundAddress: Bytes!
investor: Bytes!
assetDeposited: Bytes!
valueDeposited: BigInt!
fundTokensReceived: BigInt!
totalInvestorFundTokens: BigInt!
fundValue: BigInt!
totalSupply: BigDecimal!
time: BigInt!
blockNumber: Int!
poolName: String!
managerName: String!
manager: Bytes
pool: Pool!
uniqueInvestor: Investor!
}
type ManagerFeeMinted @entity {
id: ID!
pool: Bytes!
manager: Bytes!
available: BigInt!
daoFee: BigInt!
managerFee: BigInt!
tokenPriceAtLastFeeMint: BigInt!
block: Int!
}
type PoolManagerLogicSet @entity {
id: ID!
poolManagerLogic: Bytes!
from: Bytes!
}
type PoolPrivacyUpdated @entity {
id: ID!
isPoolPrivate: Boolean!
}
type TransactionExecuted @entity {
id: ID!
pool: Bytes!
manager: Bytes!
transactionType: Int!
time: BigInt!
blockNumber: Int!
poolName: String!
managerName: String!
}
type Transfer @entity {
id: ID!
from: Bytes!
to: Bytes!
value: BigInt!
address: String!
block: Int!
}
type Withdrawal @entity {
id: ID!
fundAddress: Bytes!
investor: Bytes!
valueWithdrawn: BigInt!
fundTokensWithdrawn: BigInt!
totalInvestorFundTokens: BigInt!
fundValue: BigInt!
totalSupply: BigDecimal!
time: BigInt!
block: Int!
poolName: String!
managerName: String!
pool: Pool!
assetsWithdrawn: [AssetsWithdrawn!]! @derivedFrom(field: "withdrawal")
uniqueInvestor: Investor!
}
type AssetsWithdrawn @entity {
id: ID!
asset: Bytes!
name: String!
amount: BigDecimal!
withdrawProcessed: Boolean!
withdrawal: Withdrawal!
}
type Exchange @entity {
id: ID!
fundAddress: Bytes!
sourceAsset: Bytes!
sourceAmount: BigInt!
dstAsset: Bytes!
time: BigInt!
pool: Pool!
}
type Pool @entity {
id: ID!
fundAddress: Bytes!
name: String!
manager: Bytes # optional
managerName: String!
totalSupply: BigDecimal!
decimals: BigInt # optional
deposits: [Deposit!]! @derivedFrom(field: "pool")
withdrawals: [Withdrawal!]! @derivedFrom(field: "pool")
exchanges: [Exchange!]! @derivedFrom(field: "pool")
assets: [Asset!]! @derivedFrom(field: "pool")
tokenPrice: BigInt! # uint256
}
type Asset @entity {
id: ID!
pool: Pool!
time: Int!
block: Int!
name: String!
balance: BigDecimal!
decimals: BigInt!
# value: BigInt! # cant use in Exchange entity..
}
type AddLiquidity @entity {
id: ID!
fundAddress: Bytes!
tokenA: Bytes!
tokenB: Bytes!
pair: Bytes!
amountADesired: BigInt!
amountBDesired: BigInt!
amountAMin: BigInt!
amountBMin: BigInt!
time: BigInt!
block: Int!
pool: Pool!
}
type RemoveLiquidity @entity {
id: ID!
fundAddress: Bytes!
tokenA: Bytes!
tokenB: Bytes!
pair: Bytes!
liquidity: BigInt!
amountAMin: BigInt!
amountBMin: BigInt!
time: BigInt!
block: Int!
}
type Stake @entity {
id: ID!
fundAddress: Bytes!
asset: Bytes!
stakingContract: Bytes!
amount: BigInt!
time: Int!
}
type Unstake @entity {
id: ID!
fundAddress: Bytes!
asset: Bytes!
stakingContract: Bytes!
amount: BigInt!
time: Int!
}
type Claim @entity {
id: ID!
fundAddress: Bytes!
stakingContract: Bytes!
time: Int!
}
type Investor @entity {
id: ID!
investorAddress: Bytes! # address
deposits: [Deposit!]! @derivedFrom(field: "uniqueInvestor")
withdrawals: [Withdrawal!]! @derivedFrom(field: "uniqueInvestor")
}
type Manager @entity {
id: ID!
managerAddress: Bytes! # address
fundCreated: [FundCreated!]! @derivedFrom(field: "uniqueManager")
}
type ExchangeFrom @entity {
id: ID!
fundAddress: Bytes!
sourceAsset: Bytes!
sourceAmount: BigInt! # uint256
dstAsset: Bytes!
time: BigInt!
}
type ExchangeTo @entity {
id: ID!
fundAddress: Bytes!
sourceAsset: Bytes!
dstAsset: Bytes!
dstAmount: BigInt! # uint256
time: BigInt!
}
type JoinPool @entity {
id: ID!
fundAddress: Bytes!
poolId: Bytes! # bytes32?
assets: [Bytes!]!
# maxAmountsIn: [Bytes!]!
time: BigInt!
}
type ExitPool @entity {
id: ID!
fundAddress: Bytes!
poolId: Bytes! # bytes32?
assets: [Bytes!]!
# minAmountsOut: [Bytes!]!
time: BigInt!
}