@wildcatfi/wildcat-sdk 3.1.3-beta → 3.1.4-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +15 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +17 -1
- package/dist/constants.js.map +1 -1
- package/dist/gql/document-selectors.d.ts +8 -0
- package/dist/gql/document-selectors.d.ts.map +1 -0
- package/dist/gql/document-selectors.js +18 -0
- package/dist/gql/document-selectors.js.map +1 -0
- package/dist/gql/getLenderAccountsForAllMarkets.d.ts.map +1 -1
- package/dist/gql/getLenderAccountsForAllMarkets.js +2 -2
- package/dist/gql/getLenderAccountsForAllMarkets.js.map +1 -1
- package/dist/gql/getMarket.d.ts.map +1 -1
- package/dist/gql/getMarket.js +2 -2
- package/dist/gql/getMarket.js.map +1 -1
- package/dist/gql/getMarketRecords.d.ts.map +1 -1
- package/dist/gql/getMarketRecords.js +27 -22
- package/dist/gql/getMarketRecords.js.map +1 -1
- package/dist/gql/getMarketsForBorrower.d.ts.map +1 -1
- package/dist/gql/getMarketsForBorrower.js +2 -2
- package/dist/gql/getMarketsForBorrower.js.map +1 -1
- package/dist/gql/getMarketsWithEvents.d.ts.map +1 -1
- package/dist/gql/getMarketsWithEvents.js +2 -2
- package/dist/gql/getMarketsWithEvents.js.map +1 -1
- package/dist/gql/getPolicyMarketsAndLenders.d.ts.map +1 -1
- package/dist/gql/getPolicyMarketsAndLenders.js +2 -2
- package/dist/gql/getPolicyMarketsAndLenders.js.map +1 -1
- package/dist/gql/index.d.ts +1 -0
- package/dist/gql/index.d.ts.map +1 -1
- package/dist/gql/index.js +1 -0
- package/dist/gql/index.js.map +1 -1
- package/dist/gql/legacy-documents.d.ts +12 -0
- package/dist/gql/legacy-documents.d.ts.map +1 -0
- package/dist/gql/legacy-documents.js +1047 -0
- package/dist/gql/legacy-documents.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,1047 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LegacyMarketDataWithEventsFragmentDoc = exports.LegacyMarketDataFragmentDoc = exports.LegacyGetAccountsWhereLenderAuthorizedOrActiveDocument = exports.LegacyGetLenderAccountWithMarketDocument = exports.LegacyGetAllMarketsDocument = exports.LegacyGetMarketsAndLendersByHooksInstanceOrControllerDocument = exports.LegacyGetAllMarketsForLenderViewDocument = exports.LegacyGetMarketEventsDocument = exports.LegacyGetMarketDocument = exports.LegacyGetMarketsWithEventsDocument = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
const LegacyTokenDataFragmentDoc = (0, client_1.gql) `
|
|
6
|
+
fragment LegacyTokenData on Token {
|
|
7
|
+
id
|
|
8
|
+
address
|
|
9
|
+
name
|
|
10
|
+
symbol
|
|
11
|
+
decimals
|
|
12
|
+
isMock
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
const LegacyRoleProviderDataFragmentDoc = (0, client_1.gql) `
|
|
16
|
+
fragment LegacyRoleProviderData on RoleProvider {
|
|
17
|
+
id
|
|
18
|
+
providerAddress
|
|
19
|
+
timeToLive
|
|
20
|
+
isPullProvider
|
|
21
|
+
pullProviderIndex
|
|
22
|
+
isPushProvider
|
|
23
|
+
pushProviderIndex
|
|
24
|
+
isApproved
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
const LegacyLenderHooksAccessDataFragmentDoc = (0, client_1.gql) `
|
|
28
|
+
fragment LegacyLenderHooksAccessData on LenderHooksAccess {
|
|
29
|
+
id
|
|
30
|
+
lender
|
|
31
|
+
isBlockedFromDeposits
|
|
32
|
+
lastProvider {
|
|
33
|
+
...LegacyRoleProviderData
|
|
34
|
+
}
|
|
35
|
+
canRefresh
|
|
36
|
+
lastApprovalTimestamp
|
|
37
|
+
addedTimestamp
|
|
38
|
+
}
|
|
39
|
+
${LegacyRoleProviderDataFragmentDoc}
|
|
40
|
+
`;
|
|
41
|
+
const LegacyLenderPropertiesFragmentDoc = (0, client_1.gql) `
|
|
42
|
+
fragment LegacyLenderProperties on LenderAccount {
|
|
43
|
+
id
|
|
44
|
+
address
|
|
45
|
+
scaledBalance
|
|
46
|
+
role
|
|
47
|
+
totalDeposited
|
|
48
|
+
lastScaleFactor
|
|
49
|
+
lastUpdatedTimestamp
|
|
50
|
+
totalInterestEarned
|
|
51
|
+
numPendingWithdrawalBatches
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
const LegacyDepositDataFragmentDoc = (0, client_1.gql) `
|
|
55
|
+
fragment LegacyDepositData on Deposit {
|
|
56
|
+
id
|
|
57
|
+
eventIndex
|
|
58
|
+
account {
|
|
59
|
+
address
|
|
60
|
+
}
|
|
61
|
+
assetAmount
|
|
62
|
+
scaledAmount
|
|
63
|
+
blockNumber
|
|
64
|
+
blockTimestamp
|
|
65
|
+
transactionHash
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
const LegacyAccountDataForLenderViewFragmentDoc = (0, client_1.gql) `
|
|
69
|
+
fragment LegacyAccountDataForLenderView on LenderAccount {
|
|
70
|
+
...LegacyLenderProperties
|
|
71
|
+
controllerAuthorization {
|
|
72
|
+
authorized
|
|
73
|
+
}
|
|
74
|
+
hooksAccess {
|
|
75
|
+
...LegacyLenderHooksAccessData
|
|
76
|
+
}
|
|
77
|
+
knownLenderStatus {
|
|
78
|
+
id
|
|
79
|
+
}
|
|
80
|
+
deposits(
|
|
81
|
+
first: $numDeposits
|
|
82
|
+
skip: $skipDeposits
|
|
83
|
+
orderBy: $orderDeposits
|
|
84
|
+
orderDirection: $directionDeposits
|
|
85
|
+
) {
|
|
86
|
+
...LegacyDepositData
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
${LegacyLenderPropertiesFragmentDoc}
|
|
90
|
+
${LegacyLenderHooksAccessDataFragmentDoc}
|
|
91
|
+
${LegacyDepositDataFragmentDoc}
|
|
92
|
+
`;
|
|
93
|
+
const LegacyBasicLenderDataFragmentDoc = (0, client_1.gql) `
|
|
94
|
+
fragment LegacyBasicLenderData on LenderAccount {
|
|
95
|
+
id
|
|
96
|
+
address
|
|
97
|
+
scaledBalance
|
|
98
|
+
addedTimestamp
|
|
99
|
+
role
|
|
100
|
+
controllerAuthorization {
|
|
101
|
+
authorized
|
|
102
|
+
addedTimestamp
|
|
103
|
+
}
|
|
104
|
+
hooksAccess {
|
|
105
|
+
...LegacyLenderHooksAccessData
|
|
106
|
+
}
|
|
107
|
+
knownLenderStatus {
|
|
108
|
+
id
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
${LegacyLenderHooksAccessDataFragmentDoc}
|
|
112
|
+
`;
|
|
113
|
+
const LegacyParameterConstraintsDataFragmentDoc = (0, client_1.gql) `
|
|
114
|
+
fragment LegacyParameterConstraintsData on ParameterConstraints {
|
|
115
|
+
minimumDelinquencyGracePeriod
|
|
116
|
+
maximumDelinquencyGracePeriod
|
|
117
|
+
minimumReserveRatioBips
|
|
118
|
+
maximumReserveRatioBips
|
|
119
|
+
minimumDelinquencyFeeBips
|
|
120
|
+
maximumDelinquencyFeeBips
|
|
121
|
+
minimumWithdrawalBatchDuration
|
|
122
|
+
maximumWithdrawalBatchDuration
|
|
123
|
+
minimumAnnualInterestBips
|
|
124
|
+
maximumAnnualInterestBips
|
|
125
|
+
}
|
|
126
|
+
`;
|
|
127
|
+
const LegacyMinimalControllerDataFragmentDoc = (0, client_1.gql) `
|
|
128
|
+
fragment LegacyMinimalControllerData on Controller {
|
|
129
|
+
id
|
|
130
|
+
borrower
|
|
131
|
+
numMarkets
|
|
132
|
+
controllerFactory {
|
|
133
|
+
id
|
|
134
|
+
constraints {
|
|
135
|
+
...LegacyParameterConstraintsData
|
|
136
|
+
}
|
|
137
|
+
feeRecipient
|
|
138
|
+
protocolFeeBips
|
|
139
|
+
originationFeeAsset {
|
|
140
|
+
...LegacyTokenData
|
|
141
|
+
}
|
|
142
|
+
originationFeeAmount
|
|
143
|
+
}
|
|
144
|
+
archController {
|
|
145
|
+
id
|
|
146
|
+
}
|
|
147
|
+
isRegistered
|
|
148
|
+
}
|
|
149
|
+
${LegacyParameterConstraintsDataFragmentDoc}
|
|
150
|
+
${LegacyTokenDataFragmentDoc}
|
|
151
|
+
`;
|
|
152
|
+
const LegacyHooksTemplateDataFragmentDoc = (0, client_1.gql) `
|
|
153
|
+
fragment LegacyHooksTemplateData on HooksTemplate {
|
|
154
|
+
id
|
|
155
|
+
name
|
|
156
|
+
feeRecipient
|
|
157
|
+
protocolFeeBips
|
|
158
|
+
originationFeeAsset {
|
|
159
|
+
...LegacyTokenData
|
|
160
|
+
}
|
|
161
|
+
originationFeeAmount
|
|
162
|
+
disabled
|
|
163
|
+
}
|
|
164
|
+
${LegacyTokenDataFragmentDoc}
|
|
165
|
+
`;
|
|
166
|
+
const LegacyHooksInstanceDataFragmentDoc = (0, client_1.gql) `
|
|
167
|
+
fragment LegacyHooksInstanceData on HooksInstance {
|
|
168
|
+
id
|
|
169
|
+
borrower
|
|
170
|
+
name
|
|
171
|
+
kind
|
|
172
|
+
numMarkets
|
|
173
|
+
hooksTemplate {
|
|
174
|
+
...LegacyHooksTemplateData
|
|
175
|
+
}
|
|
176
|
+
providers {
|
|
177
|
+
...LegacyRoleProviderData
|
|
178
|
+
}
|
|
179
|
+
eventIndex
|
|
180
|
+
}
|
|
181
|
+
${LegacyHooksTemplateDataFragmentDoc}
|
|
182
|
+
${LegacyRoleProviderDataFragmentDoc}
|
|
183
|
+
`;
|
|
184
|
+
const LegacyHooksConfigDataForMarketFragmentDoc = (0, client_1.gql) `
|
|
185
|
+
fragment LegacyHooksConfigDataForMarket on HooksConfig {
|
|
186
|
+
id
|
|
187
|
+
useOnDeposit
|
|
188
|
+
useOnQueueWithdrawal
|
|
189
|
+
useOnExecuteWithdrawal
|
|
190
|
+
useOnTransfer
|
|
191
|
+
useOnBorrow
|
|
192
|
+
useOnRepay
|
|
193
|
+
useOnCloseMarket
|
|
194
|
+
useOnNukeFromOrbit
|
|
195
|
+
useOnSetMaxTotalSupply
|
|
196
|
+
useOnSetAnnualInterestAndReserveRatioBips
|
|
197
|
+
useOnSetProtocolFeeBips
|
|
198
|
+
depositRequiresAccess
|
|
199
|
+
transferRequiresAccess
|
|
200
|
+
transfersDisabled
|
|
201
|
+
minimumDeposit
|
|
202
|
+
allowForceBuyBacks
|
|
203
|
+
queueWithdrawalRequiresAccess
|
|
204
|
+
fixedTermEndTime
|
|
205
|
+
allowClosureBeforeTerm
|
|
206
|
+
allowTermReduction
|
|
207
|
+
}
|
|
208
|
+
`;
|
|
209
|
+
const LegacyMarketDeployedEventFragmentDoc = (0, client_1.gql) `
|
|
210
|
+
fragment LegacyMarketDeployedEvent on MarketDeployed {
|
|
211
|
+
blockNumber
|
|
212
|
+
blockTimestamp
|
|
213
|
+
transactionHash
|
|
214
|
+
}
|
|
215
|
+
`;
|
|
216
|
+
const LegacyMarketDataFragmentDoc = (0, client_1.gql) `
|
|
217
|
+
fragment LegacyMarketData on Market {
|
|
218
|
+
id
|
|
219
|
+
version
|
|
220
|
+
isRegistered
|
|
221
|
+
isClosed
|
|
222
|
+
controller {
|
|
223
|
+
id
|
|
224
|
+
}
|
|
225
|
+
borrower
|
|
226
|
+
sentinel
|
|
227
|
+
feeRecipient
|
|
228
|
+
name
|
|
229
|
+
symbol
|
|
230
|
+
decimals
|
|
231
|
+
protocolFeeBips
|
|
232
|
+
delinquencyGracePeriod
|
|
233
|
+
delinquencyFeeBips
|
|
234
|
+
withdrawalBatchDuration
|
|
235
|
+
numCollateralContracts
|
|
236
|
+
_asset: asset {
|
|
237
|
+
...LegacyTokenData
|
|
238
|
+
}
|
|
239
|
+
hooksConfig {
|
|
240
|
+
...LegacyHooksConfigDataForMarket
|
|
241
|
+
}
|
|
242
|
+
hooks {
|
|
243
|
+
...LegacyHooksInstanceData
|
|
244
|
+
}
|
|
245
|
+
maxTotalSupply
|
|
246
|
+
pendingProtocolFees
|
|
247
|
+
normalizedUnclaimedWithdrawals
|
|
248
|
+
scaledTotalSupply
|
|
249
|
+
scaledPendingWithdrawals
|
|
250
|
+
pendingWithdrawalExpiry
|
|
251
|
+
isDelinquent
|
|
252
|
+
timeDelinquent
|
|
253
|
+
annualInterestBips
|
|
254
|
+
reserveRatioBips
|
|
255
|
+
scaleFactor
|
|
256
|
+
lastInterestAccruedTimestamp
|
|
257
|
+
originalAnnualInterestBips
|
|
258
|
+
originalReserveRatioBips
|
|
259
|
+
temporaryReserveRatioExpiry
|
|
260
|
+
temporaryReserveRatioActive
|
|
261
|
+
totalBorrowed
|
|
262
|
+
totalRepaid
|
|
263
|
+
totalBaseInterestAccrued
|
|
264
|
+
totalDelinquencyFeesAccrued
|
|
265
|
+
totalProtocolFeesAccrued
|
|
266
|
+
totalDeposited
|
|
267
|
+
eventIndex
|
|
268
|
+
deployedEvent {
|
|
269
|
+
...LegacyMarketDeployedEvent
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
${LegacyTokenDataFragmentDoc}
|
|
273
|
+
${LegacyHooksConfigDataForMarketFragmentDoc}
|
|
274
|
+
${LegacyHooksInstanceDataFragmentDoc}
|
|
275
|
+
${LegacyMarketDeployedEventFragmentDoc}
|
|
276
|
+
`;
|
|
277
|
+
exports.LegacyMarketDataFragmentDoc = LegacyMarketDataFragmentDoc;
|
|
278
|
+
const LegacyBorrowDataFragmentDoc = (0, client_1.gql) `
|
|
279
|
+
fragment LegacyBorrowData on Borrow {
|
|
280
|
+
eventIndex
|
|
281
|
+
assetAmount
|
|
282
|
+
blockNumber
|
|
283
|
+
blockTimestamp
|
|
284
|
+
transactionHash
|
|
285
|
+
}
|
|
286
|
+
`;
|
|
287
|
+
const LegacyRepaymentDataFragmentDoc = (0, client_1.gql) `
|
|
288
|
+
fragment LegacyRepaymentData on DebtRepaid {
|
|
289
|
+
eventIndex
|
|
290
|
+
from
|
|
291
|
+
assetAmount
|
|
292
|
+
blockNumber
|
|
293
|
+
blockTimestamp
|
|
294
|
+
transactionHash
|
|
295
|
+
}
|
|
296
|
+
`;
|
|
297
|
+
const LegacyFeesCollectedDataFragmentDoc = (0, client_1.gql) `
|
|
298
|
+
fragment LegacyFeesCollectedData on FeesCollected {
|
|
299
|
+
eventIndex
|
|
300
|
+
feesCollected
|
|
301
|
+
blockNumber
|
|
302
|
+
blockTimestamp
|
|
303
|
+
transactionHash
|
|
304
|
+
}
|
|
305
|
+
`;
|
|
306
|
+
const LegacyMarketRecordsFragmentDoc = (0, client_1.gql) `
|
|
307
|
+
fragment LegacyMarketRecords on Market {
|
|
308
|
+
depositRecords(
|
|
309
|
+
first: $numDeposits
|
|
310
|
+
skip: $skipDeposits
|
|
311
|
+
orderBy: $orderDeposits
|
|
312
|
+
orderDirection: $directionDeposits
|
|
313
|
+
) {
|
|
314
|
+
...LegacyDepositData
|
|
315
|
+
}
|
|
316
|
+
borrowRecords(
|
|
317
|
+
first: $numBorrows
|
|
318
|
+
skip: $skipBorrows
|
|
319
|
+
orderBy: $orderBorrows
|
|
320
|
+
orderDirection: $directionBorrows
|
|
321
|
+
) {
|
|
322
|
+
...LegacyBorrowData
|
|
323
|
+
}
|
|
324
|
+
feeCollectionRecords(
|
|
325
|
+
first: $numFeeCollections
|
|
326
|
+
skip: $skipFeeCollections
|
|
327
|
+
orderBy: $orderFeeCollections
|
|
328
|
+
orderDirection: $directionFeeCollections
|
|
329
|
+
) {
|
|
330
|
+
...LegacyFeesCollectedData
|
|
331
|
+
}
|
|
332
|
+
repaymentRecords(
|
|
333
|
+
first: $numRepayments
|
|
334
|
+
skip: $skipRepayments
|
|
335
|
+
orderBy: $orderRepayments
|
|
336
|
+
orderDirection: $directionRepayments
|
|
337
|
+
) {
|
|
338
|
+
...LegacyRepaymentData
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
${LegacyDepositDataFragmentDoc}
|
|
342
|
+
${LegacyBorrowDataFragmentDoc}
|
|
343
|
+
${LegacyFeesCollectedDataFragmentDoc}
|
|
344
|
+
${LegacyRepaymentDataFragmentDoc}
|
|
345
|
+
`;
|
|
346
|
+
const LegacyMarketDataWithEventsFragmentDoc = (0, client_1.gql) `
|
|
347
|
+
fragment LegacyMarketDataWithEvents on Market {
|
|
348
|
+
...LegacyMarketData
|
|
349
|
+
...LegacyMarketRecords @skip(if: $shouldSkipRecords)
|
|
350
|
+
}
|
|
351
|
+
${LegacyMarketDataFragmentDoc}
|
|
352
|
+
${LegacyMarketRecordsFragmentDoc}
|
|
353
|
+
`;
|
|
354
|
+
exports.LegacyMarketDataWithEventsFragmentDoc = LegacyMarketDataWithEventsFragmentDoc;
|
|
355
|
+
const LegacyDelinquencyStatusChangedDataFragmentDoc = (0, client_1.gql) `
|
|
356
|
+
fragment LegacyDelinquencyStatusChangedData on DelinquencyStatusChanged {
|
|
357
|
+
id
|
|
358
|
+
eventIndex
|
|
359
|
+
isDelinquent
|
|
360
|
+
liquidityCoverageRequired
|
|
361
|
+
totalAssets
|
|
362
|
+
blockNumber
|
|
363
|
+
blockTimestamp
|
|
364
|
+
transactionHash
|
|
365
|
+
}
|
|
366
|
+
`;
|
|
367
|
+
const LegacyAnnualInterestBipsUpdatedDataFragmentDoc = (0, client_1.gql) `
|
|
368
|
+
fragment LegacyAnnualInterestBipsUpdatedData on AnnualInterestBipsUpdated {
|
|
369
|
+
eventIndex
|
|
370
|
+
oldAnnualInterestBips
|
|
371
|
+
newAnnualInterestBips
|
|
372
|
+
blockNumber
|
|
373
|
+
blockTimestamp
|
|
374
|
+
transactionHash
|
|
375
|
+
}
|
|
376
|
+
`;
|
|
377
|
+
const LegacyMaxTotalSupplyUpdatedDataFragmentDoc = (0, client_1.gql) `
|
|
378
|
+
fragment LegacyMaxTotalSupplyUpdatedData on MaxTotalSupplyUpdated {
|
|
379
|
+
eventIndex
|
|
380
|
+
oldMaxTotalSupply
|
|
381
|
+
newMaxTotalSupply
|
|
382
|
+
blockNumber
|
|
383
|
+
blockTimestamp
|
|
384
|
+
transactionHash
|
|
385
|
+
}
|
|
386
|
+
`;
|
|
387
|
+
const LegacyWithdrawalRequestPropertiesFragmentDoc = (0, client_1.gql) `
|
|
388
|
+
fragment LegacyWithdrawalRequestProperties on WithdrawalRequest {
|
|
389
|
+
id
|
|
390
|
+
eventIndex
|
|
391
|
+
requestIndex
|
|
392
|
+
account {
|
|
393
|
+
address
|
|
394
|
+
}
|
|
395
|
+
scaledAmount
|
|
396
|
+
normalizedAmount
|
|
397
|
+
blockNumber
|
|
398
|
+
blockTimestamp
|
|
399
|
+
transactionHash
|
|
400
|
+
}
|
|
401
|
+
`;
|
|
402
|
+
const LegacyForceBuyBackDataFragmentDoc = (0, client_1.gql) `
|
|
403
|
+
fragment LegacyForceBuyBackData on ForceBuyBack {
|
|
404
|
+
id
|
|
405
|
+
account {
|
|
406
|
+
address
|
|
407
|
+
}
|
|
408
|
+
eventIndex
|
|
409
|
+
withdrawalExpiry
|
|
410
|
+
scaledAmount
|
|
411
|
+
normalizedAmount
|
|
412
|
+
blockNumber
|
|
413
|
+
blockTimestamp
|
|
414
|
+
transactionHash
|
|
415
|
+
}
|
|
416
|
+
`;
|
|
417
|
+
const LegacyMinimumDepositUpdatedDataFragmentDoc = (0, client_1.gql) `
|
|
418
|
+
fragment LegacyMinimumDepositUpdatedData on MinimumDepositUpdated {
|
|
419
|
+
id
|
|
420
|
+
eventIndex
|
|
421
|
+
oldMinimumDeposit
|
|
422
|
+
newMinimumDeposit
|
|
423
|
+
blockNumber
|
|
424
|
+
blockTimestamp
|
|
425
|
+
transactionHash
|
|
426
|
+
}
|
|
427
|
+
`;
|
|
428
|
+
const LegacyProtocolFeeBipsUpdatedDataFragmentDoc = (0, client_1.gql) `
|
|
429
|
+
fragment LegacyProtocolFeeBipsUpdatedData on ProtocolFeeBipsUpdated {
|
|
430
|
+
id
|
|
431
|
+
protocolFeeBipsUpdatedIndex
|
|
432
|
+
eventIndex
|
|
433
|
+
oldProtocolFeeBips
|
|
434
|
+
newProtocolFeeBips
|
|
435
|
+
blockNumber
|
|
436
|
+
blockTimestamp
|
|
437
|
+
transactionHash
|
|
438
|
+
}
|
|
439
|
+
`;
|
|
440
|
+
const LegacyDisabledForceBuyBacksDataFragmentDoc = (0, client_1.gql) `
|
|
441
|
+
fragment LegacyDisabledForceBuyBacksData on DisabledForceBuyBacks {
|
|
442
|
+
id
|
|
443
|
+
blockNumber
|
|
444
|
+
blockTimestamp
|
|
445
|
+
transactionHash
|
|
446
|
+
eventIndex
|
|
447
|
+
}
|
|
448
|
+
`;
|
|
449
|
+
const LegacyFixedTermUpdatedDataFragmentDoc = (0, client_1.gql) `
|
|
450
|
+
fragment LegacyFixedTermUpdatedData on FixedTermUpdated {
|
|
451
|
+
id
|
|
452
|
+
oldFixedTermEndTime
|
|
453
|
+
newFixedTermEndTime
|
|
454
|
+
blockNumber
|
|
455
|
+
blockTimestamp
|
|
456
|
+
transactionHash
|
|
457
|
+
eventIndex
|
|
458
|
+
fixedTermUpdatedIndex
|
|
459
|
+
}
|
|
460
|
+
`;
|
|
461
|
+
const LegacyMarketClosedDataFragmentDoc = (0, client_1.gql) `
|
|
462
|
+
fragment LegacyMarketClosedData on MarketClosed {
|
|
463
|
+
eventIndex
|
|
464
|
+
blockNumber
|
|
465
|
+
blockTimestamp
|
|
466
|
+
transactionHash
|
|
467
|
+
}
|
|
468
|
+
`;
|
|
469
|
+
const LegacyV1LenderWithActiveMarketsFragmentDoc = (0, client_1.gql) `
|
|
470
|
+
fragment LegacyV1LenderWithActiveMarkets on LenderAuthorization {
|
|
471
|
+
lender
|
|
472
|
+
authorized
|
|
473
|
+
addedTimestamp
|
|
474
|
+
marketAccounts(first: $numMarketAccountsPerLender, skip: $skipMarketAccountsPerLender) {
|
|
475
|
+
role
|
|
476
|
+
market {
|
|
477
|
+
id
|
|
478
|
+
name
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
`;
|
|
483
|
+
const LegacyV2LenderWithActiveMarketsFragmentDoc = (0, client_1.gql) `
|
|
484
|
+
fragment LegacyV2LenderWithActiveMarkets on LenderHooksAccess {
|
|
485
|
+
...LegacyLenderHooksAccessData
|
|
486
|
+
addedTimestamp
|
|
487
|
+
marketAccounts(first: $numMarketAccountsPerLender, skip: $skipMarketAccountsPerLender) {
|
|
488
|
+
knownLenderStatus {
|
|
489
|
+
id
|
|
490
|
+
}
|
|
491
|
+
market {
|
|
492
|
+
id
|
|
493
|
+
name
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
${LegacyLenderHooksAccessDataFragmentDoc}
|
|
498
|
+
`;
|
|
499
|
+
const LegacyControllerAuthorizedLendersWithActiveMarketsFragmentDoc = (0, client_1.gql) `
|
|
500
|
+
fragment LegacyControllerAuthorizedLendersWithActiveMarkets on Controller {
|
|
501
|
+
authorizedLenders(first: $numLenders, skip: $skipLenders, where: $lenderAuthorizationFilter) {
|
|
502
|
+
...LegacyV1LenderWithActiveMarkets
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
${LegacyV1LenderWithActiveMarketsFragmentDoc}
|
|
506
|
+
`;
|
|
507
|
+
const LegacyHooksInstanceLendersWithActiveMarketsFragmentDoc = (0, client_1.gql) `
|
|
508
|
+
fragment LegacyHooksInstanceLendersWithActiveMarkets on HooksInstance {
|
|
509
|
+
lenders(
|
|
510
|
+
first: $numLenders
|
|
511
|
+
skip: $skipLenders
|
|
512
|
+
orderBy: $orderLenderHooksAccess
|
|
513
|
+
orderDirection: $directionLenders
|
|
514
|
+
where: $lenderHooksAccessFilter
|
|
515
|
+
) {
|
|
516
|
+
...LegacyV2LenderWithActiveMarkets
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
${LegacyV2LenderWithActiveMarketsFragmentDoc}
|
|
520
|
+
`;
|
|
521
|
+
exports.LegacyGetMarketsWithEventsDocument = (0, client_1.gql) `
|
|
522
|
+
query legacyGetMarketsWithEvents(
|
|
523
|
+
$marketFilter: Market_filter = { id_not: null }
|
|
524
|
+
$shouldSkipRecords: Boolean = false
|
|
525
|
+
$numMarkets: Int = 1000
|
|
526
|
+
$skipMarkets: Int = 0
|
|
527
|
+
$orderMarkets: Market_orderBy = createdAt
|
|
528
|
+
$directionMarkets: OrderDirection = desc
|
|
529
|
+
$numDeposits: Int = 10
|
|
530
|
+
$skipDeposits: Int = 0
|
|
531
|
+
$orderDeposits: Deposit_orderBy = blockTimestamp
|
|
532
|
+
$directionDeposits: OrderDirection = desc
|
|
533
|
+
$numBorrows: Int = 10
|
|
534
|
+
$skipBorrows: Int = 0
|
|
535
|
+
$orderBorrows: Borrow_orderBy = blockTimestamp
|
|
536
|
+
$directionBorrows: OrderDirection = desc
|
|
537
|
+
$numFeeCollections: Int = 10
|
|
538
|
+
$skipFeeCollections: Int = 0
|
|
539
|
+
$orderFeeCollections: FeesCollected_orderBy = blockTimestamp
|
|
540
|
+
$directionFeeCollections: OrderDirection = desc
|
|
541
|
+
$numRepayments: Int = 10
|
|
542
|
+
$skipRepayments: Int = 0
|
|
543
|
+
$orderRepayments: DebtRepaid_orderBy = blockTimestamp
|
|
544
|
+
$directionRepayments: OrderDirection = desc
|
|
545
|
+
) {
|
|
546
|
+
markets(
|
|
547
|
+
where: $marketFilter
|
|
548
|
+
orderBy: $orderMarkets
|
|
549
|
+
orderDirection: $directionMarkets
|
|
550
|
+
first: $numMarkets
|
|
551
|
+
skip: $skipMarkets
|
|
552
|
+
) {
|
|
553
|
+
...LegacyMarketDataWithEvents
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
${LegacyMarketDataWithEventsFragmentDoc}
|
|
557
|
+
`;
|
|
558
|
+
exports.LegacyGetMarketDocument = (0, client_1.gql) `
|
|
559
|
+
query legacyGetMarket(
|
|
560
|
+
$market: ID!
|
|
561
|
+
$shouldSkipRecords: Boolean = false
|
|
562
|
+
$numDeposits: Int = 10
|
|
563
|
+
$skipDeposits: Int = 0
|
|
564
|
+
$orderDeposits: Deposit_orderBy = blockTimestamp
|
|
565
|
+
$directionDeposits: OrderDirection = desc
|
|
566
|
+
$numBorrows: Int = 10
|
|
567
|
+
$skipBorrows: Int = 0
|
|
568
|
+
$orderBorrows: Borrow_orderBy = blockTimestamp
|
|
569
|
+
$directionBorrows: OrderDirection = desc
|
|
570
|
+
$numFeeCollections: Int = 10
|
|
571
|
+
$skipFeeCollections: Int = 0
|
|
572
|
+
$orderFeeCollections: FeesCollected_orderBy = blockTimestamp
|
|
573
|
+
$directionFeeCollections: OrderDirection = desc
|
|
574
|
+
$numRepayments: Int = 10
|
|
575
|
+
$skipRepayments: Int = 0
|
|
576
|
+
$orderRepayments: DebtRepaid_orderBy = blockTimestamp
|
|
577
|
+
$directionRepayments: OrderDirection = desc
|
|
578
|
+
) {
|
|
579
|
+
market(id: $market) {
|
|
580
|
+
...LegacyMarketDataWithEvents
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
${LegacyMarketDataWithEventsFragmentDoc}
|
|
584
|
+
`;
|
|
585
|
+
exports.LegacyGetMarketEventsDocument = (0, client_1.gql) `
|
|
586
|
+
query legacyGetMarketEvents(
|
|
587
|
+
$market: ID!
|
|
588
|
+
$startEventIndex: Int = 0
|
|
589
|
+
$endEventIndex: Int = 100000000
|
|
590
|
+
$limit: Int = 10
|
|
591
|
+
$delinquencyRecordsFilter: DelinquencyStatusChanged_filter = { id_not: null }
|
|
592
|
+
$borrowRecordsFilter: Borrow_filter = { id_not: null }
|
|
593
|
+
$depositRecordsFilter: Deposit_filter = { id_not: null }
|
|
594
|
+
$feeCollectionRecordsFilter: FeesCollected_filter = { id_not: null }
|
|
595
|
+
$repaymentRecordsFilter: DebtRepaid_filter = { id_not: null }
|
|
596
|
+
$annualInterestBipsUpdatedRecordsFilter: AnnualInterestBipsUpdated_filter = { id_not: null }
|
|
597
|
+
$maxTotalSupplyUpdatedRecordsFilter: MaxTotalSupplyUpdated_filter = { id_not: null }
|
|
598
|
+
$withdrawalRequestRecordsFilter: WithdrawalRequest_filter = { id_not: null }
|
|
599
|
+
$forceBuyBackRecordsFilter: ForceBuyBack_filter = { id_not: null }
|
|
600
|
+
$minimumDepositUpdateRecordsFilter: MinimumDepositUpdated_filter = { id_not: null }
|
|
601
|
+
$protocolFeeBipsUpdatedRecordsFilter: ProtocolFeeBipsUpdated_filter = { id_not: null }
|
|
602
|
+
$fixedTermUpdatedRecordsFilter: FixedTermUpdated_filter = { id_not: null }
|
|
603
|
+
) {
|
|
604
|
+
market(id: $market) {
|
|
605
|
+
marketClosedEvent {
|
|
606
|
+
...LegacyMarketClosedData
|
|
607
|
+
}
|
|
608
|
+
forceBuyBackDisabledRecord {
|
|
609
|
+
...LegacyDisabledForceBuyBacksData
|
|
610
|
+
}
|
|
611
|
+
delinquencyRecords(
|
|
612
|
+
where: {
|
|
613
|
+
and: [
|
|
614
|
+
$delinquencyRecordsFilter
|
|
615
|
+
{ eventIndex_gte: $startEventIndex, eventIndex_lt: $endEventIndex }
|
|
616
|
+
]
|
|
617
|
+
}
|
|
618
|
+
orderBy: eventIndex
|
|
619
|
+
orderDirection: desc
|
|
620
|
+
first: $limit
|
|
621
|
+
) {
|
|
622
|
+
...LegacyDelinquencyStatusChangedData
|
|
623
|
+
}
|
|
624
|
+
borrowRecords(
|
|
625
|
+
where: {
|
|
626
|
+
and: [
|
|
627
|
+
$borrowRecordsFilter
|
|
628
|
+
{ eventIndex_gte: $startEventIndex, eventIndex_lt: $endEventIndex }
|
|
629
|
+
]
|
|
630
|
+
}
|
|
631
|
+
orderBy: eventIndex
|
|
632
|
+
orderDirection: desc
|
|
633
|
+
first: $limit
|
|
634
|
+
) {
|
|
635
|
+
...LegacyBorrowData
|
|
636
|
+
}
|
|
637
|
+
depositRecords(
|
|
638
|
+
where: {
|
|
639
|
+
and: [
|
|
640
|
+
$depositRecordsFilter
|
|
641
|
+
{ eventIndex_gte: $startEventIndex, eventIndex_lt: $endEventIndex }
|
|
642
|
+
]
|
|
643
|
+
}
|
|
644
|
+
orderBy: eventIndex
|
|
645
|
+
orderDirection: desc
|
|
646
|
+
first: $limit
|
|
647
|
+
) {
|
|
648
|
+
...LegacyDepositData
|
|
649
|
+
}
|
|
650
|
+
feeCollectionRecords(
|
|
651
|
+
where: {
|
|
652
|
+
and: [
|
|
653
|
+
$feeCollectionRecordsFilter
|
|
654
|
+
{ eventIndex_gte: $startEventIndex, eventIndex_lt: $endEventIndex }
|
|
655
|
+
]
|
|
656
|
+
}
|
|
657
|
+
orderBy: eventIndex
|
|
658
|
+
orderDirection: desc
|
|
659
|
+
first: $limit
|
|
660
|
+
) {
|
|
661
|
+
...LegacyFeesCollectedData
|
|
662
|
+
}
|
|
663
|
+
repaymentRecords(
|
|
664
|
+
where: {
|
|
665
|
+
and: [
|
|
666
|
+
$repaymentRecordsFilter
|
|
667
|
+
{ eventIndex_gte: $startEventIndex, eventIndex_lt: $endEventIndex }
|
|
668
|
+
]
|
|
669
|
+
}
|
|
670
|
+
orderBy: eventIndex
|
|
671
|
+
orderDirection: desc
|
|
672
|
+
first: $limit
|
|
673
|
+
) {
|
|
674
|
+
...LegacyRepaymentData
|
|
675
|
+
}
|
|
676
|
+
annualInterestBipsUpdatedRecords(
|
|
677
|
+
where: {
|
|
678
|
+
and: [
|
|
679
|
+
$annualInterestBipsUpdatedRecordsFilter
|
|
680
|
+
{ eventIndex_gte: $startEventIndex, eventIndex_lt: $endEventIndex }
|
|
681
|
+
]
|
|
682
|
+
}
|
|
683
|
+
orderBy: eventIndex
|
|
684
|
+
orderDirection: desc
|
|
685
|
+
first: $limit
|
|
686
|
+
) {
|
|
687
|
+
...LegacyAnnualInterestBipsUpdatedData
|
|
688
|
+
}
|
|
689
|
+
maxTotalSupplyUpdatedRecords(
|
|
690
|
+
where: {
|
|
691
|
+
and: [
|
|
692
|
+
$maxTotalSupplyUpdatedRecordsFilter
|
|
693
|
+
{ eventIndex_gte: $startEventIndex, eventIndex_lt: $endEventIndex }
|
|
694
|
+
]
|
|
695
|
+
}
|
|
696
|
+
orderBy: eventIndex
|
|
697
|
+
orderDirection: desc
|
|
698
|
+
first: $limit
|
|
699
|
+
) {
|
|
700
|
+
...LegacyMaxTotalSupplyUpdatedData
|
|
701
|
+
}
|
|
702
|
+
withdrawalRequestRecords(
|
|
703
|
+
where: {
|
|
704
|
+
and: [
|
|
705
|
+
$withdrawalRequestRecordsFilter
|
|
706
|
+
{ eventIndex_gte: $startEventIndex, eventIndex_lt: $endEventIndex }
|
|
707
|
+
]
|
|
708
|
+
}
|
|
709
|
+
orderBy: eventIndex
|
|
710
|
+
orderDirection: desc
|
|
711
|
+
first: $limit
|
|
712
|
+
) {
|
|
713
|
+
...LegacyWithdrawalRequestProperties
|
|
714
|
+
}
|
|
715
|
+
forceBuyBackRecords(
|
|
716
|
+
where: {
|
|
717
|
+
and: [
|
|
718
|
+
$forceBuyBackRecordsFilter
|
|
719
|
+
{ eventIndex_gte: $startEventIndex, eventIndex_lt: $endEventIndex }
|
|
720
|
+
]
|
|
721
|
+
}
|
|
722
|
+
orderBy: eventIndex
|
|
723
|
+
orderDirection: desc
|
|
724
|
+
first: $limit
|
|
725
|
+
) {
|
|
726
|
+
...LegacyForceBuyBackData
|
|
727
|
+
}
|
|
728
|
+
minimumDepositUpdateRecords(
|
|
729
|
+
where: {
|
|
730
|
+
and: [
|
|
731
|
+
$minimumDepositUpdateRecordsFilter
|
|
732
|
+
{ eventIndex_gte: $startEventIndex, eventIndex_lt: $endEventIndex }
|
|
733
|
+
]
|
|
734
|
+
}
|
|
735
|
+
orderBy: eventIndex
|
|
736
|
+
orderDirection: desc
|
|
737
|
+
first: $limit
|
|
738
|
+
) {
|
|
739
|
+
...LegacyMinimumDepositUpdatedData
|
|
740
|
+
}
|
|
741
|
+
protocolFeeBipsUpdatedRecords(
|
|
742
|
+
where: {
|
|
743
|
+
and: [
|
|
744
|
+
$protocolFeeBipsUpdatedRecordsFilter
|
|
745
|
+
{ eventIndex_gte: $startEventIndex, eventIndex_lt: $endEventIndex }
|
|
746
|
+
]
|
|
747
|
+
}
|
|
748
|
+
orderBy: eventIndex
|
|
749
|
+
orderDirection: desc
|
|
750
|
+
first: $limit
|
|
751
|
+
) {
|
|
752
|
+
...LegacyProtocolFeeBipsUpdatedData
|
|
753
|
+
}
|
|
754
|
+
fixedTermUpdatedRecords(
|
|
755
|
+
where: {
|
|
756
|
+
and: [
|
|
757
|
+
$fixedTermUpdatedRecordsFilter
|
|
758
|
+
{ eventIndex_gte: $startEventIndex, eventIndex_lt: $endEventIndex }
|
|
759
|
+
]
|
|
760
|
+
}
|
|
761
|
+
orderBy: eventIndex
|
|
762
|
+
orderDirection: desc
|
|
763
|
+
first: $limit
|
|
764
|
+
) {
|
|
765
|
+
...LegacyFixedTermUpdatedData
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
${LegacyMarketClosedDataFragmentDoc}
|
|
770
|
+
${LegacyDisabledForceBuyBacksDataFragmentDoc}
|
|
771
|
+
${LegacyDelinquencyStatusChangedDataFragmentDoc}
|
|
772
|
+
${LegacyBorrowDataFragmentDoc}
|
|
773
|
+
${LegacyDepositDataFragmentDoc}
|
|
774
|
+
${LegacyFeesCollectedDataFragmentDoc}
|
|
775
|
+
${LegacyRepaymentDataFragmentDoc}
|
|
776
|
+
${LegacyAnnualInterestBipsUpdatedDataFragmentDoc}
|
|
777
|
+
${LegacyMaxTotalSupplyUpdatedDataFragmentDoc}
|
|
778
|
+
${LegacyWithdrawalRequestPropertiesFragmentDoc}
|
|
779
|
+
${LegacyForceBuyBackDataFragmentDoc}
|
|
780
|
+
${LegacyMinimumDepositUpdatedDataFragmentDoc}
|
|
781
|
+
${LegacyProtocolFeeBipsUpdatedDataFragmentDoc}
|
|
782
|
+
${LegacyFixedTermUpdatedDataFragmentDoc}
|
|
783
|
+
`;
|
|
784
|
+
exports.LegacyGetAllMarketsForLenderViewDocument = (0, client_1.gql) `
|
|
785
|
+
query legacyGetAllMarketsForLenderView(
|
|
786
|
+
$lender: Bytes
|
|
787
|
+
$marketFilter: Market_filter = { id_not: null }
|
|
788
|
+
$numMarkets: Int = 1000
|
|
789
|
+
$skipMarkets: Int = 0
|
|
790
|
+
$orderMarkets: Market_orderBy = createdAt
|
|
791
|
+
$directionMarkets: OrderDirection = desc
|
|
792
|
+
$numDeposits: Int = 10
|
|
793
|
+
$skipDeposits: Int = 0
|
|
794
|
+
$orderDeposits: Deposit_orderBy = blockTimestamp
|
|
795
|
+
$directionDeposits: OrderDirection = desc
|
|
796
|
+
$numBorrows: Int = 10
|
|
797
|
+
$skipBorrows: Int = 0
|
|
798
|
+
$orderBorrows: Borrow_orderBy = blockTimestamp
|
|
799
|
+
$directionBorrows: OrderDirection = desc
|
|
800
|
+
$numRepayments: Int = 10
|
|
801
|
+
$skipRepayments: Int = 0
|
|
802
|
+
$orderRepayments: DebtRepaid_orderBy = blockTimestamp
|
|
803
|
+
$directionRepayments: OrderDirection = desc
|
|
804
|
+
) {
|
|
805
|
+
markets(
|
|
806
|
+
where: $marketFilter
|
|
807
|
+
orderBy: $orderMarkets
|
|
808
|
+
orderDirection: $directionMarkets
|
|
809
|
+
first: $numMarkets
|
|
810
|
+
skip: $skipMarkets
|
|
811
|
+
) {
|
|
812
|
+
...LegacyMarketData
|
|
813
|
+
borrowRecords(
|
|
814
|
+
first: $numBorrows
|
|
815
|
+
skip: $skipBorrows
|
|
816
|
+
orderBy: $orderBorrows
|
|
817
|
+
orderDirection: $directionBorrows
|
|
818
|
+
) {
|
|
819
|
+
...LegacyBorrowData
|
|
820
|
+
}
|
|
821
|
+
repaymentRecords(
|
|
822
|
+
first: $numRepayments
|
|
823
|
+
skip: $skipRepayments
|
|
824
|
+
orderBy: $orderRepayments
|
|
825
|
+
orderDirection: $directionRepayments
|
|
826
|
+
) {
|
|
827
|
+
...LegacyRepaymentData
|
|
828
|
+
}
|
|
829
|
+
lenders(where: { address: $lender }, first: 1) {
|
|
830
|
+
...LegacyAccountDataForLenderView
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
controllerAuthorizations: lenderAuthorizations(
|
|
834
|
+
where: { and: [{ lender: $lender }, { authorized: true }] }
|
|
835
|
+
) {
|
|
836
|
+
lender
|
|
837
|
+
authorized
|
|
838
|
+
controller {
|
|
839
|
+
markets {
|
|
840
|
+
id
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
${LegacyMarketDataFragmentDoc}
|
|
846
|
+
${LegacyBorrowDataFragmentDoc}
|
|
847
|
+
${LegacyRepaymentDataFragmentDoc}
|
|
848
|
+
${LegacyAccountDataForLenderViewFragmentDoc}
|
|
849
|
+
`;
|
|
850
|
+
exports.LegacyGetMarketsAndLendersByHooksInstanceOrControllerDocument = (0, client_1.gql) `
|
|
851
|
+
query legacyGetMarketsAndLendersByHooksInstanceOrController(
|
|
852
|
+
$contractAddress: ID!
|
|
853
|
+
$marketFilter: Market_filter = { id_not: null }
|
|
854
|
+
$numMarkets: Int = 1000
|
|
855
|
+
$skipMarkets: Int = 0
|
|
856
|
+
$orderMarkets: Market_orderBy = createdAt
|
|
857
|
+
$directionMarkets: OrderDirection = desc
|
|
858
|
+
$lenderHooksAccessFilter: LenderHooksAccess_filter = { id_not: null }
|
|
859
|
+
$lenderAuthorizationFilter: LenderAuthorization_filter = { id_not: null }
|
|
860
|
+
$numMarketAccountsPerLender: Int = 100
|
|
861
|
+
$skipMarketAccountsPerLender: Int = 0
|
|
862
|
+
$numLenders: Int = 1000
|
|
863
|
+
$skipLenders: Int = 0
|
|
864
|
+
$orderLenderHooksAccess: LenderHooksAccess_orderBy = lastApprovalTimestamp
|
|
865
|
+
$directionLenders: OrderDirection = desc
|
|
866
|
+
) {
|
|
867
|
+
hooksInstance(id: $contractAddress) {
|
|
868
|
+
...LegacyHooksInstanceData
|
|
869
|
+
markets(
|
|
870
|
+
where: $marketFilter
|
|
871
|
+
first: $numMarkets
|
|
872
|
+
skip: $skipMarkets
|
|
873
|
+
orderBy: $orderMarkets
|
|
874
|
+
orderDirection: $directionMarkets
|
|
875
|
+
) {
|
|
876
|
+
...LegacyMarketData
|
|
877
|
+
}
|
|
878
|
+
...LegacyHooksInstanceLendersWithActiveMarkets
|
|
879
|
+
}
|
|
880
|
+
controller(id: $contractAddress) {
|
|
881
|
+
...LegacyMinimalControllerData
|
|
882
|
+
markets(
|
|
883
|
+
where: $marketFilter
|
|
884
|
+
first: $numMarkets
|
|
885
|
+
skip: $skipMarkets
|
|
886
|
+
orderBy: $orderMarkets
|
|
887
|
+
orderDirection: $directionMarkets
|
|
888
|
+
) {
|
|
889
|
+
...LegacyMarketData
|
|
890
|
+
}
|
|
891
|
+
...LegacyControllerAuthorizedLendersWithActiveMarkets
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
${LegacyHooksInstanceDataFragmentDoc}
|
|
895
|
+
${LegacyMarketDataFragmentDoc}
|
|
896
|
+
${LegacyHooksInstanceLendersWithActiveMarketsFragmentDoc}
|
|
897
|
+
${LegacyMinimalControllerDataFragmentDoc}
|
|
898
|
+
${LegacyControllerAuthorizedLendersWithActiveMarketsFragmentDoc}
|
|
899
|
+
`;
|
|
900
|
+
exports.LegacyGetAllMarketsDocument = (0, client_1.gql) `
|
|
901
|
+
query legacyGetAllMarkets {
|
|
902
|
+
markets {
|
|
903
|
+
...LegacyMarketData
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
${LegacyMarketDataFragmentDoc}
|
|
907
|
+
`;
|
|
908
|
+
exports.LegacyGetLenderAccountWithMarketDocument = (0, client_1.gql) `
|
|
909
|
+
query legacyGetLenderAccountWithMarket(
|
|
910
|
+
$market: ID!
|
|
911
|
+
$lender: Bytes!
|
|
912
|
+
$numDeposits: Int = 200
|
|
913
|
+
$skipDeposits: Int = 0
|
|
914
|
+
$orderDeposits: Deposit_orderBy = blockTimestamp
|
|
915
|
+
$directionDeposits: OrderDirection = desc
|
|
916
|
+
$numBorrows: Int = 10
|
|
917
|
+
$skipBorrows: Int = 0
|
|
918
|
+
$orderBorrows: Borrow_orderBy = blockTimestamp
|
|
919
|
+
$directionBorrows: OrderDirection = desc
|
|
920
|
+
$numRepayments: Int = 10
|
|
921
|
+
$skipRepayments: Int = 0
|
|
922
|
+
$orderRepayments: DebtRepaid_orderBy = blockTimestamp
|
|
923
|
+
$directionRepayments: OrderDirection = desc
|
|
924
|
+
) {
|
|
925
|
+
market(id: $market) {
|
|
926
|
+
lenders(where: { address: $lender }) {
|
|
927
|
+
...LegacyAccountDataForLenderView
|
|
928
|
+
}
|
|
929
|
+
...LegacyMarketData
|
|
930
|
+
borrowRecords(
|
|
931
|
+
first: $numBorrows
|
|
932
|
+
skip: $skipBorrows
|
|
933
|
+
orderBy: $orderBorrows
|
|
934
|
+
orderDirection: $directionBorrows
|
|
935
|
+
) {
|
|
936
|
+
...LegacyBorrowData
|
|
937
|
+
}
|
|
938
|
+
repaymentRecords(
|
|
939
|
+
first: $numRepayments
|
|
940
|
+
skip: $skipRepayments
|
|
941
|
+
orderBy: $orderRepayments
|
|
942
|
+
orderDirection: $directionRepayments
|
|
943
|
+
) {
|
|
944
|
+
...LegacyRepaymentData
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
${LegacyAccountDataForLenderViewFragmentDoc}
|
|
949
|
+
${LegacyMarketDataFragmentDoc}
|
|
950
|
+
${LegacyBorrowDataFragmentDoc}
|
|
951
|
+
${LegacyRepaymentDataFragmentDoc}
|
|
952
|
+
`;
|
|
953
|
+
exports.LegacyGetAccountsWhereLenderAuthorizedOrActiveDocument = (0, client_1.gql) `
|
|
954
|
+
query legacyGetAccountsWhereLenderAuthorizedOrActive(
|
|
955
|
+
$lender: Bytes!
|
|
956
|
+
$accountFilter: LenderAccount_filter = { address_not: null }
|
|
957
|
+
$marketFilter: Market_filter = { id_not: null }
|
|
958
|
+
$numMarkets: Int = 1000
|
|
959
|
+
$skipMarkets: Int = 0
|
|
960
|
+
$orderMarkets: Market_orderBy = createdAt
|
|
961
|
+
$directionMarkets: OrderDirection = desc
|
|
962
|
+
$numDeposits: Int = 200
|
|
963
|
+
$skipDeposits: Int = 0
|
|
964
|
+
$orderDeposits: Deposit_orderBy = blockTimestamp
|
|
965
|
+
$directionDeposits: OrderDirection = desc
|
|
966
|
+
$numBorrows: Int = 10
|
|
967
|
+
$skipBorrows: Int = 0
|
|
968
|
+
$orderBorrows: Borrow_orderBy = blockTimestamp
|
|
969
|
+
$directionBorrows: OrderDirection = desc
|
|
970
|
+
$numRepayments: Int = 10
|
|
971
|
+
$skipRepayments: Int = 0
|
|
972
|
+
$orderRepayments: DebtRepaid_orderBy = blockTimestamp
|
|
973
|
+
$directionRepayments: OrderDirection = desc
|
|
974
|
+
) {
|
|
975
|
+
lenderAccounts(
|
|
976
|
+
where: {
|
|
977
|
+
and: [
|
|
978
|
+
$accountFilter
|
|
979
|
+
{ address: $lender }
|
|
980
|
+
{
|
|
981
|
+
or: [
|
|
982
|
+
{ role_in: [DepositAndWithdraw, WithdrawOnly] }
|
|
983
|
+
{ scaledBalance_gt: 0 }
|
|
984
|
+
{ controllerAuthorization_: { authorized: true } }
|
|
985
|
+
{ knownLenderStatus_: { id_not: null } }
|
|
986
|
+
{ hooksAccess_: { lastApprovalTimestamp_gt: 0 } }
|
|
987
|
+
{ totalDeposited_gt: 0 }
|
|
988
|
+
]
|
|
989
|
+
}
|
|
990
|
+
]
|
|
991
|
+
}
|
|
992
|
+
) {
|
|
993
|
+
...LegacyAccountDataForLenderView
|
|
994
|
+
market {
|
|
995
|
+
...LegacyMarketData
|
|
996
|
+
borrowRecords(
|
|
997
|
+
first: $numBorrows
|
|
998
|
+
skip: $skipBorrows
|
|
999
|
+
orderBy: $orderBorrows
|
|
1000
|
+
orderDirection: $directionBorrows
|
|
1001
|
+
) {
|
|
1002
|
+
...LegacyBorrowData
|
|
1003
|
+
}
|
|
1004
|
+
repaymentRecords(
|
|
1005
|
+
first: $numRepayments
|
|
1006
|
+
skip: $skipRepayments
|
|
1007
|
+
orderBy: $orderRepayments
|
|
1008
|
+
orderDirection: $directionRepayments
|
|
1009
|
+
) {
|
|
1010
|
+
...LegacyRepaymentData
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
controllerAuthorizations: lenderAuthorizations(
|
|
1015
|
+
where: { and: [{ lender: $lender }, { authorized: true }] }
|
|
1016
|
+
) {
|
|
1017
|
+
lender
|
|
1018
|
+
authorized
|
|
1019
|
+
controller {
|
|
1020
|
+
markets {
|
|
1021
|
+
...LegacyMarketData
|
|
1022
|
+
borrowRecords(
|
|
1023
|
+
first: $numBorrows
|
|
1024
|
+
skip: $skipBorrows
|
|
1025
|
+
orderBy: $orderBorrows
|
|
1026
|
+
orderDirection: $directionBorrows
|
|
1027
|
+
) {
|
|
1028
|
+
...LegacyBorrowData
|
|
1029
|
+
}
|
|
1030
|
+
repaymentRecords(
|
|
1031
|
+
first: $numRepayments
|
|
1032
|
+
skip: $skipRepayments
|
|
1033
|
+
orderBy: $orderRepayments
|
|
1034
|
+
orderDirection: $directionRepayments
|
|
1035
|
+
) {
|
|
1036
|
+
...LegacyRepaymentData
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
${LegacyAccountDataForLenderViewFragmentDoc}
|
|
1043
|
+
${LegacyMarketDataFragmentDoc}
|
|
1044
|
+
${LegacyBorrowDataFragmentDoc}
|
|
1045
|
+
${LegacyRepaymentDataFragmentDoc}
|
|
1046
|
+
`;
|
|
1047
|
+
//# sourceMappingURL=legacy-documents.js.map
|