@gearbox-protocol/sdk 3.0.0-vfour.130 → 3.0.0-vfour.132
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/cjs/sdk/index.cjs +2539 -778
- package/dist/cjs/sdk/index.d.ts +1572 -816
- package/dist/esm/sdk/index.d.mts +1572 -816
- package/dist/esm/sdk/index.mjs +2540 -778
- package/package.json +1 -1
package/dist/cjs/sdk/index.cjs
CHANGED
|
@@ -10,447 +10,2014 @@ var actions = require('viem/actions');
|
|
|
10
10
|
var sdkGov = require('@gearbox-protocol/sdk-gov');
|
|
11
11
|
|
|
12
12
|
// src/sdk/abi/compressors.ts
|
|
13
|
-
var
|
|
13
|
+
var iCreditAccountCompressorAbi = [
|
|
14
14
|
{
|
|
15
|
-
type: "
|
|
16
|
-
|
|
17
|
-
inputs: [
|
|
15
|
+
type: "function",
|
|
16
|
+
name: "contractType",
|
|
17
|
+
inputs: [],
|
|
18
|
+
outputs: [
|
|
18
19
|
{
|
|
19
|
-
name: "
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
indexed: true
|
|
20
|
+
name: "",
|
|
21
|
+
type: "bytes32",
|
|
22
|
+
internalType: "bytes32"
|
|
23
23
|
}
|
|
24
24
|
],
|
|
25
|
-
|
|
25
|
+
stateMutability: "view"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
type: "
|
|
29
|
-
|
|
28
|
+
type: "function",
|
|
29
|
+
name: "countCreditAccounts",
|
|
30
30
|
inputs: [
|
|
31
31
|
{
|
|
32
|
-
name: "
|
|
33
|
-
internalType: "address",
|
|
32
|
+
name: "creditManager",
|
|
34
33
|
type: "address",
|
|
35
|
-
|
|
34
|
+
internalType: "address"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "caFilter",
|
|
38
|
+
type: "tuple",
|
|
39
|
+
internalType: "struct CreditAccountFilter",
|
|
40
|
+
components: [
|
|
41
|
+
{
|
|
42
|
+
name: "owner",
|
|
43
|
+
type: "address",
|
|
44
|
+
internalType: "address"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "includeZeroDebt",
|
|
48
|
+
type: "bool",
|
|
49
|
+
internalType: "bool"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "minHealthFactor",
|
|
53
|
+
type: "uint16",
|
|
54
|
+
internalType: "uint16"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "maxHealthFactor",
|
|
58
|
+
type: "uint16",
|
|
59
|
+
internalType: "uint16"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "reverting",
|
|
63
|
+
type: "bool",
|
|
64
|
+
internalType: "bool"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
outputs: [
|
|
70
|
+
{
|
|
71
|
+
name: "",
|
|
72
|
+
type: "uint256",
|
|
73
|
+
internalType: "uint256"
|
|
36
74
|
}
|
|
37
75
|
],
|
|
38
|
-
|
|
76
|
+
stateMutability: "view"
|
|
39
77
|
},
|
|
40
78
|
{
|
|
41
|
-
type: "
|
|
42
|
-
|
|
79
|
+
type: "function",
|
|
80
|
+
name: "countCreditAccounts",
|
|
43
81
|
inputs: [
|
|
44
|
-
{ name: "key", internalType: "string", type: "string", indexed: false },
|
|
45
82
|
{
|
|
46
|
-
name: "
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
83
|
+
name: "cmFilter",
|
|
84
|
+
type: "tuple",
|
|
85
|
+
internalType: "struct MarketFilter",
|
|
86
|
+
components: [
|
|
87
|
+
{
|
|
88
|
+
name: "configurators",
|
|
89
|
+
type: "address[]",
|
|
90
|
+
internalType: "address[]"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "pools",
|
|
94
|
+
type: "address[]",
|
|
95
|
+
internalType: "address[]"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: "underlying",
|
|
99
|
+
type: "address",
|
|
100
|
+
internalType: "address"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
50
103
|
},
|
|
51
104
|
{
|
|
52
|
-
name: "
|
|
53
|
-
|
|
105
|
+
name: "caFilter",
|
|
106
|
+
type: "tuple",
|
|
107
|
+
internalType: "struct CreditAccountFilter",
|
|
108
|
+
components: [
|
|
109
|
+
{
|
|
110
|
+
name: "owner",
|
|
111
|
+
type: "address",
|
|
112
|
+
internalType: "address"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: "includeZeroDebt",
|
|
116
|
+
type: "bool",
|
|
117
|
+
internalType: "bool"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "minHealthFactor",
|
|
121
|
+
type: "uint16",
|
|
122
|
+
internalType: "uint16"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "maxHealthFactor",
|
|
126
|
+
type: "uint16",
|
|
127
|
+
internalType: "uint16"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "reverting",
|
|
131
|
+
type: "bool",
|
|
132
|
+
internalType: "bool"
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
outputs: [
|
|
138
|
+
{
|
|
139
|
+
name: "",
|
|
54
140
|
type: "uint256",
|
|
55
|
-
|
|
141
|
+
internalType: "uint256"
|
|
56
142
|
}
|
|
57
143
|
],
|
|
58
|
-
name: "SetAddress"
|
|
59
|
-
}
|
|
60
|
-
];
|
|
61
|
-
var iCreditAccountCompressorAbi = [
|
|
62
|
-
{
|
|
63
|
-
type: "function",
|
|
64
|
-
inputs: [],
|
|
65
|
-
name: "contractType",
|
|
66
|
-
outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
|
|
67
144
|
stateMutability: "view"
|
|
68
145
|
},
|
|
69
146
|
{
|
|
70
147
|
type: "function",
|
|
148
|
+
name: "getCreditAccountData",
|
|
71
149
|
inputs: [
|
|
72
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
73
150
|
{
|
|
74
|
-
name: "
|
|
75
|
-
|
|
151
|
+
name: "creditAccount",
|
|
152
|
+
type: "address",
|
|
153
|
+
internalType: "address"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
outputs: [
|
|
157
|
+
{
|
|
158
|
+
name: "",
|
|
76
159
|
type: "tuple",
|
|
160
|
+
internalType: "struct CreditAccountData",
|
|
77
161
|
components: [
|
|
78
|
-
{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
162
|
+
{
|
|
163
|
+
name: "creditAccount",
|
|
164
|
+
type: "address",
|
|
165
|
+
internalType: "address"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: "creditManager",
|
|
169
|
+
type: "address",
|
|
170
|
+
internalType: "address"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: "creditFacade",
|
|
174
|
+
type: "address",
|
|
175
|
+
internalType: "address"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: "underlying",
|
|
179
|
+
type: "address",
|
|
180
|
+
internalType: "address"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: "owner",
|
|
184
|
+
type: "address",
|
|
185
|
+
internalType: "address"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: "expirationDate",
|
|
189
|
+
type: "uint40",
|
|
190
|
+
internalType: "uint40"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: "enabledTokensMask",
|
|
194
|
+
type: "uint256",
|
|
195
|
+
internalType: "uint256"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: "debt",
|
|
199
|
+
type: "uint256",
|
|
200
|
+
internalType: "uint256"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: "accruedInterest",
|
|
204
|
+
type: "uint256",
|
|
205
|
+
internalType: "uint256"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: "accruedFees",
|
|
209
|
+
type: "uint256",
|
|
210
|
+
internalType: "uint256"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: "totalDebtUSD",
|
|
214
|
+
type: "uint256",
|
|
215
|
+
internalType: "uint256"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: "totalValueUSD",
|
|
219
|
+
type: "uint256",
|
|
220
|
+
internalType: "uint256"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
name: "twvUSD",
|
|
224
|
+
type: "uint256",
|
|
225
|
+
internalType: "uint256"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: "totalValue",
|
|
229
|
+
type: "uint256",
|
|
230
|
+
internalType: "uint256"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: "healthFactor",
|
|
234
|
+
type: "uint16",
|
|
235
|
+
internalType: "uint16"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: "success",
|
|
239
|
+
type: "bool",
|
|
240
|
+
internalType: "bool"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
name: "tokens",
|
|
244
|
+
type: "tuple[]",
|
|
245
|
+
internalType: "struct TokenInfo[]",
|
|
246
|
+
components: [
|
|
247
|
+
{
|
|
248
|
+
name: "token",
|
|
249
|
+
type: "address",
|
|
250
|
+
internalType: "address"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: "mask",
|
|
254
|
+
type: "uint256",
|
|
255
|
+
internalType: "uint256"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
name: "balance",
|
|
259
|
+
type: "uint256",
|
|
260
|
+
internalType: "uint256"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: "quota",
|
|
264
|
+
type: "uint256",
|
|
265
|
+
internalType: "uint256"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
name: "success",
|
|
269
|
+
type: "bool",
|
|
270
|
+
internalType: "bool"
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}
|
|
83
274
|
]
|
|
84
275
|
}
|
|
85
276
|
],
|
|
86
|
-
name: "countCreditAccounts",
|
|
87
|
-
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
88
277
|
stateMutability: "view"
|
|
89
278
|
},
|
|
90
279
|
{
|
|
91
280
|
type: "function",
|
|
281
|
+
name: "getCreditAccounts",
|
|
92
282
|
inputs: [
|
|
93
283
|
{
|
|
94
284
|
name: "cmFilter",
|
|
95
|
-
internalType: "struct MarketFilter",
|
|
96
285
|
type: "tuple",
|
|
286
|
+
internalType: "struct MarketFilter",
|
|
97
287
|
components: [
|
|
98
|
-
{
|
|
99
|
-
|
|
100
|
-
|
|
288
|
+
{
|
|
289
|
+
name: "configurators",
|
|
290
|
+
type: "address[]",
|
|
291
|
+
internalType: "address[]"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: "pools",
|
|
295
|
+
type: "address[]",
|
|
296
|
+
internalType: "address[]"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
name: "underlying",
|
|
300
|
+
type: "address",
|
|
301
|
+
internalType: "address"
|
|
302
|
+
}
|
|
101
303
|
]
|
|
102
304
|
},
|
|
103
305
|
{
|
|
104
306
|
name: "caFilter",
|
|
105
|
-
internalType: "struct CreditAccountFilter",
|
|
106
307
|
type: "tuple",
|
|
308
|
+
internalType: "struct CreditAccountFilter",
|
|
309
|
+
components: [
|
|
310
|
+
{
|
|
311
|
+
name: "owner",
|
|
312
|
+
type: "address",
|
|
313
|
+
internalType: "address"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: "includeZeroDebt",
|
|
317
|
+
type: "bool",
|
|
318
|
+
internalType: "bool"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
name: "minHealthFactor",
|
|
322
|
+
type: "uint16",
|
|
323
|
+
internalType: "uint16"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
name: "maxHealthFactor",
|
|
327
|
+
type: "uint16",
|
|
328
|
+
internalType: "uint16"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: "reverting",
|
|
332
|
+
type: "bool",
|
|
333
|
+
internalType: "bool"
|
|
334
|
+
}
|
|
335
|
+
]
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: "offset",
|
|
339
|
+
type: "uint256",
|
|
340
|
+
internalType: "uint256"
|
|
341
|
+
}
|
|
342
|
+
],
|
|
343
|
+
outputs: [
|
|
344
|
+
{
|
|
345
|
+
name: "data",
|
|
346
|
+
type: "tuple[]",
|
|
347
|
+
internalType: "struct CreditAccountData[]",
|
|
107
348
|
components: [
|
|
108
|
-
{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
349
|
+
{
|
|
350
|
+
name: "creditAccount",
|
|
351
|
+
type: "address",
|
|
352
|
+
internalType: "address"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
name: "creditManager",
|
|
356
|
+
type: "address",
|
|
357
|
+
internalType: "address"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
name: "creditFacade",
|
|
361
|
+
type: "address",
|
|
362
|
+
internalType: "address"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
name: "underlying",
|
|
366
|
+
type: "address",
|
|
367
|
+
internalType: "address"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
name: "owner",
|
|
371
|
+
type: "address",
|
|
372
|
+
internalType: "address"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
name: "expirationDate",
|
|
376
|
+
type: "uint40",
|
|
377
|
+
internalType: "uint40"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
name: "enabledTokensMask",
|
|
381
|
+
type: "uint256",
|
|
382
|
+
internalType: "uint256"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
name: "debt",
|
|
386
|
+
type: "uint256",
|
|
387
|
+
internalType: "uint256"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
name: "accruedInterest",
|
|
391
|
+
type: "uint256",
|
|
392
|
+
internalType: "uint256"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
name: "accruedFees",
|
|
396
|
+
type: "uint256",
|
|
397
|
+
internalType: "uint256"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
name: "totalDebtUSD",
|
|
401
|
+
type: "uint256",
|
|
402
|
+
internalType: "uint256"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
name: "totalValueUSD",
|
|
406
|
+
type: "uint256",
|
|
407
|
+
internalType: "uint256"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
name: "twvUSD",
|
|
411
|
+
type: "uint256",
|
|
412
|
+
internalType: "uint256"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
name: "totalValue",
|
|
416
|
+
type: "uint256",
|
|
417
|
+
internalType: "uint256"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
name: "healthFactor",
|
|
421
|
+
type: "uint16",
|
|
422
|
+
internalType: "uint16"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
name: "success",
|
|
426
|
+
type: "bool",
|
|
427
|
+
internalType: "bool"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
name: "tokens",
|
|
431
|
+
type: "tuple[]",
|
|
432
|
+
internalType: "struct TokenInfo[]",
|
|
433
|
+
components: [
|
|
434
|
+
{
|
|
435
|
+
name: "token",
|
|
436
|
+
type: "address",
|
|
437
|
+
internalType: "address"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
name: "mask",
|
|
441
|
+
type: "uint256",
|
|
442
|
+
internalType: "uint256"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
name: "balance",
|
|
446
|
+
type: "uint256",
|
|
447
|
+
internalType: "uint256"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
name: "quota",
|
|
451
|
+
type: "uint256",
|
|
452
|
+
internalType: "uint256"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
name: "success",
|
|
456
|
+
type: "bool",
|
|
457
|
+
internalType: "bool"
|
|
458
|
+
}
|
|
459
|
+
]
|
|
460
|
+
}
|
|
113
461
|
]
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
name: "nextOffset",
|
|
465
|
+
type: "uint256",
|
|
466
|
+
internalType: "uint256"
|
|
114
467
|
}
|
|
115
468
|
],
|
|
116
|
-
name: "countCreditAccounts",
|
|
117
|
-
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
118
469
|
stateMutability: "view"
|
|
119
470
|
},
|
|
120
471
|
{
|
|
121
472
|
type: "function",
|
|
473
|
+
name: "getCreditAccounts",
|
|
122
474
|
inputs: [
|
|
123
|
-
{
|
|
475
|
+
{
|
|
476
|
+
name: "creditManager",
|
|
477
|
+
type: "address",
|
|
478
|
+
internalType: "address"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
name: "caFilter",
|
|
482
|
+
type: "tuple",
|
|
483
|
+
internalType: "struct CreditAccountFilter",
|
|
484
|
+
components: [
|
|
485
|
+
{
|
|
486
|
+
name: "owner",
|
|
487
|
+
type: "address",
|
|
488
|
+
internalType: "address"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
name: "includeZeroDebt",
|
|
492
|
+
type: "bool",
|
|
493
|
+
internalType: "bool"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
name: "minHealthFactor",
|
|
497
|
+
type: "uint16",
|
|
498
|
+
internalType: "uint16"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
name: "maxHealthFactor",
|
|
502
|
+
type: "uint16",
|
|
503
|
+
internalType: "uint16"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
name: "reverting",
|
|
507
|
+
type: "bool",
|
|
508
|
+
internalType: "bool"
|
|
509
|
+
}
|
|
510
|
+
]
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
name: "offset",
|
|
514
|
+
type: "uint256",
|
|
515
|
+
internalType: "uint256"
|
|
516
|
+
}
|
|
124
517
|
],
|
|
125
|
-
name: "getCreditAccountData",
|
|
126
518
|
outputs: [
|
|
127
519
|
{
|
|
128
|
-
name: "",
|
|
129
|
-
|
|
130
|
-
|
|
520
|
+
name: "data",
|
|
521
|
+
type: "tuple[]",
|
|
522
|
+
internalType: "struct CreditAccountData[]",
|
|
131
523
|
components: [
|
|
132
|
-
{
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
524
|
+
{
|
|
525
|
+
name: "creditAccount",
|
|
526
|
+
type: "address",
|
|
527
|
+
internalType: "address"
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
name: "creditManager",
|
|
531
|
+
type: "address",
|
|
532
|
+
internalType: "address"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
name: "creditFacade",
|
|
536
|
+
type: "address",
|
|
537
|
+
internalType: "address"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
name: "underlying",
|
|
541
|
+
type: "address",
|
|
542
|
+
internalType: "address"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
name: "owner",
|
|
546
|
+
type: "address",
|
|
547
|
+
internalType: "address"
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
name: "expirationDate",
|
|
551
|
+
type: "uint40",
|
|
552
|
+
internalType: "uint40"
|
|
553
|
+
},
|
|
137
554
|
{
|
|
138
555
|
name: "enabledTokensMask",
|
|
139
|
-
|
|
140
|
-
|
|
556
|
+
type: "uint256",
|
|
557
|
+
internalType: "uint256"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
name: "debt",
|
|
561
|
+
type: "uint256",
|
|
562
|
+
internalType: "uint256"
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
name: "accruedInterest",
|
|
566
|
+
type: "uint256",
|
|
567
|
+
internalType: "uint256"
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
name: "accruedFees",
|
|
571
|
+
type: "uint256",
|
|
572
|
+
internalType: "uint256"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
name: "totalDebtUSD",
|
|
576
|
+
type: "uint256",
|
|
577
|
+
internalType: "uint256"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
name: "totalValueUSD",
|
|
581
|
+
type: "uint256",
|
|
582
|
+
internalType: "uint256"
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
name: "twvUSD",
|
|
586
|
+
type: "uint256",
|
|
587
|
+
internalType: "uint256"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
name: "totalValue",
|
|
591
|
+
type: "uint256",
|
|
592
|
+
internalType: "uint256"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
name: "healthFactor",
|
|
596
|
+
type: "uint16",
|
|
597
|
+
internalType: "uint16"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
name: "success",
|
|
601
|
+
type: "bool",
|
|
602
|
+
internalType: "bool"
|
|
141
603
|
},
|
|
142
|
-
{ name: "debt", internalType: "uint256", type: "uint256" },
|
|
143
|
-
{ name: "accruedInterest", internalType: "uint256", type: "uint256" },
|
|
144
|
-
{ name: "accruedFees", internalType: "uint256", type: "uint256" },
|
|
145
|
-
{ name: "totalDebtUSD", internalType: "uint256", type: "uint256" },
|
|
146
|
-
{ name: "totalValueUSD", internalType: "uint256", type: "uint256" },
|
|
147
|
-
{ name: "twvUSD", internalType: "uint256", type: "uint256" },
|
|
148
|
-
{ name: "totalValue", internalType: "uint256", type: "uint256" },
|
|
149
|
-
{ name: "healthFactor", internalType: "uint16", type: "uint16" },
|
|
150
|
-
{ name: "success", internalType: "bool", type: "bool" },
|
|
151
604
|
{
|
|
152
605
|
name: "tokens",
|
|
153
|
-
internalType: "struct TokenInfo[]",
|
|
154
606
|
type: "tuple[]",
|
|
607
|
+
internalType: "struct TokenInfo[]",
|
|
608
|
+
components: [
|
|
609
|
+
{
|
|
610
|
+
name: "token",
|
|
611
|
+
type: "address",
|
|
612
|
+
internalType: "address"
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
name: "mask",
|
|
616
|
+
type: "uint256",
|
|
617
|
+
internalType: "uint256"
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
name: "balance",
|
|
621
|
+
type: "uint256",
|
|
622
|
+
internalType: "uint256"
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
name: "quota",
|
|
626
|
+
type: "uint256",
|
|
627
|
+
internalType: "uint256"
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
name: "success",
|
|
631
|
+
type: "bool",
|
|
632
|
+
internalType: "bool"
|
|
633
|
+
}
|
|
634
|
+
]
|
|
635
|
+
}
|
|
636
|
+
]
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
name: "nextOffset",
|
|
640
|
+
type: "uint256",
|
|
641
|
+
internalType: "uint256"
|
|
642
|
+
}
|
|
643
|
+
],
|
|
644
|
+
stateMutability: "view"
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
type: "function",
|
|
648
|
+
name: "getCreditAccounts",
|
|
649
|
+
inputs: [
|
|
650
|
+
{
|
|
651
|
+
name: "creditManager",
|
|
652
|
+
type: "address",
|
|
653
|
+
internalType: "address"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
name: "caFilter",
|
|
657
|
+
type: "tuple",
|
|
658
|
+
internalType: "struct CreditAccountFilter",
|
|
659
|
+
components: [
|
|
660
|
+
{
|
|
661
|
+
name: "owner",
|
|
662
|
+
type: "address",
|
|
663
|
+
internalType: "address"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
name: "includeZeroDebt",
|
|
667
|
+
type: "bool",
|
|
668
|
+
internalType: "bool"
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
name: "minHealthFactor",
|
|
672
|
+
type: "uint16",
|
|
673
|
+
internalType: "uint16"
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
name: "maxHealthFactor",
|
|
677
|
+
type: "uint16",
|
|
678
|
+
internalType: "uint16"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
name: "reverting",
|
|
682
|
+
type: "bool",
|
|
683
|
+
internalType: "bool"
|
|
684
|
+
}
|
|
685
|
+
]
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
name: "offset",
|
|
689
|
+
type: "uint256",
|
|
690
|
+
internalType: "uint256"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
name: "limit",
|
|
694
|
+
type: "uint256",
|
|
695
|
+
internalType: "uint256"
|
|
696
|
+
}
|
|
697
|
+
],
|
|
698
|
+
outputs: [
|
|
699
|
+
{
|
|
700
|
+
name: "data",
|
|
701
|
+
type: "tuple[]",
|
|
702
|
+
internalType: "struct CreditAccountData[]",
|
|
703
|
+
components: [
|
|
704
|
+
{
|
|
705
|
+
name: "creditAccount",
|
|
706
|
+
type: "address",
|
|
707
|
+
internalType: "address"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
name: "creditManager",
|
|
711
|
+
type: "address",
|
|
712
|
+
internalType: "address"
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
name: "creditFacade",
|
|
716
|
+
type: "address",
|
|
717
|
+
internalType: "address"
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
name: "underlying",
|
|
721
|
+
type: "address",
|
|
722
|
+
internalType: "address"
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
name: "owner",
|
|
726
|
+
type: "address",
|
|
727
|
+
internalType: "address"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
name: "expirationDate",
|
|
731
|
+
type: "uint40",
|
|
732
|
+
internalType: "uint40"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
name: "enabledTokensMask",
|
|
736
|
+
type: "uint256",
|
|
737
|
+
internalType: "uint256"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
name: "debt",
|
|
741
|
+
type: "uint256",
|
|
742
|
+
internalType: "uint256"
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
name: "accruedInterest",
|
|
746
|
+
type: "uint256",
|
|
747
|
+
internalType: "uint256"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
name: "accruedFees",
|
|
751
|
+
type: "uint256",
|
|
752
|
+
internalType: "uint256"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
name: "totalDebtUSD",
|
|
756
|
+
type: "uint256",
|
|
757
|
+
internalType: "uint256"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
name: "totalValueUSD",
|
|
761
|
+
type: "uint256",
|
|
762
|
+
internalType: "uint256"
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
name: "twvUSD",
|
|
766
|
+
type: "uint256",
|
|
767
|
+
internalType: "uint256"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
name: "totalValue",
|
|
771
|
+
type: "uint256",
|
|
772
|
+
internalType: "uint256"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
name: "healthFactor",
|
|
776
|
+
type: "uint16",
|
|
777
|
+
internalType: "uint16"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
name: "success",
|
|
781
|
+
type: "bool",
|
|
782
|
+
internalType: "bool"
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
name: "tokens",
|
|
786
|
+
type: "tuple[]",
|
|
787
|
+
internalType: "struct TokenInfo[]",
|
|
788
|
+
components: [
|
|
789
|
+
{
|
|
790
|
+
name: "token",
|
|
791
|
+
type: "address",
|
|
792
|
+
internalType: "address"
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
name: "mask",
|
|
796
|
+
type: "uint256",
|
|
797
|
+
internalType: "uint256"
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
name: "balance",
|
|
801
|
+
type: "uint256",
|
|
802
|
+
internalType: "uint256"
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
name: "quota",
|
|
806
|
+
type: "uint256",
|
|
807
|
+
internalType: "uint256"
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
name: "success",
|
|
811
|
+
type: "bool",
|
|
812
|
+
internalType: "bool"
|
|
813
|
+
}
|
|
814
|
+
]
|
|
815
|
+
}
|
|
816
|
+
]
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
name: "nextOffset",
|
|
820
|
+
type: "uint256",
|
|
821
|
+
internalType: "uint256"
|
|
822
|
+
}
|
|
823
|
+
],
|
|
824
|
+
stateMutability: "view"
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
type: "function",
|
|
828
|
+
name: "getCreditAccounts",
|
|
829
|
+
inputs: [
|
|
830
|
+
{
|
|
831
|
+
name: "cmFilter",
|
|
832
|
+
type: "tuple",
|
|
833
|
+
internalType: "struct MarketFilter",
|
|
834
|
+
components: [
|
|
835
|
+
{
|
|
836
|
+
name: "configurators",
|
|
837
|
+
type: "address[]",
|
|
838
|
+
internalType: "address[]"
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
name: "pools",
|
|
842
|
+
type: "address[]",
|
|
843
|
+
internalType: "address[]"
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
name: "underlying",
|
|
847
|
+
type: "address",
|
|
848
|
+
internalType: "address"
|
|
849
|
+
}
|
|
850
|
+
]
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
name: "caFilter",
|
|
854
|
+
type: "tuple",
|
|
855
|
+
internalType: "struct CreditAccountFilter",
|
|
856
|
+
components: [
|
|
857
|
+
{
|
|
858
|
+
name: "owner",
|
|
859
|
+
type: "address",
|
|
860
|
+
internalType: "address"
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
name: "includeZeroDebt",
|
|
864
|
+
type: "bool",
|
|
865
|
+
internalType: "bool"
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
name: "minHealthFactor",
|
|
869
|
+
type: "uint16",
|
|
870
|
+
internalType: "uint16"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
name: "maxHealthFactor",
|
|
874
|
+
type: "uint16",
|
|
875
|
+
internalType: "uint16"
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
name: "reverting",
|
|
879
|
+
type: "bool",
|
|
880
|
+
internalType: "bool"
|
|
881
|
+
}
|
|
882
|
+
]
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
name: "offset",
|
|
886
|
+
type: "uint256",
|
|
887
|
+
internalType: "uint256"
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
name: "limit",
|
|
891
|
+
type: "uint256",
|
|
892
|
+
internalType: "uint256"
|
|
893
|
+
}
|
|
894
|
+
],
|
|
895
|
+
outputs: [
|
|
896
|
+
{
|
|
897
|
+
name: "data",
|
|
898
|
+
type: "tuple[]",
|
|
899
|
+
internalType: "struct CreditAccountData[]",
|
|
900
|
+
components: [
|
|
901
|
+
{
|
|
902
|
+
name: "creditAccount",
|
|
903
|
+
type: "address",
|
|
904
|
+
internalType: "address"
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
name: "creditManager",
|
|
908
|
+
type: "address",
|
|
909
|
+
internalType: "address"
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
name: "creditFacade",
|
|
913
|
+
type: "address",
|
|
914
|
+
internalType: "address"
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
name: "underlying",
|
|
918
|
+
type: "address",
|
|
919
|
+
internalType: "address"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
name: "owner",
|
|
923
|
+
type: "address",
|
|
924
|
+
internalType: "address"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
name: "expirationDate",
|
|
928
|
+
type: "uint40",
|
|
929
|
+
internalType: "uint40"
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
name: "enabledTokensMask",
|
|
933
|
+
type: "uint256",
|
|
934
|
+
internalType: "uint256"
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
name: "debt",
|
|
938
|
+
type: "uint256",
|
|
939
|
+
internalType: "uint256"
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
name: "accruedInterest",
|
|
943
|
+
type: "uint256",
|
|
944
|
+
internalType: "uint256"
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
name: "accruedFees",
|
|
948
|
+
type: "uint256",
|
|
949
|
+
internalType: "uint256"
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
name: "totalDebtUSD",
|
|
953
|
+
type: "uint256",
|
|
954
|
+
internalType: "uint256"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
name: "totalValueUSD",
|
|
958
|
+
type: "uint256",
|
|
959
|
+
internalType: "uint256"
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
name: "twvUSD",
|
|
963
|
+
type: "uint256",
|
|
964
|
+
internalType: "uint256"
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
name: "totalValue",
|
|
968
|
+
type: "uint256",
|
|
969
|
+
internalType: "uint256"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
name: "healthFactor",
|
|
973
|
+
type: "uint16",
|
|
974
|
+
internalType: "uint16"
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
name: "success",
|
|
978
|
+
type: "bool",
|
|
979
|
+
internalType: "bool"
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
name: "tokens",
|
|
983
|
+
type: "tuple[]",
|
|
984
|
+
internalType: "struct TokenInfo[]",
|
|
985
|
+
components: [
|
|
986
|
+
{
|
|
987
|
+
name: "token",
|
|
988
|
+
type: "address",
|
|
989
|
+
internalType: "address"
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
name: "mask",
|
|
993
|
+
type: "uint256",
|
|
994
|
+
internalType: "uint256"
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
name: "balance",
|
|
998
|
+
type: "uint256",
|
|
999
|
+
internalType: "uint256"
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
name: "quota",
|
|
1003
|
+
type: "uint256",
|
|
1004
|
+
internalType: "uint256"
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
name: "success",
|
|
1008
|
+
type: "bool",
|
|
1009
|
+
internalType: "bool"
|
|
1010
|
+
}
|
|
1011
|
+
]
|
|
1012
|
+
}
|
|
1013
|
+
]
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
name: "nextOffset",
|
|
1017
|
+
type: "uint256",
|
|
1018
|
+
internalType: "uint256"
|
|
1019
|
+
}
|
|
1020
|
+
],
|
|
1021
|
+
stateMutability: "view"
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
type: "function",
|
|
1025
|
+
name: "version",
|
|
1026
|
+
inputs: [],
|
|
1027
|
+
outputs: [
|
|
1028
|
+
{
|
|
1029
|
+
name: "",
|
|
1030
|
+
type: "uint256",
|
|
1031
|
+
internalType: "uint256"
|
|
1032
|
+
}
|
|
1033
|
+
],
|
|
1034
|
+
stateMutability: "view"
|
|
1035
|
+
}
|
|
1036
|
+
];
|
|
1037
|
+
var iMarketCompressorAbi = [
|
|
1038
|
+
{
|
|
1039
|
+
type: "function",
|
|
1040
|
+
name: "contractType",
|
|
1041
|
+
inputs: [],
|
|
1042
|
+
outputs: [
|
|
1043
|
+
{
|
|
1044
|
+
name: "",
|
|
1045
|
+
type: "bytes32",
|
|
1046
|
+
internalType: "bytes32"
|
|
1047
|
+
}
|
|
1048
|
+
],
|
|
1049
|
+
stateMutability: "view"
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
type: "function",
|
|
1053
|
+
name: "getMarketData",
|
|
1054
|
+
inputs: [
|
|
1055
|
+
{
|
|
1056
|
+
name: "pool",
|
|
1057
|
+
type: "address",
|
|
1058
|
+
internalType: "address"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
name: "configurator",
|
|
1062
|
+
type: "address",
|
|
1063
|
+
internalType: "address"
|
|
1064
|
+
}
|
|
1065
|
+
],
|
|
1066
|
+
outputs: [
|
|
1067
|
+
{
|
|
1068
|
+
name: "result",
|
|
1069
|
+
type: "tuple",
|
|
1070
|
+
internalType: "struct MarketData",
|
|
1071
|
+
components: [
|
|
1072
|
+
{
|
|
1073
|
+
name: "acl",
|
|
1074
|
+
type: "address",
|
|
1075
|
+
internalType: "address"
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
name: "contractsRegister",
|
|
1079
|
+
type: "address",
|
|
1080
|
+
internalType: "address"
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
name: "treasury",
|
|
1084
|
+
type: "address",
|
|
1085
|
+
internalType: "address"
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
name: "pool",
|
|
1089
|
+
type: "tuple",
|
|
1090
|
+
internalType: "struct PoolState",
|
|
1091
|
+
components: [
|
|
1092
|
+
{
|
|
1093
|
+
name: "baseParams",
|
|
1094
|
+
type: "tuple",
|
|
1095
|
+
internalType: "struct BaseParams",
|
|
1096
|
+
components: [
|
|
1097
|
+
{
|
|
1098
|
+
name: "addr",
|
|
1099
|
+
type: "address",
|
|
1100
|
+
internalType: "address"
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
name: "version",
|
|
1104
|
+
type: "uint256",
|
|
1105
|
+
internalType: "uint256"
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
name: "contractType",
|
|
1109
|
+
type: "bytes32",
|
|
1110
|
+
internalType: "bytes32"
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
name: "serializedParams",
|
|
1114
|
+
type: "bytes",
|
|
1115
|
+
internalType: "bytes"
|
|
1116
|
+
}
|
|
1117
|
+
]
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
name: "symbol",
|
|
1121
|
+
type: "string",
|
|
1122
|
+
internalType: "string"
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
name: "name",
|
|
1126
|
+
type: "string",
|
|
1127
|
+
internalType: "string"
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
name: "decimals",
|
|
1131
|
+
type: "uint8",
|
|
1132
|
+
internalType: "uint8"
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
name: "totalSupply",
|
|
1136
|
+
type: "uint256",
|
|
1137
|
+
internalType: "uint256"
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
name: "poolQuotaKeeper",
|
|
1141
|
+
type: "address",
|
|
1142
|
+
internalType: "address"
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
name: "interestRateModel",
|
|
1146
|
+
type: "address",
|
|
1147
|
+
internalType: "address"
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
name: "underlying",
|
|
1151
|
+
type: "address",
|
|
1152
|
+
internalType: "address"
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
name: "availableLiquidity",
|
|
1156
|
+
type: "uint256",
|
|
1157
|
+
internalType: "uint256"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
name: "expectedLiquidity",
|
|
1161
|
+
type: "uint256",
|
|
1162
|
+
internalType: "uint256"
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
name: "baseInterestIndex",
|
|
1166
|
+
type: "uint256",
|
|
1167
|
+
internalType: "uint256"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
name: "baseInterestRate",
|
|
1171
|
+
type: "uint256",
|
|
1172
|
+
internalType: "uint256"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
name: "dieselRate",
|
|
1176
|
+
type: "uint256",
|
|
1177
|
+
internalType: "uint256"
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
name: "supplyRate",
|
|
1181
|
+
type: "uint256",
|
|
1182
|
+
internalType: "uint256"
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
name: "withdrawFee",
|
|
1186
|
+
type: "uint256",
|
|
1187
|
+
internalType: "uint256"
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
name: "totalBorrowed",
|
|
1191
|
+
type: "uint256",
|
|
1192
|
+
internalType: "uint256"
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
name: "totalDebtLimit",
|
|
1196
|
+
type: "uint256",
|
|
1197
|
+
internalType: "uint256"
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
name: "creditManagerDebtParams",
|
|
1201
|
+
type: "tuple[]",
|
|
1202
|
+
internalType: "struct CreditManagerDebtParams[]",
|
|
1203
|
+
components: [
|
|
1204
|
+
{
|
|
1205
|
+
name: "creditManager",
|
|
1206
|
+
type: "address",
|
|
1207
|
+
internalType: "address"
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
name: "borrowed",
|
|
1211
|
+
type: "uint256",
|
|
1212
|
+
internalType: "uint256"
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
name: "limit",
|
|
1216
|
+
type: "uint256",
|
|
1217
|
+
internalType: "uint256"
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
name: "available",
|
|
1221
|
+
type: "uint256",
|
|
1222
|
+
internalType: "uint256"
|
|
1223
|
+
}
|
|
1224
|
+
]
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
name: "baseInterestIndexLU",
|
|
1228
|
+
type: "uint256",
|
|
1229
|
+
internalType: "uint256"
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
name: "expectedLiquidityLU",
|
|
1233
|
+
type: "uint256",
|
|
1234
|
+
internalType: "uint256"
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
name: "quotaRevenue",
|
|
1238
|
+
type: "uint256",
|
|
1239
|
+
internalType: "uint256"
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
name: "lastBaseInterestUpdate",
|
|
1243
|
+
type: "uint40",
|
|
1244
|
+
internalType: "uint40"
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
name: "lastQuotaRevenueUpdate",
|
|
1248
|
+
type: "uint40",
|
|
1249
|
+
internalType: "uint40"
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
name: "isPaused",
|
|
1253
|
+
type: "bool",
|
|
1254
|
+
internalType: "bool"
|
|
1255
|
+
}
|
|
1256
|
+
]
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
name: "poolQuotaKeeper",
|
|
1260
|
+
type: "tuple",
|
|
1261
|
+
internalType: "struct PoolQuotaKeeperState",
|
|
1262
|
+
components: [
|
|
1263
|
+
{
|
|
1264
|
+
name: "baseParams",
|
|
1265
|
+
type: "tuple",
|
|
1266
|
+
internalType: "struct BaseParams",
|
|
1267
|
+
components: [
|
|
1268
|
+
{
|
|
1269
|
+
name: "addr",
|
|
1270
|
+
type: "address",
|
|
1271
|
+
internalType: "address"
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
name: "version",
|
|
1275
|
+
type: "uint256",
|
|
1276
|
+
internalType: "uint256"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
name: "contractType",
|
|
1280
|
+
type: "bytes32",
|
|
1281
|
+
internalType: "bytes32"
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
name: "serializedParams",
|
|
1285
|
+
type: "bytes",
|
|
1286
|
+
internalType: "bytes"
|
|
1287
|
+
}
|
|
1288
|
+
]
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
name: "rateKeeper",
|
|
1292
|
+
type: "address",
|
|
1293
|
+
internalType: "address"
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
name: "quotas",
|
|
1297
|
+
type: "tuple[]",
|
|
1298
|
+
internalType: "struct QuotaTokenParams[]",
|
|
1299
|
+
components: [
|
|
1300
|
+
{
|
|
1301
|
+
name: "token",
|
|
1302
|
+
type: "address",
|
|
1303
|
+
internalType: "address"
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
name: "rate",
|
|
1307
|
+
type: "uint16",
|
|
1308
|
+
internalType: "uint16"
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
name: "cumulativeIndexLU",
|
|
1312
|
+
type: "uint192",
|
|
1313
|
+
internalType: "uint192"
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
name: "quotaIncreaseFee",
|
|
1317
|
+
type: "uint16",
|
|
1318
|
+
internalType: "uint16"
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
name: "totalQuoted",
|
|
1322
|
+
type: "uint96",
|
|
1323
|
+
internalType: "uint96"
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
name: "limit",
|
|
1327
|
+
type: "uint96",
|
|
1328
|
+
internalType: "uint96"
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
name: "isActive",
|
|
1332
|
+
type: "bool",
|
|
1333
|
+
internalType: "bool"
|
|
1334
|
+
}
|
|
1335
|
+
]
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
name: "creditManagers",
|
|
1339
|
+
type: "address[]",
|
|
1340
|
+
internalType: "address[]"
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
name: "lastQuotaRateUpdate",
|
|
1344
|
+
type: "uint40",
|
|
1345
|
+
internalType: "uint40"
|
|
1346
|
+
}
|
|
1347
|
+
]
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
name: "interestRateModel",
|
|
1351
|
+
type: "tuple",
|
|
1352
|
+
internalType: "struct BaseState",
|
|
1353
|
+
components: [
|
|
1354
|
+
{
|
|
1355
|
+
name: "baseParams",
|
|
1356
|
+
type: "tuple",
|
|
1357
|
+
internalType: "struct BaseParams",
|
|
1358
|
+
components: [
|
|
1359
|
+
{
|
|
1360
|
+
name: "addr",
|
|
1361
|
+
type: "address",
|
|
1362
|
+
internalType: "address"
|
|
1363
|
+
},
|
|
1364
|
+
{
|
|
1365
|
+
name: "version",
|
|
1366
|
+
type: "uint256",
|
|
1367
|
+
internalType: "uint256"
|
|
1368
|
+
},
|
|
1369
|
+
{
|
|
1370
|
+
name: "contractType",
|
|
1371
|
+
type: "bytes32",
|
|
1372
|
+
internalType: "bytes32"
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
name: "serializedParams",
|
|
1376
|
+
type: "bytes",
|
|
1377
|
+
internalType: "bytes"
|
|
1378
|
+
}
|
|
1379
|
+
]
|
|
1380
|
+
}
|
|
1381
|
+
]
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
name: "rateKeeper",
|
|
1385
|
+
type: "tuple",
|
|
1386
|
+
internalType: "struct RateKeeperState",
|
|
155
1387
|
components: [
|
|
156
|
-
{
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
1388
|
+
{
|
|
1389
|
+
name: "baseParams",
|
|
1390
|
+
type: "tuple",
|
|
1391
|
+
internalType: "struct BaseParams",
|
|
1392
|
+
components: [
|
|
1393
|
+
{
|
|
1394
|
+
name: "addr",
|
|
1395
|
+
type: "address",
|
|
1396
|
+
internalType: "address"
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
name: "version",
|
|
1400
|
+
type: "uint256",
|
|
1401
|
+
internalType: "uint256"
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
name: "contractType",
|
|
1405
|
+
type: "bytes32",
|
|
1406
|
+
internalType: "bytes32"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
name: "serializedParams",
|
|
1410
|
+
type: "bytes",
|
|
1411
|
+
internalType: "bytes"
|
|
1412
|
+
}
|
|
1413
|
+
]
|
|
1414
|
+
},
|
|
1415
|
+
{
|
|
1416
|
+
name: "rates",
|
|
1417
|
+
type: "tuple[]",
|
|
1418
|
+
internalType: "struct Rate[]",
|
|
1419
|
+
components: [
|
|
1420
|
+
{
|
|
1421
|
+
name: "token",
|
|
1422
|
+
type: "address",
|
|
1423
|
+
internalType: "address"
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
name: "rate",
|
|
1427
|
+
type: "uint16",
|
|
1428
|
+
internalType: "uint16"
|
|
1429
|
+
}
|
|
1430
|
+
]
|
|
1431
|
+
}
|
|
1432
|
+
]
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
name: "priceOracleData",
|
|
1436
|
+
type: "tuple",
|
|
1437
|
+
internalType: "struct PriceOracleState",
|
|
1438
|
+
components: [
|
|
1439
|
+
{
|
|
1440
|
+
name: "baseParams",
|
|
1441
|
+
type: "tuple",
|
|
1442
|
+
internalType: "struct BaseParams",
|
|
1443
|
+
components: [
|
|
1444
|
+
{
|
|
1445
|
+
name: "addr",
|
|
1446
|
+
type: "address",
|
|
1447
|
+
internalType: "address"
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
name: "version",
|
|
1451
|
+
type: "uint256",
|
|
1452
|
+
internalType: "uint256"
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
name: "contractType",
|
|
1456
|
+
type: "bytes32",
|
|
1457
|
+
internalType: "bytes32"
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
name: "serializedParams",
|
|
1461
|
+
type: "bytes",
|
|
1462
|
+
internalType: "bytes"
|
|
1463
|
+
}
|
|
1464
|
+
]
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
name: "priceFeedMapping",
|
|
1468
|
+
type: "tuple[]",
|
|
1469
|
+
internalType: "struct PriceFeedMapEntry[]",
|
|
1470
|
+
components: [
|
|
1471
|
+
{
|
|
1472
|
+
name: "token",
|
|
1473
|
+
type: "address",
|
|
1474
|
+
internalType: "address"
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
name: "reserve",
|
|
1478
|
+
type: "bool",
|
|
1479
|
+
internalType: "bool"
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
name: "priceFeed",
|
|
1483
|
+
type: "address",
|
|
1484
|
+
internalType: "address"
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
name: "stalenessPeriod",
|
|
1488
|
+
type: "uint32",
|
|
1489
|
+
internalType: "uint32"
|
|
1490
|
+
}
|
|
1491
|
+
]
|
|
1492
|
+
},
|
|
1493
|
+
{
|
|
1494
|
+
name: "priceFeedStructure",
|
|
1495
|
+
type: "tuple[]",
|
|
1496
|
+
internalType: "struct PriceFeedTreeNode[]",
|
|
1497
|
+
components: [
|
|
1498
|
+
{
|
|
1499
|
+
name: "baseParams",
|
|
1500
|
+
type: "tuple",
|
|
1501
|
+
internalType: "struct BaseParams",
|
|
1502
|
+
components: [
|
|
1503
|
+
{
|
|
1504
|
+
name: "addr",
|
|
1505
|
+
type: "address",
|
|
1506
|
+
internalType: "address"
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
name: "version",
|
|
1510
|
+
type: "uint256",
|
|
1511
|
+
internalType: "uint256"
|
|
1512
|
+
},
|
|
1513
|
+
{
|
|
1514
|
+
name: "contractType",
|
|
1515
|
+
type: "bytes32",
|
|
1516
|
+
internalType: "bytes32"
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
name: "serializedParams",
|
|
1520
|
+
type: "bytes",
|
|
1521
|
+
internalType: "bytes"
|
|
1522
|
+
}
|
|
1523
|
+
]
|
|
1524
|
+
},
|
|
1525
|
+
{
|
|
1526
|
+
name: "decimals",
|
|
1527
|
+
type: "uint8",
|
|
1528
|
+
internalType: "uint8"
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
name: "skipCheck",
|
|
1532
|
+
type: "bool",
|
|
1533
|
+
internalType: "bool"
|
|
1534
|
+
},
|
|
1535
|
+
{
|
|
1536
|
+
name: "updatable",
|
|
1537
|
+
type: "bool",
|
|
1538
|
+
internalType: "bool"
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
name: "underlyingFeeds",
|
|
1542
|
+
type: "address[]",
|
|
1543
|
+
internalType: "address[]"
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
name: "underlyingStalenessPeriods",
|
|
1547
|
+
type: "uint32[]",
|
|
1548
|
+
internalType: "uint32[]"
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
name: "answer",
|
|
1552
|
+
type: "tuple",
|
|
1553
|
+
internalType: "struct PriceFeedAnswer",
|
|
1554
|
+
components: [
|
|
1555
|
+
{
|
|
1556
|
+
name: "price",
|
|
1557
|
+
type: "int256",
|
|
1558
|
+
internalType: "int256"
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
name: "updatedAt",
|
|
1562
|
+
type: "uint256",
|
|
1563
|
+
internalType: "uint256"
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
name: "success",
|
|
1567
|
+
type: "bool",
|
|
1568
|
+
internalType: "bool"
|
|
1569
|
+
}
|
|
1570
|
+
]
|
|
1571
|
+
}
|
|
1572
|
+
]
|
|
1573
|
+
}
|
|
1574
|
+
]
|
|
1575
|
+
},
|
|
1576
|
+
{
|
|
1577
|
+
name: "lossPolicy",
|
|
1578
|
+
type: "tuple",
|
|
1579
|
+
internalType: "struct BaseState",
|
|
1580
|
+
components: [
|
|
1581
|
+
{
|
|
1582
|
+
name: "baseParams",
|
|
1583
|
+
type: "tuple",
|
|
1584
|
+
internalType: "struct BaseParams",
|
|
1585
|
+
components: [
|
|
1586
|
+
{
|
|
1587
|
+
name: "addr",
|
|
1588
|
+
type: "address",
|
|
1589
|
+
internalType: "address"
|
|
1590
|
+
},
|
|
1591
|
+
{
|
|
1592
|
+
name: "version",
|
|
1593
|
+
type: "uint256",
|
|
1594
|
+
internalType: "uint256"
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
name: "contractType",
|
|
1598
|
+
type: "bytes32",
|
|
1599
|
+
internalType: "bytes32"
|
|
1600
|
+
},
|
|
1601
|
+
{
|
|
1602
|
+
name: "serializedParams",
|
|
1603
|
+
type: "bytes",
|
|
1604
|
+
internalType: "bytes"
|
|
1605
|
+
}
|
|
1606
|
+
]
|
|
1607
|
+
}
|
|
1608
|
+
]
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
name: "tokens",
|
|
1612
|
+
type: "tuple[]",
|
|
1613
|
+
internalType: "struct TokenData[]",
|
|
1614
|
+
components: [
|
|
1615
|
+
{
|
|
1616
|
+
name: "addr",
|
|
1617
|
+
type: "address",
|
|
1618
|
+
internalType: "address"
|
|
1619
|
+
},
|
|
1620
|
+
{
|
|
1621
|
+
name: "symbol",
|
|
1622
|
+
type: "string",
|
|
1623
|
+
internalType: "string"
|
|
1624
|
+
},
|
|
1625
|
+
{
|
|
1626
|
+
name: "name",
|
|
1627
|
+
type: "string",
|
|
1628
|
+
internalType: "string"
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
name: "decimals",
|
|
1632
|
+
type: "uint8",
|
|
1633
|
+
internalType: "uint8"
|
|
1634
|
+
}
|
|
1635
|
+
]
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
name: "creditManagers",
|
|
1639
|
+
type: "tuple[]",
|
|
1640
|
+
internalType: "struct CreditSuiteData[]",
|
|
1641
|
+
components: [
|
|
1642
|
+
{
|
|
1643
|
+
name: "creditFacade",
|
|
1644
|
+
type: "tuple",
|
|
1645
|
+
internalType: "struct CreditFacadeState",
|
|
1646
|
+
components: [
|
|
1647
|
+
{
|
|
1648
|
+
name: "baseParams",
|
|
1649
|
+
type: "tuple",
|
|
1650
|
+
internalType: "struct BaseParams",
|
|
1651
|
+
components: [
|
|
1652
|
+
{
|
|
1653
|
+
name: "addr",
|
|
1654
|
+
type: "address",
|
|
1655
|
+
internalType: "address"
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
name: "version",
|
|
1659
|
+
type: "uint256",
|
|
1660
|
+
internalType: "uint256"
|
|
1661
|
+
},
|
|
1662
|
+
{
|
|
1663
|
+
name: "contractType",
|
|
1664
|
+
type: "bytes32",
|
|
1665
|
+
internalType: "bytes32"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
name: "serializedParams",
|
|
1669
|
+
type: "bytes",
|
|
1670
|
+
internalType: "bytes"
|
|
1671
|
+
}
|
|
1672
|
+
]
|
|
1673
|
+
},
|
|
1674
|
+
{
|
|
1675
|
+
name: "creditManager",
|
|
1676
|
+
type: "address",
|
|
1677
|
+
internalType: "address"
|
|
1678
|
+
},
|
|
1679
|
+
{
|
|
1680
|
+
name: "degenNFT",
|
|
1681
|
+
type: "address",
|
|
1682
|
+
internalType: "address"
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
name: "botList",
|
|
1686
|
+
type: "address",
|
|
1687
|
+
internalType: "address"
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
name: "expirable",
|
|
1691
|
+
type: "bool",
|
|
1692
|
+
internalType: "bool"
|
|
1693
|
+
},
|
|
1694
|
+
{
|
|
1695
|
+
name: "expirationDate",
|
|
1696
|
+
type: "uint40",
|
|
1697
|
+
internalType: "uint40"
|
|
1698
|
+
},
|
|
1699
|
+
{
|
|
1700
|
+
name: "maxDebtPerBlockMultiplier",
|
|
1701
|
+
type: "uint8",
|
|
1702
|
+
internalType: "uint8"
|
|
1703
|
+
},
|
|
1704
|
+
{
|
|
1705
|
+
name: "minDebt",
|
|
1706
|
+
type: "uint256",
|
|
1707
|
+
internalType: "uint256"
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
name: "maxDebt",
|
|
1711
|
+
type: "uint256",
|
|
1712
|
+
internalType: "uint256"
|
|
1713
|
+
},
|
|
1714
|
+
{
|
|
1715
|
+
name: "forbiddenTokenMask",
|
|
1716
|
+
type: "uint256",
|
|
1717
|
+
internalType: "uint256"
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
name: "isPaused",
|
|
1721
|
+
type: "bool",
|
|
1722
|
+
internalType: "bool"
|
|
1723
|
+
}
|
|
1724
|
+
]
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
name: "creditManager",
|
|
1728
|
+
type: "tuple",
|
|
1729
|
+
internalType: "struct CreditManagerState",
|
|
1730
|
+
components: [
|
|
1731
|
+
{
|
|
1732
|
+
name: "baseParams",
|
|
1733
|
+
type: "tuple",
|
|
1734
|
+
internalType: "struct BaseParams",
|
|
1735
|
+
components: [
|
|
1736
|
+
{
|
|
1737
|
+
name: "addr",
|
|
1738
|
+
type: "address",
|
|
1739
|
+
internalType: "address"
|
|
1740
|
+
},
|
|
1741
|
+
{
|
|
1742
|
+
name: "version",
|
|
1743
|
+
type: "uint256",
|
|
1744
|
+
internalType: "uint256"
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
name: "contractType",
|
|
1748
|
+
type: "bytes32",
|
|
1749
|
+
internalType: "bytes32"
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
name: "serializedParams",
|
|
1753
|
+
type: "bytes",
|
|
1754
|
+
internalType: "bytes"
|
|
1755
|
+
}
|
|
1756
|
+
]
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
name: "name",
|
|
1760
|
+
type: "string",
|
|
1761
|
+
internalType: "string"
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
name: "accountFactory",
|
|
1765
|
+
type: "address",
|
|
1766
|
+
internalType: "address"
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
name: "underlying",
|
|
1770
|
+
type: "address",
|
|
1771
|
+
internalType: "address"
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
name: "pool",
|
|
1775
|
+
type: "address",
|
|
1776
|
+
internalType: "address"
|
|
1777
|
+
},
|
|
1778
|
+
{
|
|
1779
|
+
name: "creditFacade",
|
|
1780
|
+
type: "address",
|
|
1781
|
+
internalType: "address"
|
|
1782
|
+
},
|
|
1783
|
+
{
|
|
1784
|
+
name: "creditConfigurator",
|
|
1785
|
+
type: "address",
|
|
1786
|
+
internalType: "address"
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
name: "maxEnabledTokens",
|
|
1790
|
+
type: "uint8",
|
|
1791
|
+
internalType: "uint8"
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
name: "collateralTokens",
|
|
1795
|
+
type: "tuple[]",
|
|
1796
|
+
internalType: "struct CollateralToken[]",
|
|
1797
|
+
components: [
|
|
1798
|
+
{
|
|
1799
|
+
name: "token",
|
|
1800
|
+
type: "address",
|
|
1801
|
+
internalType: "address"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
name: "liquidationThreshold",
|
|
1805
|
+
type: "uint16",
|
|
1806
|
+
internalType: "uint16"
|
|
1807
|
+
}
|
|
1808
|
+
]
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
name: "feeInterest",
|
|
1812
|
+
type: "uint16",
|
|
1813
|
+
internalType: "uint16"
|
|
1814
|
+
},
|
|
1815
|
+
{
|
|
1816
|
+
name: "feeLiquidation",
|
|
1817
|
+
type: "uint16",
|
|
1818
|
+
internalType: "uint16"
|
|
1819
|
+
},
|
|
1820
|
+
{
|
|
1821
|
+
name: "liquidationDiscount",
|
|
1822
|
+
type: "uint16",
|
|
1823
|
+
internalType: "uint16"
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
name: "feeLiquidationExpired",
|
|
1827
|
+
type: "uint16",
|
|
1828
|
+
internalType: "uint16"
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
name: "liquidationDiscountExpired",
|
|
1832
|
+
type: "uint16",
|
|
1833
|
+
internalType: "uint16"
|
|
1834
|
+
}
|
|
1835
|
+
]
|
|
1836
|
+
},
|
|
1837
|
+
{
|
|
1838
|
+
name: "creditConfigurator",
|
|
1839
|
+
type: "tuple",
|
|
1840
|
+
internalType: "struct BaseState",
|
|
1841
|
+
components: [
|
|
1842
|
+
{
|
|
1843
|
+
name: "baseParams",
|
|
1844
|
+
type: "tuple",
|
|
1845
|
+
internalType: "struct BaseParams",
|
|
1846
|
+
components: [
|
|
1847
|
+
{
|
|
1848
|
+
name: "addr",
|
|
1849
|
+
type: "address",
|
|
1850
|
+
internalType: "address"
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
name: "version",
|
|
1854
|
+
type: "uint256",
|
|
1855
|
+
internalType: "uint256"
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
name: "contractType",
|
|
1859
|
+
type: "bytes32",
|
|
1860
|
+
internalType: "bytes32"
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
name: "serializedParams",
|
|
1864
|
+
type: "bytes",
|
|
1865
|
+
internalType: "bytes"
|
|
1866
|
+
}
|
|
1867
|
+
]
|
|
1868
|
+
}
|
|
1869
|
+
]
|
|
1870
|
+
},
|
|
1871
|
+
{
|
|
1872
|
+
name: "adapters",
|
|
1873
|
+
type: "tuple[]",
|
|
1874
|
+
internalType: "struct AdapterState[]",
|
|
1875
|
+
components: [
|
|
1876
|
+
{
|
|
1877
|
+
name: "baseParams",
|
|
1878
|
+
type: "tuple",
|
|
1879
|
+
internalType: "struct BaseParams",
|
|
1880
|
+
components: [
|
|
1881
|
+
{
|
|
1882
|
+
name: "addr",
|
|
1883
|
+
type: "address",
|
|
1884
|
+
internalType: "address"
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
name: "version",
|
|
1888
|
+
type: "uint256",
|
|
1889
|
+
internalType: "uint256"
|
|
1890
|
+
},
|
|
1891
|
+
{
|
|
1892
|
+
name: "contractType",
|
|
1893
|
+
type: "bytes32",
|
|
1894
|
+
internalType: "bytes32"
|
|
1895
|
+
},
|
|
1896
|
+
{
|
|
1897
|
+
name: "serializedParams",
|
|
1898
|
+
type: "bytes",
|
|
1899
|
+
internalType: "bytes"
|
|
1900
|
+
}
|
|
1901
|
+
]
|
|
1902
|
+
},
|
|
1903
|
+
{
|
|
1904
|
+
name: "targetContract",
|
|
1905
|
+
type: "address",
|
|
1906
|
+
internalType: "address"
|
|
1907
|
+
}
|
|
1908
|
+
]
|
|
1909
|
+
}
|
|
161
1910
|
]
|
|
162
|
-
}
|
|
163
|
-
]
|
|
164
|
-
}
|
|
165
|
-
],
|
|
166
|
-
stateMutability: "view"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
type: "function",
|
|
170
|
-
inputs: [
|
|
171
|
-
{
|
|
172
|
-
name: "cmFilter",
|
|
173
|
-
internalType: "struct MarketFilter",
|
|
174
|
-
type: "tuple",
|
|
175
|
-
components: [
|
|
176
|
-
{ name: "curators", internalType: "address[]", type: "address[]" },
|
|
177
|
-
{ name: "pools", internalType: "address[]", type: "address[]" },
|
|
178
|
-
{ name: "underlying", internalType: "address", type: "address" }
|
|
179
|
-
]
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
name: "caFilter",
|
|
183
|
-
internalType: "struct CreditAccountFilter",
|
|
184
|
-
type: "tuple",
|
|
185
|
-
components: [
|
|
186
|
-
{ name: "owner", internalType: "address", type: "address" },
|
|
187
|
-
{ name: "includeZeroDebt", internalType: "bool", type: "bool" },
|
|
188
|
-
{ name: "minHealthFactor", internalType: "uint16", type: "uint16" },
|
|
189
|
-
{ name: "maxHealthFactor", internalType: "uint16", type: "uint16" },
|
|
190
|
-
{ name: "reverting", internalType: "bool", type: "bool" }
|
|
191
|
-
]
|
|
192
|
-
},
|
|
193
|
-
{ name: "offset", internalType: "uint256", type: "uint256" }
|
|
194
|
-
],
|
|
195
|
-
name: "getCreditAccounts",
|
|
196
|
-
outputs: [
|
|
197
|
-
{
|
|
198
|
-
name: "data",
|
|
199
|
-
internalType: "struct CreditAccountData[]",
|
|
200
|
-
type: "tuple[]",
|
|
201
|
-
components: [
|
|
202
|
-
{ name: "creditAccount", internalType: "address", type: "address" },
|
|
203
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
204
|
-
{ name: "creditFacade", internalType: "address", type: "address" },
|
|
205
|
-
{ name: "underlying", internalType: "address", type: "address" },
|
|
206
|
-
{ name: "owner", internalType: "address", type: "address" },
|
|
207
|
-
{
|
|
208
|
-
name: "enabledTokensMask",
|
|
209
|
-
internalType: "uint256",
|
|
210
|
-
type: "uint256"
|
|
211
1911
|
},
|
|
212
|
-
{ name: "debt", internalType: "uint256", type: "uint256" },
|
|
213
|
-
{ name: "accruedInterest", internalType: "uint256", type: "uint256" },
|
|
214
|
-
{ name: "accruedFees", internalType: "uint256", type: "uint256" },
|
|
215
|
-
{ name: "totalDebtUSD", internalType: "uint256", type: "uint256" },
|
|
216
|
-
{ name: "totalValueUSD", internalType: "uint256", type: "uint256" },
|
|
217
|
-
{ name: "twvUSD", internalType: "uint256", type: "uint256" },
|
|
218
|
-
{ name: "totalValue", internalType: "uint256", type: "uint256" },
|
|
219
|
-
{ name: "healthFactor", internalType: "uint16", type: "uint16" },
|
|
220
|
-
{ name: "success", internalType: "bool", type: "bool" },
|
|
221
|
-
{
|
|
222
|
-
name: "tokens",
|
|
223
|
-
internalType: "struct TokenInfo[]",
|
|
224
|
-
type: "tuple[]",
|
|
225
|
-
components: [
|
|
226
|
-
{ name: "token", internalType: "address", type: "address" },
|
|
227
|
-
{ name: "mask", internalType: "uint256", type: "uint256" },
|
|
228
|
-
{ name: "balance", internalType: "uint256", type: "uint256" },
|
|
229
|
-
{ name: "quota", internalType: "uint256", type: "uint256" },
|
|
230
|
-
{ name: "success", internalType: "bool", type: "bool" }
|
|
231
|
-
]
|
|
232
|
-
}
|
|
233
|
-
]
|
|
234
|
-
},
|
|
235
|
-
{ name: "nextOffset", internalType: "uint256", type: "uint256" }
|
|
236
|
-
],
|
|
237
|
-
stateMutability: "view"
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
type: "function",
|
|
241
|
-
inputs: [
|
|
242
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
243
|
-
{
|
|
244
|
-
name: "caFilter",
|
|
245
|
-
internalType: "struct CreditAccountFilter",
|
|
246
|
-
type: "tuple",
|
|
247
|
-
components: [
|
|
248
|
-
{ name: "owner", internalType: "address", type: "address" },
|
|
249
|
-
{ name: "includeZeroDebt", internalType: "bool", type: "bool" },
|
|
250
|
-
{ name: "minHealthFactor", internalType: "uint16", type: "uint16" },
|
|
251
|
-
{ name: "maxHealthFactor", internalType: "uint16", type: "uint16" },
|
|
252
|
-
{ name: "reverting", internalType: "bool", type: "bool" }
|
|
253
|
-
]
|
|
254
|
-
},
|
|
255
|
-
{ name: "offset", internalType: "uint256", type: "uint256" }
|
|
256
|
-
],
|
|
257
|
-
name: "getCreditAccounts",
|
|
258
|
-
outputs: [
|
|
259
|
-
{
|
|
260
|
-
name: "data",
|
|
261
|
-
internalType: "struct CreditAccountData[]",
|
|
262
|
-
type: "tuple[]",
|
|
263
|
-
components: [
|
|
264
|
-
{ name: "creditAccount", internalType: "address", type: "address" },
|
|
265
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
266
|
-
{ name: "creditFacade", internalType: "address", type: "address" },
|
|
267
|
-
{ name: "underlying", internalType: "address", type: "address" },
|
|
268
|
-
{ name: "owner", internalType: "address", type: "address" },
|
|
269
1912
|
{
|
|
270
|
-
name: "
|
|
271
|
-
|
|
272
|
-
|
|
1913
|
+
name: "configurator",
|
|
1914
|
+
type: "address",
|
|
1915
|
+
internalType: "address"
|
|
273
1916
|
},
|
|
274
|
-
{ name: "debt", internalType: "uint256", type: "uint256" },
|
|
275
|
-
{ name: "accruedInterest", internalType: "uint256", type: "uint256" },
|
|
276
|
-
{ name: "accruedFees", internalType: "uint256", type: "uint256" },
|
|
277
|
-
{ name: "totalDebtUSD", internalType: "uint256", type: "uint256" },
|
|
278
|
-
{ name: "totalValueUSD", internalType: "uint256", type: "uint256" },
|
|
279
|
-
{ name: "twvUSD", internalType: "uint256", type: "uint256" },
|
|
280
|
-
{ name: "totalValue", internalType: "uint256", type: "uint256" },
|
|
281
|
-
{ name: "healthFactor", internalType: "uint16", type: "uint16" },
|
|
282
|
-
{ name: "success", internalType: "bool", type: "bool" },
|
|
283
|
-
{
|
|
284
|
-
name: "tokens",
|
|
285
|
-
internalType: "struct TokenInfo[]",
|
|
286
|
-
type: "tuple[]",
|
|
287
|
-
components: [
|
|
288
|
-
{ name: "token", internalType: "address", type: "address" },
|
|
289
|
-
{ name: "mask", internalType: "uint256", type: "uint256" },
|
|
290
|
-
{ name: "balance", internalType: "uint256", type: "uint256" },
|
|
291
|
-
{ name: "quota", internalType: "uint256", type: "uint256" },
|
|
292
|
-
{ name: "success", internalType: "bool", type: "bool" }
|
|
293
|
-
]
|
|
294
|
-
}
|
|
295
|
-
]
|
|
296
|
-
},
|
|
297
|
-
{ name: "nextOffset", internalType: "uint256", type: "uint256" }
|
|
298
|
-
],
|
|
299
|
-
stateMutability: "view"
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
type: "function",
|
|
303
|
-
inputs: [
|
|
304
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
305
|
-
{
|
|
306
|
-
name: "caFilter",
|
|
307
|
-
internalType: "struct CreditAccountFilter",
|
|
308
|
-
type: "tuple",
|
|
309
|
-
components: [
|
|
310
|
-
{ name: "owner", internalType: "address", type: "address" },
|
|
311
|
-
{ name: "includeZeroDebt", internalType: "bool", type: "bool" },
|
|
312
|
-
{ name: "minHealthFactor", internalType: "uint16", type: "uint16" },
|
|
313
|
-
{ name: "maxHealthFactor", internalType: "uint16", type: "uint16" },
|
|
314
|
-
{ name: "reverting", internalType: "bool", type: "bool" }
|
|
315
|
-
]
|
|
316
|
-
},
|
|
317
|
-
{ name: "offset", internalType: "uint256", type: "uint256" },
|
|
318
|
-
{ name: "limit", internalType: "uint256", type: "uint256" }
|
|
319
|
-
],
|
|
320
|
-
name: "getCreditAccounts",
|
|
321
|
-
outputs: [
|
|
322
|
-
{
|
|
323
|
-
name: "data",
|
|
324
|
-
internalType: "struct CreditAccountData[]",
|
|
325
|
-
type: "tuple[]",
|
|
326
|
-
components: [
|
|
327
|
-
{ name: "creditAccount", internalType: "address", type: "address" },
|
|
328
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
329
|
-
{ name: "creditFacade", internalType: "address", type: "address" },
|
|
330
|
-
{ name: "underlying", internalType: "address", type: "address" },
|
|
331
|
-
{ name: "owner", internalType: "address", type: "address" },
|
|
332
1917
|
{
|
|
333
|
-
name: "
|
|
334
|
-
|
|
335
|
-
|
|
1918
|
+
name: "pausableAdmins",
|
|
1919
|
+
type: "address[]",
|
|
1920
|
+
internalType: "address[]"
|
|
336
1921
|
},
|
|
337
|
-
{ name: "debt", internalType: "uint256", type: "uint256" },
|
|
338
|
-
{ name: "accruedInterest", internalType: "uint256", type: "uint256" },
|
|
339
|
-
{ name: "accruedFees", internalType: "uint256", type: "uint256" },
|
|
340
|
-
{ name: "totalDebtUSD", internalType: "uint256", type: "uint256" },
|
|
341
|
-
{ name: "totalValueUSD", internalType: "uint256", type: "uint256" },
|
|
342
|
-
{ name: "twvUSD", internalType: "uint256", type: "uint256" },
|
|
343
|
-
{ name: "totalValue", internalType: "uint256", type: "uint256" },
|
|
344
|
-
{ name: "healthFactor", internalType: "uint16", type: "uint16" },
|
|
345
|
-
{ name: "success", internalType: "bool", type: "bool" },
|
|
346
1922
|
{
|
|
347
|
-
name: "
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
{ name: "token", internalType: "address", type: "address" },
|
|
352
|
-
{ name: "mask", internalType: "uint256", type: "uint256" },
|
|
353
|
-
{ name: "balance", internalType: "uint256", type: "uint256" },
|
|
354
|
-
{ name: "quota", internalType: "uint256", type: "uint256" },
|
|
355
|
-
{ name: "success", internalType: "bool", type: "bool" }
|
|
356
|
-
]
|
|
357
|
-
}
|
|
358
|
-
]
|
|
359
|
-
},
|
|
360
|
-
{ name: "nextOffset", internalType: "uint256", type: "uint256" }
|
|
361
|
-
],
|
|
362
|
-
stateMutability: "view"
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
type: "function",
|
|
366
|
-
inputs: [
|
|
367
|
-
{
|
|
368
|
-
name: "cmFilter",
|
|
369
|
-
internalType: "struct MarketFilter",
|
|
370
|
-
type: "tuple",
|
|
371
|
-
components: [
|
|
372
|
-
{ name: "curators", internalType: "address[]", type: "address[]" },
|
|
373
|
-
{ name: "pools", internalType: "address[]", type: "address[]" },
|
|
374
|
-
{ name: "underlying", internalType: "address", type: "address" }
|
|
375
|
-
]
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
name: "caFilter",
|
|
379
|
-
internalType: "struct CreditAccountFilter",
|
|
380
|
-
type: "tuple",
|
|
381
|
-
components: [
|
|
382
|
-
{ name: "owner", internalType: "address", type: "address" },
|
|
383
|
-
{ name: "includeZeroDebt", internalType: "bool", type: "bool" },
|
|
384
|
-
{ name: "minHealthFactor", internalType: "uint16", type: "uint16" },
|
|
385
|
-
{ name: "maxHealthFactor", internalType: "uint16", type: "uint16" },
|
|
386
|
-
{ name: "reverting", internalType: "bool", type: "bool" }
|
|
387
|
-
]
|
|
388
|
-
},
|
|
389
|
-
{ name: "offset", internalType: "uint256", type: "uint256" },
|
|
390
|
-
{ name: "limit", internalType: "uint256", type: "uint256" }
|
|
391
|
-
],
|
|
392
|
-
name: "getCreditAccounts",
|
|
393
|
-
outputs: [
|
|
394
|
-
{
|
|
395
|
-
name: "data",
|
|
396
|
-
internalType: "struct CreditAccountData[]",
|
|
397
|
-
type: "tuple[]",
|
|
398
|
-
components: [
|
|
399
|
-
{ name: "creditAccount", internalType: "address", type: "address" },
|
|
400
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
401
|
-
{ name: "creditFacade", internalType: "address", type: "address" },
|
|
402
|
-
{ name: "underlying", internalType: "address", type: "address" },
|
|
403
|
-
{ name: "owner", internalType: "address", type: "address" },
|
|
1923
|
+
name: "unpausableAdmins",
|
|
1924
|
+
type: "address[]",
|
|
1925
|
+
internalType: "address[]"
|
|
1926
|
+
},
|
|
404
1927
|
{
|
|
405
|
-
name: "
|
|
406
|
-
|
|
407
|
-
|
|
1928
|
+
name: "emergencyLiquidators",
|
|
1929
|
+
type: "address[]",
|
|
1930
|
+
internalType: "address[]"
|
|
408
1931
|
},
|
|
409
|
-
{ name: "debt", internalType: "uint256", type: "uint256" },
|
|
410
|
-
{ name: "accruedInterest", internalType: "uint256", type: "uint256" },
|
|
411
|
-
{ name: "accruedFees", internalType: "uint256", type: "uint256" },
|
|
412
|
-
{ name: "totalDebtUSD", internalType: "uint256", type: "uint256" },
|
|
413
|
-
{ name: "totalValueUSD", internalType: "uint256", type: "uint256" },
|
|
414
|
-
{ name: "twvUSD", internalType: "uint256", type: "uint256" },
|
|
415
|
-
{ name: "totalValue", internalType: "uint256", type: "uint256" },
|
|
416
|
-
{ name: "healthFactor", internalType: "uint16", type: "uint16" },
|
|
417
|
-
{ name: "success", internalType: "bool", type: "bool" },
|
|
418
1932
|
{
|
|
419
|
-
name: "
|
|
420
|
-
internalType: "struct TokenInfo[]",
|
|
1933
|
+
name: "zappers",
|
|
421
1934
|
type: "tuple[]",
|
|
1935
|
+
internalType: "struct ZapperState[]",
|
|
422
1936
|
components: [
|
|
423
|
-
{
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
1937
|
+
{
|
|
1938
|
+
name: "baseParams",
|
|
1939
|
+
type: "tuple",
|
|
1940
|
+
internalType: "struct BaseParams",
|
|
1941
|
+
components: [
|
|
1942
|
+
{
|
|
1943
|
+
name: "addr",
|
|
1944
|
+
type: "address",
|
|
1945
|
+
internalType: "address"
|
|
1946
|
+
},
|
|
1947
|
+
{
|
|
1948
|
+
name: "version",
|
|
1949
|
+
type: "uint256",
|
|
1950
|
+
internalType: "uint256"
|
|
1951
|
+
},
|
|
1952
|
+
{
|
|
1953
|
+
name: "contractType",
|
|
1954
|
+
type: "bytes32",
|
|
1955
|
+
internalType: "bytes32"
|
|
1956
|
+
},
|
|
1957
|
+
{
|
|
1958
|
+
name: "serializedParams",
|
|
1959
|
+
type: "bytes",
|
|
1960
|
+
internalType: "bytes"
|
|
1961
|
+
}
|
|
1962
|
+
]
|
|
1963
|
+
},
|
|
1964
|
+
{
|
|
1965
|
+
name: "tokenIn",
|
|
1966
|
+
type: "tuple",
|
|
1967
|
+
internalType: "struct TokenData",
|
|
1968
|
+
components: [
|
|
1969
|
+
{
|
|
1970
|
+
name: "addr",
|
|
1971
|
+
type: "address",
|
|
1972
|
+
internalType: "address"
|
|
1973
|
+
},
|
|
1974
|
+
{
|
|
1975
|
+
name: "symbol",
|
|
1976
|
+
type: "string",
|
|
1977
|
+
internalType: "string"
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
name: "name",
|
|
1981
|
+
type: "string",
|
|
1982
|
+
internalType: "string"
|
|
1983
|
+
},
|
|
1984
|
+
{
|
|
1985
|
+
name: "decimals",
|
|
1986
|
+
type: "uint8",
|
|
1987
|
+
internalType: "uint8"
|
|
1988
|
+
}
|
|
1989
|
+
]
|
|
1990
|
+
},
|
|
1991
|
+
{
|
|
1992
|
+
name: "tokenOut",
|
|
1993
|
+
type: "tuple",
|
|
1994
|
+
internalType: "struct TokenData",
|
|
1995
|
+
components: [
|
|
1996
|
+
{
|
|
1997
|
+
name: "addr",
|
|
1998
|
+
type: "address",
|
|
1999
|
+
internalType: "address"
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
name: "symbol",
|
|
2003
|
+
type: "string",
|
|
2004
|
+
internalType: "string"
|
|
2005
|
+
},
|
|
2006
|
+
{
|
|
2007
|
+
name: "name",
|
|
2008
|
+
type: "string",
|
|
2009
|
+
internalType: "string"
|
|
2010
|
+
},
|
|
2011
|
+
{
|
|
2012
|
+
name: "decimals",
|
|
2013
|
+
type: "uint8",
|
|
2014
|
+
internalType: "uint8"
|
|
2015
|
+
}
|
|
2016
|
+
]
|
|
2017
|
+
}
|
|
428
2018
|
]
|
|
429
2019
|
}
|
|
430
2020
|
]
|
|
431
|
-
},
|
|
432
|
-
{ name: "nextOffset", internalType: "uint256", type: "uint256" }
|
|
433
|
-
],
|
|
434
|
-
stateMutability: "view"
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
type: "function",
|
|
438
|
-
inputs: [],
|
|
439
|
-
name: "version",
|
|
440
|
-
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
441
|
-
stateMutability: "view"
|
|
442
|
-
}
|
|
443
|
-
];
|
|
444
|
-
var iMarketCompressorAbi = [
|
|
445
|
-
{
|
|
446
|
-
type: "function",
|
|
447
|
-
name: "contractType",
|
|
448
|
-
inputs: [],
|
|
449
|
-
outputs: [
|
|
450
|
-
{
|
|
451
|
-
name: "",
|
|
452
|
-
type: "bytes32",
|
|
453
|
-
internalType: "bytes32"
|
|
454
2021
|
}
|
|
455
2022
|
],
|
|
456
2023
|
stateMutability: "view"
|
|
@@ -472,46 +2039,19 @@ var iMarketCompressorAbi = [
|
|
|
472
2039
|
internalType: "struct MarketData",
|
|
473
2040
|
components: [
|
|
474
2041
|
{
|
|
475
|
-
name: "
|
|
476
|
-
type: "tuple",
|
|
477
|
-
internalType: "struct BaseParams",
|
|
478
|
-
components: [
|
|
479
|
-
{
|
|
480
|
-
name: "addr",
|
|
481
|
-
type: "address",
|
|
482
|
-
internalType: "address"
|
|
483
|
-
},
|
|
484
|
-
{
|
|
485
|
-
name: "version",
|
|
486
|
-
type: "uint256",
|
|
487
|
-
internalType: "uint256"
|
|
488
|
-
},
|
|
489
|
-
{
|
|
490
|
-
name: "contractType",
|
|
491
|
-
type: "bytes32",
|
|
492
|
-
internalType: "bytes32"
|
|
493
|
-
},
|
|
494
|
-
{
|
|
495
|
-
name: "serializedParams",
|
|
496
|
-
type: "bytes",
|
|
497
|
-
internalType: "bytes"
|
|
498
|
-
}
|
|
499
|
-
]
|
|
500
|
-
},
|
|
501
|
-
{
|
|
502
|
-
name: "owner",
|
|
2042
|
+
name: "acl",
|
|
503
2043
|
type: "address",
|
|
504
2044
|
internalType: "address"
|
|
505
2045
|
},
|
|
506
2046
|
{
|
|
507
|
-
name: "
|
|
2047
|
+
name: "contractsRegister",
|
|
508
2048
|
type: "address",
|
|
509
2049
|
internalType: "address"
|
|
510
2050
|
},
|
|
511
2051
|
{
|
|
512
|
-
name: "
|
|
513
|
-
type: "
|
|
514
|
-
internalType: "
|
|
2052
|
+
name: "treasury",
|
|
2053
|
+
type: "address",
|
|
2054
|
+
internalType: "address"
|
|
515
2055
|
},
|
|
516
2056
|
{
|
|
517
2057
|
name: "pool",
|
|
@@ -575,16 +2115,6 @@ var iMarketCompressorAbi = [
|
|
|
575
2115
|
type: "address",
|
|
576
2116
|
internalType: "address"
|
|
577
2117
|
},
|
|
578
|
-
{
|
|
579
|
-
name: "treasury",
|
|
580
|
-
type: "address",
|
|
581
|
-
internalType: "address"
|
|
582
|
-
},
|
|
583
|
-
{
|
|
584
|
-
name: "controller",
|
|
585
|
-
type: "address",
|
|
586
|
-
internalType: "address"
|
|
587
|
-
},
|
|
588
2118
|
{
|
|
589
2119
|
name: "underlying",
|
|
590
2120
|
type: "address",
|
|
@@ -616,22 +2146,17 @@ var iMarketCompressorAbi = [
|
|
|
616
2146
|
internalType: "uint256"
|
|
617
2147
|
},
|
|
618
2148
|
{
|
|
619
|
-
name: "
|
|
620
|
-
type: "uint256",
|
|
621
|
-
internalType: "uint256"
|
|
622
|
-
},
|
|
623
|
-
{
|
|
624
|
-
name: "totalAssets",
|
|
2149
|
+
name: "supplyRate",
|
|
625
2150
|
type: "uint256",
|
|
626
2151
|
internalType: "uint256"
|
|
627
2152
|
},
|
|
628
2153
|
{
|
|
629
|
-
name: "
|
|
2154
|
+
name: "withdrawFee",
|
|
630
2155
|
type: "uint256",
|
|
631
2156
|
internalType: "uint256"
|
|
632
2157
|
},
|
|
633
2158
|
{
|
|
634
|
-
name: "
|
|
2159
|
+
name: "totalBorrowed",
|
|
635
2160
|
type: "uint256",
|
|
636
2161
|
internalType: "uint256"
|
|
637
2162
|
},
|
|
@@ -659,6 +2184,11 @@ var iMarketCompressorAbi = [
|
|
|
659
2184
|
name: "limit",
|
|
660
2185
|
type: "uint256",
|
|
661
2186
|
internalType: "uint256"
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
name: "available",
|
|
2190
|
+
type: "uint256",
|
|
2191
|
+
internalType: "uint256"
|
|
662
2192
|
}
|
|
663
2193
|
]
|
|
664
2194
|
},
|
|
@@ -1012,6 +2542,40 @@ var iMarketCompressorAbi = [
|
|
|
1012
2542
|
}
|
|
1013
2543
|
]
|
|
1014
2544
|
},
|
|
2545
|
+
{
|
|
2546
|
+
name: "lossPolicy",
|
|
2547
|
+
type: "tuple",
|
|
2548
|
+
internalType: "struct BaseState",
|
|
2549
|
+
components: [
|
|
2550
|
+
{
|
|
2551
|
+
name: "baseParams",
|
|
2552
|
+
type: "tuple",
|
|
2553
|
+
internalType: "struct BaseParams",
|
|
2554
|
+
components: [
|
|
2555
|
+
{
|
|
2556
|
+
name: "addr",
|
|
2557
|
+
type: "address",
|
|
2558
|
+
internalType: "address"
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
name: "version",
|
|
2562
|
+
type: "uint256",
|
|
2563
|
+
internalType: "uint256"
|
|
2564
|
+
},
|
|
2565
|
+
{
|
|
2566
|
+
name: "contractType",
|
|
2567
|
+
type: "bytes32",
|
|
2568
|
+
internalType: "bytes32"
|
|
2569
|
+
},
|
|
2570
|
+
{
|
|
2571
|
+
name: "serializedParams",
|
|
2572
|
+
type: "bytes",
|
|
2573
|
+
internalType: "bytes"
|
|
2574
|
+
}
|
|
2575
|
+
]
|
|
2576
|
+
}
|
|
2577
|
+
]
|
|
2578
|
+
},
|
|
1015
2579
|
{
|
|
1016
2580
|
name: "tokens",
|
|
1017
2581
|
type: "tuple[]",
|
|
@@ -1042,7 +2606,7 @@ var iMarketCompressorAbi = [
|
|
|
1042
2606
|
{
|
|
1043
2607
|
name: "creditManagers",
|
|
1044
2608
|
type: "tuple[]",
|
|
1045
|
-
internalType: "struct
|
|
2609
|
+
internalType: "struct CreditSuiteData[]",
|
|
1046
2610
|
components: [
|
|
1047
2611
|
{
|
|
1048
2612
|
name: "creditFacade",
|
|
@@ -1077,17 +2641,17 @@ var iMarketCompressorAbi = [
|
|
|
1077
2641
|
]
|
|
1078
2642
|
},
|
|
1079
2643
|
{
|
|
1080
|
-
name: "
|
|
1081
|
-
type: "
|
|
1082
|
-
internalType: "
|
|
2644
|
+
name: "creditManager",
|
|
2645
|
+
type: "address",
|
|
2646
|
+
internalType: "address"
|
|
1083
2647
|
},
|
|
1084
2648
|
{
|
|
1085
|
-
name: "
|
|
2649
|
+
name: "degenNFT",
|
|
1086
2650
|
type: "address",
|
|
1087
2651
|
internalType: "address"
|
|
1088
2652
|
},
|
|
1089
2653
|
{
|
|
1090
|
-
name: "
|
|
2654
|
+
name: "botList",
|
|
1091
2655
|
type: "address",
|
|
1092
2656
|
internalType: "address"
|
|
1093
2657
|
},
|
|
@@ -1096,11 +2660,6 @@ var iMarketCompressorAbi = [
|
|
|
1096
2660
|
type: "bool",
|
|
1097
2661
|
internalType: "bool"
|
|
1098
2662
|
},
|
|
1099
|
-
{
|
|
1100
|
-
name: "degenNFT",
|
|
1101
|
-
type: "address",
|
|
1102
|
-
internalType: "address"
|
|
1103
|
-
},
|
|
1104
2663
|
{
|
|
1105
2664
|
name: "expirationDate",
|
|
1106
2665
|
type: "uint40",
|
|
@@ -1111,11 +2670,6 @@ var iMarketCompressorAbi = [
|
|
|
1111
2670
|
type: "uint8",
|
|
1112
2671
|
internalType: "uint8"
|
|
1113
2672
|
},
|
|
1114
|
-
{
|
|
1115
|
-
name: "botList",
|
|
1116
|
-
type: "address",
|
|
1117
|
-
internalType: "address"
|
|
1118
|
-
},
|
|
1119
2673
|
{
|
|
1120
2674
|
name: "minDebt",
|
|
1121
2675
|
type: "uint256",
|
|
@@ -1131,11 +2685,6 @@ var iMarketCompressorAbi = [
|
|
|
1131
2685
|
type: "uint256",
|
|
1132
2686
|
internalType: "uint256"
|
|
1133
2687
|
},
|
|
1134
|
-
{
|
|
1135
|
-
name: "lossLiquidator",
|
|
1136
|
-
type: "address",
|
|
1137
|
-
internalType: "address"
|
|
1138
|
-
},
|
|
1139
2688
|
{
|
|
1140
2689
|
name: "isPaused",
|
|
1141
2690
|
type: "bool",
|
|
@@ -1205,11 +2754,6 @@ var iMarketCompressorAbi = [
|
|
|
1205
2754
|
type: "address",
|
|
1206
2755
|
internalType: "address"
|
|
1207
2756
|
},
|
|
1208
|
-
{
|
|
1209
|
-
name: "priceOracle",
|
|
1210
|
-
type: "address",
|
|
1211
|
-
internalType: "address"
|
|
1212
|
-
},
|
|
1213
2757
|
{
|
|
1214
2758
|
name: "maxEnabledTokens",
|
|
1215
2759
|
type: "uint8",
|
|
@@ -1217,13 +2761,20 @@ var iMarketCompressorAbi = [
|
|
|
1217
2761
|
},
|
|
1218
2762
|
{
|
|
1219
2763
|
name: "collateralTokens",
|
|
1220
|
-
type: "
|
|
1221
|
-
internalType: "
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
2764
|
+
type: "tuple[]",
|
|
2765
|
+
internalType: "struct CollateralToken[]",
|
|
2766
|
+
components: [
|
|
2767
|
+
{
|
|
2768
|
+
name: "token",
|
|
2769
|
+
type: "address",
|
|
2770
|
+
internalType: "address"
|
|
2771
|
+
},
|
|
2772
|
+
{
|
|
2773
|
+
name: "liquidationThreshold",
|
|
2774
|
+
type: "uint16",
|
|
2775
|
+
internalType: "uint16"
|
|
2776
|
+
}
|
|
2777
|
+
]
|
|
1227
2778
|
},
|
|
1228
2779
|
{
|
|
1229
2780
|
name: "feeInterest",
|
|
@@ -1289,7 +2840,7 @@ var iMarketCompressorAbi = [
|
|
|
1289
2840
|
{
|
|
1290
2841
|
name: "adapters",
|
|
1291
2842
|
type: "tuple[]",
|
|
1292
|
-
internalType: "struct
|
|
2843
|
+
internalType: "struct AdapterState[]",
|
|
1293
2844
|
components: [
|
|
1294
2845
|
{
|
|
1295
2846
|
name: "baseParams",
|
|
@@ -1324,28 +2875,33 @@ var iMarketCompressorAbi = [
|
|
|
1324
2875
|
internalType: "address"
|
|
1325
2876
|
}
|
|
1326
2877
|
]
|
|
1327
|
-
},
|
|
1328
|
-
{
|
|
1329
|
-
name: "totalDebt",
|
|
1330
|
-
type: "uint256",
|
|
1331
|
-
internalType: "uint256"
|
|
1332
|
-
},
|
|
1333
|
-
{
|
|
1334
|
-
name: "totalDebtLimit",
|
|
1335
|
-
type: "uint256",
|
|
1336
|
-
internalType: "uint256"
|
|
1337
|
-
},
|
|
1338
|
-
{
|
|
1339
|
-
name: "availableToBorrow",
|
|
1340
|
-
type: "uint256",
|
|
1341
|
-
internalType: "uint256"
|
|
1342
2878
|
}
|
|
1343
2879
|
]
|
|
1344
2880
|
},
|
|
2881
|
+
{
|
|
2882
|
+
name: "configurator",
|
|
2883
|
+
type: "address",
|
|
2884
|
+
internalType: "address"
|
|
2885
|
+
},
|
|
2886
|
+
{
|
|
2887
|
+
name: "pausableAdmins",
|
|
2888
|
+
type: "address[]",
|
|
2889
|
+
internalType: "address[]"
|
|
2890
|
+
},
|
|
2891
|
+
{
|
|
2892
|
+
name: "unpausableAdmins",
|
|
2893
|
+
type: "address[]",
|
|
2894
|
+
internalType: "address[]"
|
|
2895
|
+
},
|
|
2896
|
+
{
|
|
2897
|
+
name: "emergencyLiquidators",
|
|
2898
|
+
type: "address[]",
|
|
2899
|
+
internalType: "address[]"
|
|
2900
|
+
},
|
|
1345
2901
|
{
|
|
1346
2902
|
name: "zappers",
|
|
1347
2903
|
type: "tuple[]",
|
|
1348
|
-
internalType: "struct
|
|
2904
|
+
internalType: "struct ZapperState[]",
|
|
1349
2905
|
components: [
|
|
1350
2906
|
{
|
|
1351
2907
|
name: "baseParams",
|
|
@@ -1376,30 +2932,59 @@ var iMarketCompressorAbi = [
|
|
|
1376
2932
|
},
|
|
1377
2933
|
{
|
|
1378
2934
|
name: "tokenIn",
|
|
1379
|
-
type: "
|
|
1380
|
-
internalType: "
|
|
2935
|
+
type: "tuple",
|
|
2936
|
+
internalType: "struct TokenData",
|
|
2937
|
+
components: [
|
|
2938
|
+
{
|
|
2939
|
+
name: "addr",
|
|
2940
|
+
type: "address",
|
|
2941
|
+
internalType: "address"
|
|
2942
|
+
},
|
|
2943
|
+
{
|
|
2944
|
+
name: "symbol",
|
|
2945
|
+
type: "string",
|
|
2946
|
+
internalType: "string"
|
|
2947
|
+
},
|
|
2948
|
+
{
|
|
2949
|
+
name: "name",
|
|
2950
|
+
type: "string",
|
|
2951
|
+
internalType: "string"
|
|
2952
|
+
},
|
|
2953
|
+
{
|
|
2954
|
+
name: "decimals",
|
|
2955
|
+
type: "uint8",
|
|
2956
|
+
internalType: "uint8"
|
|
2957
|
+
}
|
|
2958
|
+
]
|
|
1381
2959
|
},
|
|
1382
2960
|
{
|
|
1383
2961
|
name: "tokenOut",
|
|
1384
|
-
type: "
|
|
1385
|
-
internalType: "
|
|
2962
|
+
type: "tuple",
|
|
2963
|
+
internalType: "struct TokenData",
|
|
2964
|
+
components: [
|
|
2965
|
+
{
|
|
2966
|
+
name: "addr",
|
|
2967
|
+
type: "address",
|
|
2968
|
+
internalType: "address"
|
|
2969
|
+
},
|
|
2970
|
+
{
|
|
2971
|
+
name: "symbol",
|
|
2972
|
+
type: "string",
|
|
2973
|
+
internalType: "string"
|
|
2974
|
+
},
|
|
2975
|
+
{
|
|
2976
|
+
name: "name",
|
|
2977
|
+
type: "string",
|
|
2978
|
+
internalType: "string"
|
|
2979
|
+
},
|
|
2980
|
+
{
|
|
2981
|
+
name: "decimals",
|
|
2982
|
+
type: "uint8",
|
|
2983
|
+
internalType: "uint8"
|
|
2984
|
+
}
|
|
2985
|
+
]
|
|
1386
2986
|
}
|
|
1387
2987
|
]
|
|
1388
|
-
},
|
|
1389
|
-
{
|
|
1390
|
-
name: "pausableAdmins",
|
|
1391
|
-
type: "address[]",
|
|
1392
|
-
internalType: "address[]"
|
|
1393
|
-
},
|
|
1394
|
-
{
|
|
1395
|
-
name: "unpausableAdmins",
|
|
1396
|
-
type: "address[]",
|
|
1397
|
-
internalType: "address[]"
|
|
1398
|
-
},
|
|
1399
|
-
{
|
|
1400
|
-
name: "emergencyLiquidators",
|
|
1401
|
-
type: "address[]",
|
|
1402
|
-
internalType: "address[]"
|
|
1403
2988
|
}
|
|
1404
2989
|
]
|
|
1405
2990
|
}
|
|
@@ -1416,7 +3001,7 @@ var iMarketCompressorAbi = [
|
|
|
1416
3001
|
internalType: "struct MarketFilter",
|
|
1417
3002
|
components: [
|
|
1418
3003
|
{
|
|
1419
|
-
name: "
|
|
3004
|
+
name: "configurators",
|
|
1420
3005
|
type: "address[]",
|
|
1421
3006
|
internalType: "address[]"
|
|
1422
3007
|
},
|
|
@@ -1440,46 +3025,19 @@ var iMarketCompressorAbi = [
|
|
|
1440
3025
|
internalType: "struct MarketData[]",
|
|
1441
3026
|
components: [
|
|
1442
3027
|
{
|
|
1443
|
-
name: "
|
|
1444
|
-
type: "tuple",
|
|
1445
|
-
internalType: "struct BaseParams",
|
|
1446
|
-
components: [
|
|
1447
|
-
{
|
|
1448
|
-
name: "addr",
|
|
1449
|
-
type: "address",
|
|
1450
|
-
internalType: "address"
|
|
1451
|
-
},
|
|
1452
|
-
{
|
|
1453
|
-
name: "version",
|
|
1454
|
-
type: "uint256",
|
|
1455
|
-
internalType: "uint256"
|
|
1456
|
-
},
|
|
1457
|
-
{
|
|
1458
|
-
name: "contractType",
|
|
1459
|
-
type: "bytes32",
|
|
1460
|
-
internalType: "bytes32"
|
|
1461
|
-
},
|
|
1462
|
-
{
|
|
1463
|
-
name: "serializedParams",
|
|
1464
|
-
type: "bytes",
|
|
1465
|
-
internalType: "bytes"
|
|
1466
|
-
}
|
|
1467
|
-
]
|
|
1468
|
-
},
|
|
1469
|
-
{
|
|
1470
|
-
name: "owner",
|
|
3028
|
+
name: "acl",
|
|
1471
3029
|
type: "address",
|
|
1472
3030
|
internalType: "address"
|
|
1473
3031
|
},
|
|
1474
3032
|
{
|
|
1475
|
-
name: "
|
|
3033
|
+
name: "contractsRegister",
|
|
1476
3034
|
type: "address",
|
|
1477
3035
|
internalType: "address"
|
|
1478
3036
|
},
|
|
1479
3037
|
{
|
|
1480
|
-
name: "
|
|
1481
|
-
type: "
|
|
1482
|
-
internalType: "
|
|
3038
|
+
name: "treasury",
|
|
3039
|
+
type: "address",
|
|
3040
|
+
internalType: "address"
|
|
1483
3041
|
},
|
|
1484
3042
|
{
|
|
1485
3043
|
name: "pool",
|
|
@@ -1543,16 +3101,6 @@ var iMarketCompressorAbi = [
|
|
|
1543
3101
|
type: "address",
|
|
1544
3102
|
internalType: "address"
|
|
1545
3103
|
},
|
|
1546
|
-
{
|
|
1547
|
-
name: "treasury",
|
|
1548
|
-
type: "address",
|
|
1549
|
-
internalType: "address"
|
|
1550
|
-
},
|
|
1551
|
-
{
|
|
1552
|
-
name: "controller",
|
|
1553
|
-
type: "address",
|
|
1554
|
-
internalType: "address"
|
|
1555
|
-
},
|
|
1556
3104
|
{
|
|
1557
3105
|
name: "underlying",
|
|
1558
3106
|
type: "address",
|
|
@@ -1584,22 +3132,17 @@ var iMarketCompressorAbi = [
|
|
|
1584
3132
|
internalType: "uint256"
|
|
1585
3133
|
},
|
|
1586
3134
|
{
|
|
1587
|
-
name: "
|
|
1588
|
-
type: "uint256",
|
|
1589
|
-
internalType: "uint256"
|
|
1590
|
-
},
|
|
1591
|
-
{
|
|
1592
|
-
name: "totalAssets",
|
|
3135
|
+
name: "supplyRate",
|
|
1593
3136
|
type: "uint256",
|
|
1594
3137
|
internalType: "uint256"
|
|
1595
3138
|
},
|
|
1596
3139
|
{
|
|
1597
|
-
name: "
|
|
3140
|
+
name: "withdrawFee",
|
|
1598
3141
|
type: "uint256",
|
|
1599
3142
|
internalType: "uint256"
|
|
1600
3143
|
},
|
|
1601
3144
|
{
|
|
1602
|
-
name: "
|
|
3145
|
+
name: "totalBorrowed",
|
|
1603
3146
|
type: "uint256",
|
|
1604
3147
|
internalType: "uint256"
|
|
1605
3148
|
},
|
|
@@ -1627,6 +3170,11 @@ var iMarketCompressorAbi = [
|
|
|
1627
3170
|
name: "limit",
|
|
1628
3171
|
type: "uint256",
|
|
1629
3172
|
internalType: "uint256"
|
|
3173
|
+
},
|
|
3174
|
+
{
|
|
3175
|
+
name: "available",
|
|
3176
|
+
type: "uint256",
|
|
3177
|
+
internalType: "uint256"
|
|
1630
3178
|
}
|
|
1631
3179
|
]
|
|
1632
3180
|
},
|
|
@@ -1980,6 +3528,40 @@ var iMarketCompressorAbi = [
|
|
|
1980
3528
|
}
|
|
1981
3529
|
]
|
|
1982
3530
|
},
|
|
3531
|
+
{
|
|
3532
|
+
name: "lossPolicy",
|
|
3533
|
+
type: "tuple",
|
|
3534
|
+
internalType: "struct BaseState",
|
|
3535
|
+
components: [
|
|
3536
|
+
{
|
|
3537
|
+
name: "baseParams",
|
|
3538
|
+
type: "tuple",
|
|
3539
|
+
internalType: "struct BaseParams",
|
|
3540
|
+
components: [
|
|
3541
|
+
{
|
|
3542
|
+
name: "addr",
|
|
3543
|
+
type: "address",
|
|
3544
|
+
internalType: "address"
|
|
3545
|
+
},
|
|
3546
|
+
{
|
|
3547
|
+
name: "version",
|
|
3548
|
+
type: "uint256",
|
|
3549
|
+
internalType: "uint256"
|
|
3550
|
+
},
|
|
3551
|
+
{
|
|
3552
|
+
name: "contractType",
|
|
3553
|
+
type: "bytes32",
|
|
3554
|
+
internalType: "bytes32"
|
|
3555
|
+
},
|
|
3556
|
+
{
|
|
3557
|
+
name: "serializedParams",
|
|
3558
|
+
type: "bytes",
|
|
3559
|
+
internalType: "bytes"
|
|
3560
|
+
}
|
|
3561
|
+
]
|
|
3562
|
+
}
|
|
3563
|
+
]
|
|
3564
|
+
},
|
|
1983
3565
|
{
|
|
1984
3566
|
name: "tokens",
|
|
1985
3567
|
type: "tuple[]",
|
|
@@ -2010,7 +3592,7 @@ var iMarketCompressorAbi = [
|
|
|
2010
3592
|
{
|
|
2011
3593
|
name: "creditManagers",
|
|
2012
3594
|
type: "tuple[]",
|
|
2013
|
-
internalType: "struct
|
|
3595
|
+
internalType: "struct CreditSuiteData[]",
|
|
2014
3596
|
components: [
|
|
2015
3597
|
{
|
|
2016
3598
|
name: "creditFacade",
|
|
@@ -2045,17 +3627,17 @@ var iMarketCompressorAbi = [
|
|
|
2045
3627
|
]
|
|
2046
3628
|
},
|
|
2047
3629
|
{
|
|
2048
|
-
name: "
|
|
2049
|
-
type: "
|
|
2050
|
-
internalType: "
|
|
3630
|
+
name: "creditManager",
|
|
3631
|
+
type: "address",
|
|
3632
|
+
internalType: "address"
|
|
2051
3633
|
},
|
|
2052
3634
|
{
|
|
2053
|
-
name: "
|
|
3635
|
+
name: "degenNFT",
|
|
2054
3636
|
type: "address",
|
|
2055
3637
|
internalType: "address"
|
|
2056
3638
|
},
|
|
2057
3639
|
{
|
|
2058
|
-
name: "
|
|
3640
|
+
name: "botList",
|
|
2059
3641
|
type: "address",
|
|
2060
3642
|
internalType: "address"
|
|
2061
3643
|
},
|
|
@@ -2064,11 +3646,6 @@ var iMarketCompressorAbi = [
|
|
|
2064
3646
|
type: "bool",
|
|
2065
3647
|
internalType: "bool"
|
|
2066
3648
|
},
|
|
2067
|
-
{
|
|
2068
|
-
name: "degenNFT",
|
|
2069
|
-
type: "address",
|
|
2070
|
-
internalType: "address"
|
|
2071
|
-
},
|
|
2072
3649
|
{
|
|
2073
3650
|
name: "expirationDate",
|
|
2074
3651
|
type: "uint40",
|
|
@@ -2079,11 +3656,6 @@ var iMarketCompressorAbi = [
|
|
|
2079
3656
|
type: "uint8",
|
|
2080
3657
|
internalType: "uint8"
|
|
2081
3658
|
},
|
|
2082
|
-
{
|
|
2083
|
-
name: "botList",
|
|
2084
|
-
type: "address",
|
|
2085
|
-
internalType: "address"
|
|
2086
|
-
},
|
|
2087
3659
|
{
|
|
2088
3660
|
name: "minDebt",
|
|
2089
3661
|
type: "uint256",
|
|
@@ -2099,11 +3671,6 @@ var iMarketCompressorAbi = [
|
|
|
2099
3671
|
type: "uint256",
|
|
2100
3672
|
internalType: "uint256"
|
|
2101
3673
|
},
|
|
2102
|
-
{
|
|
2103
|
-
name: "lossLiquidator",
|
|
2104
|
-
type: "address",
|
|
2105
|
-
internalType: "address"
|
|
2106
|
-
},
|
|
2107
3674
|
{
|
|
2108
3675
|
name: "isPaused",
|
|
2109
3676
|
type: "bool",
|
|
@@ -2173,11 +3740,6 @@ var iMarketCompressorAbi = [
|
|
|
2173
3740
|
type: "address",
|
|
2174
3741
|
internalType: "address"
|
|
2175
3742
|
},
|
|
2176
|
-
{
|
|
2177
|
-
name: "priceOracle",
|
|
2178
|
-
type: "address",
|
|
2179
|
-
internalType: "address"
|
|
2180
|
-
},
|
|
2181
3743
|
{
|
|
2182
3744
|
name: "maxEnabledTokens",
|
|
2183
3745
|
type: "uint8",
|
|
@@ -2185,13 +3747,20 @@ var iMarketCompressorAbi = [
|
|
|
2185
3747
|
},
|
|
2186
3748
|
{
|
|
2187
3749
|
name: "collateralTokens",
|
|
2188
|
-
type: "
|
|
2189
|
-
internalType: "
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
3750
|
+
type: "tuple[]",
|
|
3751
|
+
internalType: "struct CollateralToken[]",
|
|
3752
|
+
components: [
|
|
3753
|
+
{
|
|
3754
|
+
name: "token",
|
|
3755
|
+
type: "address",
|
|
3756
|
+
internalType: "address"
|
|
3757
|
+
},
|
|
3758
|
+
{
|
|
3759
|
+
name: "liquidationThreshold",
|
|
3760
|
+
type: "uint16",
|
|
3761
|
+
internalType: "uint16"
|
|
3762
|
+
}
|
|
3763
|
+
]
|
|
2195
3764
|
},
|
|
2196
3765
|
{
|
|
2197
3766
|
name: "feeInterest",
|
|
@@ -2257,7 +3826,7 @@ var iMarketCompressorAbi = [
|
|
|
2257
3826
|
{
|
|
2258
3827
|
name: "adapters",
|
|
2259
3828
|
type: "tuple[]",
|
|
2260
|
-
internalType: "struct
|
|
3829
|
+
internalType: "struct AdapterState[]",
|
|
2261
3830
|
components: [
|
|
2262
3831
|
{
|
|
2263
3832
|
name: "baseParams",
|
|
@@ -2292,28 +3861,33 @@ var iMarketCompressorAbi = [
|
|
|
2292
3861
|
internalType: "address"
|
|
2293
3862
|
}
|
|
2294
3863
|
]
|
|
2295
|
-
},
|
|
2296
|
-
{
|
|
2297
|
-
name: "totalDebt",
|
|
2298
|
-
type: "uint256",
|
|
2299
|
-
internalType: "uint256"
|
|
2300
|
-
},
|
|
2301
|
-
{
|
|
2302
|
-
name: "totalDebtLimit",
|
|
2303
|
-
type: "uint256",
|
|
2304
|
-
internalType: "uint256"
|
|
2305
|
-
},
|
|
2306
|
-
{
|
|
2307
|
-
name: "availableToBorrow",
|
|
2308
|
-
type: "uint256",
|
|
2309
|
-
internalType: "uint256"
|
|
2310
3864
|
}
|
|
2311
3865
|
]
|
|
2312
3866
|
},
|
|
3867
|
+
{
|
|
3868
|
+
name: "configurator",
|
|
3869
|
+
type: "address",
|
|
3870
|
+
internalType: "address"
|
|
3871
|
+
},
|
|
3872
|
+
{
|
|
3873
|
+
name: "pausableAdmins",
|
|
3874
|
+
type: "address[]",
|
|
3875
|
+
internalType: "address[]"
|
|
3876
|
+
},
|
|
3877
|
+
{
|
|
3878
|
+
name: "unpausableAdmins",
|
|
3879
|
+
type: "address[]",
|
|
3880
|
+
internalType: "address[]"
|
|
3881
|
+
},
|
|
3882
|
+
{
|
|
3883
|
+
name: "emergencyLiquidators",
|
|
3884
|
+
type: "address[]",
|
|
3885
|
+
internalType: "address[]"
|
|
3886
|
+
},
|
|
2313
3887
|
{
|
|
2314
3888
|
name: "zappers",
|
|
2315
3889
|
type: "tuple[]",
|
|
2316
|
-
internalType: "struct
|
|
3890
|
+
internalType: "struct ZapperState[]",
|
|
2317
3891
|
components: [
|
|
2318
3892
|
{
|
|
2319
3893
|
name: "baseParams",
|
|
@@ -2344,30 +3918,59 @@ var iMarketCompressorAbi = [
|
|
|
2344
3918
|
},
|
|
2345
3919
|
{
|
|
2346
3920
|
name: "tokenIn",
|
|
2347
|
-
type: "
|
|
2348
|
-
internalType: "
|
|
3921
|
+
type: "tuple",
|
|
3922
|
+
internalType: "struct TokenData",
|
|
3923
|
+
components: [
|
|
3924
|
+
{
|
|
3925
|
+
name: "addr",
|
|
3926
|
+
type: "address",
|
|
3927
|
+
internalType: "address"
|
|
3928
|
+
},
|
|
3929
|
+
{
|
|
3930
|
+
name: "symbol",
|
|
3931
|
+
type: "string",
|
|
3932
|
+
internalType: "string"
|
|
3933
|
+
},
|
|
3934
|
+
{
|
|
3935
|
+
name: "name",
|
|
3936
|
+
type: "string",
|
|
3937
|
+
internalType: "string"
|
|
3938
|
+
},
|
|
3939
|
+
{
|
|
3940
|
+
name: "decimals",
|
|
3941
|
+
type: "uint8",
|
|
3942
|
+
internalType: "uint8"
|
|
3943
|
+
}
|
|
3944
|
+
]
|
|
2349
3945
|
},
|
|
2350
3946
|
{
|
|
2351
3947
|
name: "tokenOut",
|
|
2352
|
-
type: "
|
|
2353
|
-
internalType: "
|
|
3948
|
+
type: "tuple",
|
|
3949
|
+
internalType: "struct TokenData",
|
|
3950
|
+
components: [
|
|
3951
|
+
{
|
|
3952
|
+
name: "addr",
|
|
3953
|
+
type: "address",
|
|
3954
|
+
internalType: "address"
|
|
3955
|
+
},
|
|
3956
|
+
{
|
|
3957
|
+
name: "symbol",
|
|
3958
|
+
type: "string",
|
|
3959
|
+
internalType: "string"
|
|
3960
|
+
},
|
|
3961
|
+
{
|
|
3962
|
+
name: "name",
|
|
3963
|
+
type: "string",
|
|
3964
|
+
internalType: "string"
|
|
3965
|
+
},
|
|
3966
|
+
{
|
|
3967
|
+
name: "decimals",
|
|
3968
|
+
type: "uint8",
|
|
3969
|
+
internalType: "uint8"
|
|
3970
|
+
}
|
|
3971
|
+
]
|
|
2354
3972
|
}
|
|
2355
3973
|
]
|
|
2356
|
-
},
|
|
2357
|
-
{
|
|
2358
|
-
name: "pausableAdmins",
|
|
2359
|
-
type: "address[]",
|
|
2360
|
-
internalType: "address[]"
|
|
2361
|
-
},
|
|
2362
|
-
{
|
|
2363
|
-
name: "unpausableAdmins",
|
|
2364
|
-
type: "address[]",
|
|
2365
|
-
internalType: "address[]"
|
|
2366
|
-
},
|
|
2367
|
-
{
|
|
2368
|
-
name: "emergencyLiquidators",
|
|
2369
|
-
type: "address[]",
|
|
2370
|
-
internalType: "address[]"
|
|
2371
3974
|
}
|
|
2372
3975
|
]
|
|
2373
3976
|
}
|
|
@@ -2384,7 +3987,7 @@ var iMarketCompressorAbi = [
|
|
|
2384
3987
|
internalType: "struct MarketFilter",
|
|
2385
3988
|
components: [
|
|
2386
3989
|
{
|
|
2387
|
-
name: "
|
|
3990
|
+
name: "configurators",
|
|
2388
3991
|
type: "address[]",
|
|
2389
3992
|
internalType: "address[]"
|
|
2390
3993
|
},
|
|
@@ -2449,75 +4052,137 @@ var iMarketCompressorAbi = [
|
|
|
2449
4052
|
var iPriceFeedCompressorAbi = [
|
|
2450
4053
|
{
|
|
2451
4054
|
type: "function",
|
|
2452
|
-
inputs: [],
|
|
2453
4055
|
name: "contractType",
|
|
2454
|
-
|
|
4056
|
+
inputs: [],
|
|
4057
|
+
outputs: [
|
|
4058
|
+
{
|
|
4059
|
+
name: "",
|
|
4060
|
+
type: "bytes32",
|
|
4061
|
+
internalType: "bytes32"
|
|
4062
|
+
}
|
|
4063
|
+
],
|
|
2455
4064
|
stateMutability: "view"
|
|
2456
4065
|
},
|
|
2457
4066
|
{
|
|
2458
4067
|
type: "function",
|
|
4068
|
+
name: "getPriceFeeds",
|
|
2459
4069
|
inputs: [
|
|
2460
|
-
{
|
|
2461
|
-
|
|
4070
|
+
{
|
|
4071
|
+
name: "priceOracle",
|
|
4072
|
+
type: "address",
|
|
4073
|
+
internalType: "address"
|
|
4074
|
+
},
|
|
4075
|
+
{
|
|
4076
|
+
name: "tokens",
|
|
4077
|
+
type: "address[]",
|
|
4078
|
+
internalType: "address[]"
|
|
4079
|
+
}
|
|
2462
4080
|
],
|
|
2463
|
-
name: "getPriceFeeds",
|
|
2464
4081
|
outputs: [
|
|
2465
4082
|
{
|
|
2466
4083
|
name: "priceFeedMap",
|
|
2467
|
-
internalType: "struct PriceFeedMapEntry[]",
|
|
2468
4084
|
type: "tuple[]",
|
|
4085
|
+
internalType: "struct PriceFeedMapEntry[]",
|
|
2469
4086
|
components: [
|
|
2470
|
-
{
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
4087
|
+
{
|
|
4088
|
+
name: "token",
|
|
4089
|
+
type: "address",
|
|
4090
|
+
internalType: "address"
|
|
4091
|
+
},
|
|
4092
|
+
{
|
|
4093
|
+
name: "reserve",
|
|
4094
|
+
type: "bool",
|
|
4095
|
+
internalType: "bool"
|
|
4096
|
+
},
|
|
4097
|
+
{
|
|
4098
|
+
name: "priceFeed",
|
|
4099
|
+
type: "address",
|
|
4100
|
+
internalType: "address"
|
|
4101
|
+
},
|
|
4102
|
+
{
|
|
4103
|
+
name: "stalenessPeriod",
|
|
4104
|
+
type: "uint32",
|
|
4105
|
+
internalType: "uint32"
|
|
4106
|
+
}
|
|
2474
4107
|
]
|
|
2475
4108
|
},
|
|
2476
4109
|
{
|
|
2477
4110
|
name: "priceFeedTree",
|
|
2478
|
-
internalType: "struct PriceFeedTreeNode[]",
|
|
2479
4111
|
type: "tuple[]",
|
|
4112
|
+
internalType: "struct PriceFeedTreeNode[]",
|
|
2480
4113
|
components: [
|
|
2481
4114
|
{
|
|
2482
4115
|
name: "baseParams",
|
|
2483
|
-
internalType: "struct BaseParams",
|
|
2484
4116
|
type: "tuple",
|
|
4117
|
+
internalType: "struct BaseParams",
|
|
2485
4118
|
components: [
|
|
2486
|
-
{
|
|
2487
|
-
|
|
4119
|
+
{
|
|
4120
|
+
name: "addr",
|
|
4121
|
+
type: "address",
|
|
4122
|
+
internalType: "address"
|
|
4123
|
+
},
|
|
4124
|
+
{
|
|
4125
|
+
name: "version",
|
|
4126
|
+
type: "uint256",
|
|
4127
|
+
internalType: "uint256"
|
|
4128
|
+
},
|
|
2488
4129
|
{
|
|
2489
4130
|
name: "contractType",
|
|
2490
|
-
|
|
2491
|
-
|
|
4131
|
+
type: "bytes32",
|
|
4132
|
+
internalType: "bytes32"
|
|
2492
4133
|
},
|
|
2493
4134
|
{
|
|
2494
4135
|
name: "serializedParams",
|
|
2495
|
-
|
|
2496
|
-
|
|
4136
|
+
type: "bytes",
|
|
4137
|
+
internalType: "bytes"
|
|
2497
4138
|
}
|
|
2498
4139
|
]
|
|
2499
4140
|
},
|
|
2500
|
-
{
|
|
2501
|
-
|
|
2502
|
-
|
|
4141
|
+
{
|
|
4142
|
+
name: "decimals",
|
|
4143
|
+
type: "uint8",
|
|
4144
|
+
internalType: "uint8"
|
|
4145
|
+
},
|
|
4146
|
+
{
|
|
4147
|
+
name: "skipCheck",
|
|
4148
|
+
type: "bool",
|
|
4149
|
+
internalType: "bool"
|
|
4150
|
+
},
|
|
4151
|
+
{
|
|
4152
|
+
name: "updatable",
|
|
4153
|
+
type: "bool",
|
|
4154
|
+
internalType: "bool"
|
|
4155
|
+
},
|
|
2503
4156
|
{
|
|
2504
4157
|
name: "underlyingFeeds",
|
|
2505
|
-
|
|
2506
|
-
|
|
4158
|
+
type: "address[]",
|
|
4159
|
+
internalType: "address[]"
|
|
2507
4160
|
},
|
|
2508
4161
|
{
|
|
2509
4162
|
name: "underlyingStalenessPeriods",
|
|
2510
|
-
|
|
2511
|
-
|
|
4163
|
+
type: "uint32[]",
|
|
4164
|
+
internalType: "uint32[]"
|
|
2512
4165
|
},
|
|
2513
4166
|
{
|
|
2514
4167
|
name: "answer",
|
|
2515
|
-
internalType: "struct PriceFeedAnswer",
|
|
2516
4168
|
type: "tuple",
|
|
4169
|
+
internalType: "struct PriceFeedAnswer",
|
|
2517
4170
|
components: [
|
|
2518
|
-
{
|
|
2519
|
-
|
|
2520
|
-
|
|
4171
|
+
{
|
|
4172
|
+
name: "price",
|
|
4173
|
+
type: "int256",
|
|
4174
|
+
internalType: "int256"
|
|
4175
|
+
},
|
|
4176
|
+
{
|
|
4177
|
+
name: "updatedAt",
|
|
4178
|
+
type: "uint256",
|
|
4179
|
+
internalType: "uint256"
|
|
4180
|
+
},
|
|
4181
|
+
{
|
|
4182
|
+
name: "success",
|
|
4183
|
+
type: "bool",
|
|
4184
|
+
internalType: "bool"
|
|
4185
|
+
}
|
|
2521
4186
|
]
|
|
2522
4187
|
}
|
|
2523
4188
|
]
|
|
@@ -2527,65 +4192,119 @@ var iPriceFeedCompressorAbi = [
|
|
|
2527
4192
|
},
|
|
2528
4193
|
{
|
|
2529
4194
|
type: "function",
|
|
2530
|
-
inputs: [{ name: "priceOracle", internalType: "address", type: "address" }],
|
|
2531
4195
|
name: "getPriceFeeds",
|
|
4196
|
+
inputs: [
|
|
4197
|
+
{
|
|
4198
|
+
name: "priceOracle",
|
|
4199
|
+
type: "address",
|
|
4200
|
+
internalType: "address"
|
|
4201
|
+
}
|
|
4202
|
+
],
|
|
2532
4203
|
outputs: [
|
|
2533
4204
|
{
|
|
2534
4205
|
name: "priceFeedMap",
|
|
2535
|
-
internalType: "struct PriceFeedMapEntry[]",
|
|
2536
4206
|
type: "tuple[]",
|
|
4207
|
+
internalType: "struct PriceFeedMapEntry[]",
|
|
2537
4208
|
components: [
|
|
2538
|
-
{
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
4209
|
+
{
|
|
4210
|
+
name: "token",
|
|
4211
|
+
type: "address",
|
|
4212
|
+
internalType: "address"
|
|
4213
|
+
},
|
|
4214
|
+
{
|
|
4215
|
+
name: "reserve",
|
|
4216
|
+
type: "bool",
|
|
4217
|
+
internalType: "bool"
|
|
4218
|
+
},
|
|
4219
|
+
{
|
|
4220
|
+
name: "priceFeed",
|
|
4221
|
+
type: "address",
|
|
4222
|
+
internalType: "address"
|
|
4223
|
+
},
|
|
4224
|
+
{
|
|
4225
|
+
name: "stalenessPeriod",
|
|
4226
|
+
type: "uint32",
|
|
4227
|
+
internalType: "uint32"
|
|
4228
|
+
}
|
|
2542
4229
|
]
|
|
2543
4230
|
},
|
|
2544
4231
|
{
|
|
2545
4232
|
name: "priceFeedTree",
|
|
2546
|
-
internalType: "struct PriceFeedTreeNode[]",
|
|
2547
4233
|
type: "tuple[]",
|
|
4234
|
+
internalType: "struct PriceFeedTreeNode[]",
|
|
2548
4235
|
components: [
|
|
2549
4236
|
{
|
|
2550
4237
|
name: "baseParams",
|
|
2551
|
-
internalType: "struct BaseParams",
|
|
2552
4238
|
type: "tuple",
|
|
4239
|
+
internalType: "struct BaseParams",
|
|
2553
4240
|
components: [
|
|
2554
|
-
{
|
|
2555
|
-
|
|
4241
|
+
{
|
|
4242
|
+
name: "addr",
|
|
4243
|
+
type: "address",
|
|
4244
|
+
internalType: "address"
|
|
4245
|
+
},
|
|
4246
|
+
{
|
|
4247
|
+
name: "version",
|
|
4248
|
+
type: "uint256",
|
|
4249
|
+
internalType: "uint256"
|
|
4250
|
+
},
|
|
2556
4251
|
{
|
|
2557
4252
|
name: "contractType",
|
|
2558
|
-
|
|
2559
|
-
|
|
4253
|
+
type: "bytes32",
|
|
4254
|
+
internalType: "bytes32"
|
|
2560
4255
|
},
|
|
2561
4256
|
{
|
|
2562
4257
|
name: "serializedParams",
|
|
2563
|
-
|
|
2564
|
-
|
|
4258
|
+
type: "bytes",
|
|
4259
|
+
internalType: "bytes"
|
|
2565
4260
|
}
|
|
2566
4261
|
]
|
|
2567
4262
|
},
|
|
2568
|
-
{
|
|
2569
|
-
|
|
2570
|
-
|
|
4263
|
+
{
|
|
4264
|
+
name: "decimals",
|
|
4265
|
+
type: "uint8",
|
|
4266
|
+
internalType: "uint8"
|
|
4267
|
+
},
|
|
4268
|
+
{
|
|
4269
|
+
name: "skipCheck",
|
|
4270
|
+
type: "bool",
|
|
4271
|
+
internalType: "bool"
|
|
4272
|
+
},
|
|
4273
|
+
{
|
|
4274
|
+
name: "updatable",
|
|
4275
|
+
type: "bool",
|
|
4276
|
+
internalType: "bool"
|
|
4277
|
+
},
|
|
2571
4278
|
{
|
|
2572
4279
|
name: "underlyingFeeds",
|
|
2573
|
-
|
|
2574
|
-
|
|
4280
|
+
type: "address[]",
|
|
4281
|
+
internalType: "address[]"
|
|
2575
4282
|
},
|
|
2576
4283
|
{
|
|
2577
4284
|
name: "underlyingStalenessPeriods",
|
|
2578
|
-
|
|
2579
|
-
|
|
4285
|
+
type: "uint32[]",
|
|
4286
|
+
internalType: "uint32[]"
|
|
2580
4287
|
},
|
|
2581
4288
|
{
|
|
2582
4289
|
name: "answer",
|
|
2583
|
-
internalType: "struct PriceFeedAnswer",
|
|
2584
4290
|
type: "tuple",
|
|
4291
|
+
internalType: "struct PriceFeedAnswer",
|
|
2585
4292
|
components: [
|
|
2586
|
-
{
|
|
2587
|
-
|
|
2588
|
-
|
|
4293
|
+
{
|
|
4294
|
+
name: "price",
|
|
4295
|
+
type: "int256",
|
|
4296
|
+
internalType: "int256"
|
|
4297
|
+
},
|
|
4298
|
+
{
|
|
4299
|
+
name: "updatedAt",
|
|
4300
|
+
type: "uint256",
|
|
4301
|
+
internalType: "uint256"
|
|
4302
|
+
},
|
|
4303
|
+
{
|
|
4304
|
+
name: "success",
|
|
4305
|
+
type: "bool",
|
|
4306
|
+
internalType: "bool"
|
|
4307
|
+
}
|
|
2589
4308
|
]
|
|
2590
4309
|
}
|
|
2591
4310
|
]
|
|
@@ -2595,56 +4314,92 @@ var iPriceFeedCompressorAbi = [
|
|
|
2595
4314
|
},
|
|
2596
4315
|
{
|
|
2597
4316
|
type: "function",
|
|
4317
|
+
name: "loadPriceFeedTree",
|
|
2598
4318
|
inputs: [
|
|
2599
|
-
{
|
|
4319
|
+
{
|
|
4320
|
+
name: "priceFeeds",
|
|
4321
|
+
type: "address[]",
|
|
4322
|
+
internalType: "address[]"
|
|
4323
|
+
}
|
|
2600
4324
|
],
|
|
2601
|
-
name: "loadPriceFeedTree",
|
|
2602
4325
|
outputs: [
|
|
2603
4326
|
{
|
|
2604
4327
|
name: "priceFeedTree",
|
|
2605
|
-
internalType: "struct PriceFeedTreeNode[]",
|
|
2606
4328
|
type: "tuple[]",
|
|
4329
|
+
internalType: "struct PriceFeedTreeNode[]",
|
|
2607
4330
|
components: [
|
|
2608
4331
|
{
|
|
2609
4332
|
name: "baseParams",
|
|
2610
|
-
internalType: "struct BaseParams",
|
|
2611
4333
|
type: "tuple",
|
|
4334
|
+
internalType: "struct BaseParams",
|
|
2612
4335
|
components: [
|
|
2613
|
-
{
|
|
2614
|
-
|
|
4336
|
+
{
|
|
4337
|
+
name: "addr",
|
|
4338
|
+
type: "address",
|
|
4339
|
+
internalType: "address"
|
|
4340
|
+
},
|
|
4341
|
+
{
|
|
4342
|
+
name: "version",
|
|
4343
|
+
type: "uint256",
|
|
4344
|
+
internalType: "uint256"
|
|
4345
|
+
},
|
|
2615
4346
|
{
|
|
2616
4347
|
name: "contractType",
|
|
2617
|
-
|
|
2618
|
-
|
|
4348
|
+
type: "bytes32",
|
|
4349
|
+
internalType: "bytes32"
|
|
2619
4350
|
},
|
|
2620
4351
|
{
|
|
2621
4352
|
name: "serializedParams",
|
|
2622
|
-
|
|
2623
|
-
|
|
4353
|
+
type: "bytes",
|
|
4354
|
+
internalType: "bytes"
|
|
2624
4355
|
}
|
|
2625
4356
|
]
|
|
2626
4357
|
},
|
|
2627
|
-
{
|
|
2628
|
-
|
|
2629
|
-
|
|
4358
|
+
{
|
|
4359
|
+
name: "decimals",
|
|
4360
|
+
type: "uint8",
|
|
4361
|
+
internalType: "uint8"
|
|
4362
|
+
},
|
|
4363
|
+
{
|
|
4364
|
+
name: "skipCheck",
|
|
4365
|
+
type: "bool",
|
|
4366
|
+
internalType: "bool"
|
|
4367
|
+
},
|
|
4368
|
+
{
|
|
4369
|
+
name: "updatable",
|
|
4370
|
+
type: "bool",
|
|
4371
|
+
internalType: "bool"
|
|
4372
|
+
},
|
|
2630
4373
|
{
|
|
2631
4374
|
name: "underlyingFeeds",
|
|
2632
|
-
|
|
2633
|
-
|
|
4375
|
+
type: "address[]",
|
|
4376
|
+
internalType: "address[]"
|
|
2634
4377
|
},
|
|
2635
4378
|
{
|
|
2636
4379
|
name: "underlyingStalenessPeriods",
|
|
2637
|
-
|
|
2638
|
-
|
|
4380
|
+
type: "uint32[]",
|
|
4381
|
+
internalType: "uint32[]"
|
|
2639
4382
|
},
|
|
2640
4383
|
{
|
|
2641
4384
|
name: "answer",
|
|
2642
|
-
internalType: "struct PriceFeedAnswer",
|
|
2643
4385
|
type: "tuple",
|
|
4386
|
+
internalType: "struct PriceFeedAnswer",
|
|
2644
4387
|
components: [
|
|
2645
|
-
{
|
|
2646
|
-
|
|
2647
|
-
|
|
4388
|
+
{
|
|
4389
|
+
name: "price",
|
|
4390
|
+
type: "int256",
|
|
4391
|
+
internalType: "int256"
|
|
4392
|
+
},
|
|
4393
|
+
{
|
|
4394
|
+
name: "updatedAt",
|
|
4395
|
+
type: "uint256",
|
|
4396
|
+
internalType: "uint256"
|
|
4397
|
+
},
|
|
4398
|
+
{
|
|
4399
|
+
name: "success",
|
|
4400
|
+
type: "bool",
|
|
4401
|
+
internalType: "bool"
|
|
4402
|
+
}
|
|
2648
4403
|
]
|
|
2649
4404
|
}
|
|
2650
4405
|
]
|
|
@@ -2654,29 +4409,35 @@ var iPriceFeedCompressorAbi = [
|
|
|
2654
4409
|
},
|
|
2655
4410
|
{
|
|
2656
4411
|
type: "function",
|
|
2657
|
-
inputs: [],
|
|
2658
4412
|
name: "version",
|
|
2659
|
-
|
|
4413
|
+
inputs: [],
|
|
4414
|
+
outputs: [
|
|
4415
|
+
{
|
|
4416
|
+
name: "",
|
|
4417
|
+
type: "uint256",
|
|
4418
|
+
internalType: "uint256"
|
|
4419
|
+
}
|
|
4420
|
+
],
|
|
2660
4421
|
stateMutability: "view"
|
|
2661
4422
|
},
|
|
2662
4423
|
{
|
|
2663
4424
|
type: "event",
|
|
2664
|
-
|
|
4425
|
+
name: "SetSerializer",
|
|
2665
4426
|
inputs: [
|
|
2666
4427
|
{
|
|
2667
4428
|
name: "contractType",
|
|
2668
|
-
internalType: "bytes32",
|
|
2669
4429
|
type: "bytes32",
|
|
2670
|
-
indexed: true
|
|
4430
|
+
indexed: true,
|
|
4431
|
+
internalType: "bytes32"
|
|
2671
4432
|
},
|
|
2672
4433
|
{
|
|
2673
4434
|
name: "serializer",
|
|
2674
|
-
internalType: "address",
|
|
2675
4435
|
type: "address",
|
|
2676
|
-
indexed: true
|
|
4436
|
+
indexed: true,
|
|
4437
|
+
internalType: "address"
|
|
2677
4438
|
}
|
|
2678
4439
|
],
|
|
2679
|
-
|
|
4440
|
+
anonymous: false
|
|
2680
4441
|
}
|
|
2681
4442
|
];
|
|
2682
4443
|
|
|
@@ -55670,7 +57431,6 @@ var CreditFacadeV300Contract = class extends BaseContract {
|
|
|
55670
57431
|
const decimals = this.sdk.tokensMeta.decimals(this.underlying);
|
|
55671
57432
|
return {
|
|
55672
57433
|
...super.stateHuman(raw),
|
|
55673
|
-
maxQuotaMultiplier: Number(this.maxQuotaMultiplier),
|
|
55674
57434
|
expirable: this.expirable,
|
|
55675
57435
|
isDegenMode: this.degenNFT !== ADDRESS_0X0,
|
|
55676
57436
|
degenNFT: this.labelAddress(this.degenNFT),
|
|
@@ -55807,7 +57567,6 @@ var CreditFacadeV310Contract = class extends BaseContract {
|
|
|
55807
57567
|
const decimals = this.sdk.tokensMeta.decimals(this.underlying);
|
|
55808
57568
|
return {
|
|
55809
57569
|
...super.stateHuman(raw),
|
|
55810
|
-
maxQuotaMultiplier: Number(this.maxQuotaMultiplier),
|
|
55811
57570
|
expirable: this.expirable,
|
|
55812
57571
|
isDegenMode: this.degenNFT !== ADDRESS_0X0,
|
|
55813
57572
|
degenNFT: this.labelAddress(this.degenNFT),
|
|
@@ -55930,7 +57689,7 @@ var CreditManagerV300Contract = class extends BaseContract {
|
|
|
55930
57689
|
*/
|
|
55931
57690
|
liquidationThresholds;
|
|
55932
57691
|
constructor(sdk, { creditManager, adapters }) {
|
|
55933
|
-
const { baseParams, collateralTokens,
|
|
57692
|
+
const { baseParams, collateralTokens, ...rest } = creditManager;
|
|
55934
57693
|
super(sdk, {
|
|
55935
57694
|
...baseParams,
|
|
55936
57695
|
name: `CreditManagerV300(${creditManager.name})`,
|
|
@@ -55938,7 +57697,7 @@ var CreditManagerV300Contract = class extends BaseContract {
|
|
|
55938
57697
|
});
|
|
55939
57698
|
Object.assign(this, rest);
|
|
55940
57699
|
this.liquidationThresholds = new AddressMap(
|
|
55941
|
-
collateralTokens.map((
|
|
57700
|
+
collateralTokens.map((ct) => [ct.token, ct.liquidationThreshold])
|
|
55942
57701
|
);
|
|
55943
57702
|
this.adapters = new AddressMap();
|
|
55944
57703
|
for (const adapterData of adapters) {
|
|
@@ -55960,7 +57719,6 @@ var CreditManagerV300Contract = class extends BaseContract {
|
|
|
55960
57719
|
pool: this.labelAddress(this.pool),
|
|
55961
57720
|
creditFacade: this.labelAddress(this.creditFacade),
|
|
55962
57721
|
creditConfigurator: this.labelAddress(this.creditConfigurator),
|
|
55963
|
-
priceOracle: this.labelAddress(this.priceOracle),
|
|
55964
57722
|
maxEnabledTokens: this.maxEnabledTokens,
|
|
55965
57723
|
collateralTokens: Object.fromEntries(
|
|
55966
57724
|
this.liquidationThresholds.entries().map(([k, v]) => [
|
|
@@ -56012,7 +57770,7 @@ var CreditManagerV310Contract = class extends BaseContract {
|
|
|
56012
57770
|
*/
|
|
56013
57771
|
liquidationThresholds;
|
|
56014
57772
|
constructor(sdk, { creditManager, adapters }) {
|
|
56015
|
-
const { baseParams, collateralTokens,
|
|
57773
|
+
const { baseParams, collateralTokens, ...rest } = creditManager;
|
|
56016
57774
|
super(sdk, {
|
|
56017
57775
|
...baseParams,
|
|
56018
57776
|
name: `CreditManagerV310(${creditManager.name})`,
|
|
@@ -56020,7 +57778,7 @@ var CreditManagerV310Contract = class extends BaseContract {
|
|
|
56020
57778
|
});
|
|
56021
57779
|
Object.assign(this, rest);
|
|
56022
57780
|
this.liquidationThresholds = new AddressMap(
|
|
56023
|
-
collateralTokens.map((
|
|
57781
|
+
collateralTokens.map((ct) => [ct.token, ct.liquidationThreshold])
|
|
56024
57782
|
);
|
|
56025
57783
|
this.adapters = new AddressMap();
|
|
56026
57784
|
for (const adapterData of adapters) {
|
|
@@ -56042,7 +57800,6 @@ var CreditManagerV310Contract = class extends BaseContract {
|
|
|
56042
57800
|
pool: this.labelAddress(this.pool),
|
|
56043
57801
|
creditFacade: this.labelAddress(this.creditFacade),
|
|
56044
57802
|
creditConfigurator: this.labelAddress(this.creditConfigurator),
|
|
56045
|
-
priceOracle: this.labelAddress(this.priceOracle),
|
|
56046
57803
|
maxEnabledTokens: this.maxEnabledTokens,
|
|
56047
57804
|
collateralTokens: Object.fromEntries(
|
|
56048
57805
|
this.liquidationThresholds.entries().map(([k, v]) => [
|
|
@@ -56098,12 +57855,12 @@ var CreditFactory = class extends SDKConstruct {
|
|
|
56098
57855
|
super(sdk);
|
|
56099
57856
|
const { creditManagers, pool } = marketData;
|
|
56100
57857
|
const creditManager = creditManagers[index];
|
|
56101
|
-
const { name, collateralTokens
|
|
57858
|
+
const { name, collateralTokens } = creditManager.creditManager;
|
|
56102
57859
|
this.name = name;
|
|
56103
57860
|
this.pool = pool.baseParams.addr;
|
|
56104
57861
|
this.underlying = pool.underlying;
|
|
56105
57862
|
this.collateralTokens = Object.fromEntries(
|
|
56106
|
-
collateralTokens.map((
|
|
57863
|
+
collateralTokens.map((ct) => [ct.token, ct.liquidationThreshold])
|
|
56107
57864
|
);
|
|
56108
57865
|
if (creditManager.creditManager.baseParams.version < 310) {
|
|
56109
57866
|
this.creditManager = new CreditManagerV300Contract(sdk, creditManager);
|
|
@@ -56279,8 +58036,33 @@ var LinearModelContract = class extends BaseContract {
|
|
|
56279
58036
|
}
|
|
56280
58037
|
};
|
|
56281
58038
|
|
|
58039
|
+
// src/sdk/market/MarketConfiguratorContract.ts
|
|
58040
|
+
var abi27 = iMarketConfiguratorV310Abi;
|
|
58041
|
+
var MarketConfiguratorContract = class extends BaseContract {
|
|
58042
|
+
constructor(sdk, address) {
|
|
58043
|
+
super(sdk, {
|
|
58044
|
+
abi: abi27,
|
|
58045
|
+
addr: address,
|
|
58046
|
+
contractType: AP_MARKET_CONFIGURATOR,
|
|
58047
|
+
version: 0
|
|
58048
|
+
});
|
|
58049
|
+
}
|
|
58050
|
+
processLog(log) {
|
|
58051
|
+
switch (log.eventName) {
|
|
58052
|
+
// case "DeployDegenNFT":
|
|
58053
|
+
// case "SetName":
|
|
58054
|
+
// case "SetPriceFeedFromStore":
|
|
58055
|
+
// case "SetReservePriceFeedFromStore":
|
|
58056
|
+
case "RemoveMarket":
|
|
58057
|
+
case "CreateMarket":
|
|
58058
|
+
this.dirty = true;
|
|
58059
|
+
break;
|
|
58060
|
+
}
|
|
58061
|
+
}
|
|
58062
|
+
};
|
|
58063
|
+
|
|
56282
58064
|
// src/sdk/market/PoolContract.ts
|
|
56283
|
-
var
|
|
58065
|
+
var abi28 = poolV3Abi;
|
|
56284
58066
|
var PoolContract = class extends BaseContract {
|
|
56285
58067
|
creditManagerDebtParams;
|
|
56286
58068
|
constructor(sdk, data) {
|
|
@@ -56288,7 +58070,7 @@ var PoolContract = class extends BaseContract {
|
|
|
56288
58070
|
super(sdk, {
|
|
56289
58071
|
...data.baseParams,
|
|
56290
58072
|
name: `PoolV3(${data.name})`,
|
|
56291
|
-
abi:
|
|
58073
|
+
abi: abi28
|
|
56292
58074
|
});
|
|
56293
58075
|
Object.assign(this, rest);
|
|
56294
58076
|
this.creditManagerDebtParams = new AddressMap(
|
|
@@ -56333,7 +58115,6 @@ var PoolContract = class extends BaseContract {
|
|
|
56333
58115
|
}
|
|
56334
58116
|
])
|
|
56335
58117
|
),
|
|
56336
|
-
totalAssets: formatBNvalue(this.totalAssets, this.decimals, 2, raw),
|
|
56337
58118
|
totalSupply: formatBNvalue(this.totalSupply, this.decimals, 2, raw),
|
|
56338
58119
|
supplyRate: `${formatBNvalue(this.supplyRate, 25, 2, raw)}%`,
|
|
56339
58120
|
baseInterestIndex: `${formatBNvalue(this.totalSupply, 25, 2, raw)}%`,
|
|
@@ -56857,7 +58638,7 @@ var MellowLRTPriceFeedContract = class extends AbstractLPPriceFeedContract {
|
|
|
56857
58638
|
return stack.totalValue * BigInt(1e18) / stack.totalSupply;
|
|
56858
58639
|
}
|
|
56859
58640
|
};
|
|
56860
|
-
var
|
|
58641
|
+
var abi29 = pendleTWAPPTPriceFeedAbi;
|
|
56861
58642
|
var PendleTWAPPTPriceFeed = class extends AbstractPriceFeedContract {
|
|
56862
58643
|
market;
|
|
56863
58644
|
sy;
|
|
@@ -56869,7 +58650,7 @@ var PendleTWAPPTPriceFeed = class extends AbstractPriceFeedContract {
|
|
|
56869
58650
|
super(sdk, {
|
|
56870
58651
|
...args,
|
|
56871
58652
|
name: "PendleTWAPPTPriceFeed",
|
|
56872
|
-
abi:
|
|
58653
|
+
abi: abi29
|
|
56873
58654
|
});
|
|
56874
58655
|
const decoded = viem.decodeAbiParameters(
|
|
56875
58656
|
[
|
|
@@ -57272,8 +59053,11 @@ var PriceFeedRegister = class extends SDKConstruct {
|
|
|
57272
59053
|
* Loads PARTIAL information about all updatable price feeds from MarketCompressor
|
|
57273
59054
|
* This can later be used to load price feed updates
|
|
57274
59055
|
*/
|
|
57275
|
-
async preloadUpdatablePriceFeeds(
|
|
57276
|
-
const feedsData = await this.#loadUpdatablePriceFeeds(
|
|
59056
|
+
async preloadUpdatablePriceFeeds(marketConfigurators, pools) {
|
|
59057
|
+
const feedsData = await this.#loadUpdatablePriceFeeds(
|
|
59058
|
+
marketConfigurators,
|
|
59059
|
+
pools
|
|
59060
|
+
);
|
|
57277
59061
|
for (const data of feedsData) {
|
|
57278
59062
|
const feed = this.#create({ baseParams: data });
|
|
57279
59063
|
this.#feeds.upsert(feed.address, feed);
|
|
@@ -57281,12 +59065,15 @@ var PriceFeedRegister = class extends SDKConstruct {
|
|
|
57281
59065
|
}
|
|
57282
59066
|
/**
|
|
57283
59067
|
* Generates price update transaction via multicall3 without any market data knowledge
|
|
57284
|
-
* @param
|
|
59068
|
+
* @param marketConfigurators
|
|
57285
59069
|
* @param pools
|
|
57286
59070
|
* @returns
|
|
57287
59071
|
*/
|
|
57288
|
-
async getUpdatePriceFeedsTx(
|
|
57289
|
-
const feedsData = await this.#loadUpdatablePriceFeeds(
|
|
59072
|
+
async getUpdatePriceFeedsTx(marketConfigurators, pools) {
|
|
59073
|
+
const feedsData = await this.#loadUpdatablePriceFeeds(
|
|
59074
|
+
marketConfigurators,
|
|
59075
|
+
pools
|
|
59076
|
+
);
|
|
57290
59077
|
const feeds = feedsData.map((data) => this.#create({ baseParams: data }));
|
|
57291
59078
|
const updates = await this.#generatePriceFeedsUpdateTxs(feeds);
|
|
57292
59079
|
return createRawTx(
|
|
@@ -57338,18 +59125,23 @@ var PriceFeedRegister = class extends SDKConstruct {
|
|
|
57338
59125
|
}
|
|
57339
59126
|
return result;
|
|
57340
59127
|
}
|
|
57341
|
-
async #loadUpdatablePriceFeeds(
|
|
59128
|
+
async #loadUpdatablePriceFeeds(marketConfigurators, pools) {
|
|
57342
59129
|
const marketCompressorAddress = this.sdk.addressProvider.getAddress(
|
|
57343
59130
|
AP_MARKET_COMPRESSOR,
|
|
57344
59131
|
310
|
|
57345
59132
|
);
|
|
59133
|
+
const configurators = marketConfigurators ?? this.sdk.marketRegister.marketConfigurators.map((mc) => mc.address);
|
|
59134
|
+
this.logger?.debug(
|
|
59135
|
+
{ configurators, pools },
|
|
59136
|
+
"calling getUpdatablePriceFeeds"
|
|
59137
|
+
);
|
|
57346
59138
|
const result = await this.provider.publicClient.readContract({
|
|
57347
59139
|
address: marketCompressorAddress,
|
|
57348
59140
|
abi: iMarketCompressorAbi,
|
|
57349
59141
|
functionName: "getUpdatablePriceFeeds",
|
|
57350
59142
|
args: [
|
|
57351
59143
|
{
|
|
57352
|
-
|
|
59144
|
+
configurators,
|
|
57353
59145
|
pools: pools ?? [],
|
|
57354
59146
|
underlying: ADDRESS_0X0
|
|
57355
59147
|
}
|
|
@@ -57765,7 +59557,7 @@ var PriceOracleV310Contract = class extends PriceOracleBaseContract {
|
|
|
57765
59557
|
// src/sdk/market/MarketFactory.ts
|
|
57766
59558
|
var MarketFactory = class extends SDKConstruct {
|
|
57767
59559
|
acl;
|
|
57768
|
-
|
|
59560
|
+
configurator;
|
|
57769
59561
|
poolFactory;
|
|
57770
59562
|
priceOracle;
|
|
57771
59563
|
creditManagers = [];
|
|
@@ -57777,9 +59569,16 @@ var MarketFactory = class extends SDKConstruct {
|
|
|
57777
59569
|
constructor(sdk, marketData) {
|
|
57778
59570
|
super(sdk);
|
|
57779
59571
|
this.state = marketData;
|
|
57780
|
-
this.
|
|
59572
|
+
this.configurator = new MarketConfiguratorContract(
|
|
59573
|
+
sdk,
|
|
59574
|
+
marketData.configurator
|
|
59575
|
+
);
|
|
57781
59576
|
this.acl = marketData.acl;
|
|
57782
|
-
|
|
59577
|
+
const allTokens = [
|
|
59578
|
+
...marketData.tokens,
|
|
59579
|
+
...marketData.zappers.flatMap((z) => [z.tokenIn, z.tokenOut])
|
|
59580
|
+
];
|
|
59581
|
+
for (const t of allTokens) {
|
|
57783
59582
|
sdk.tokensMeta.upsert(t.addr, t);
|
|
57784
59583
|
sdk.provider.addressLabels.set(t.addr, t.symbol);
|
|
57785
59584
|
}
|
|
@@ -57803,7 +59602,7 @@ var MarketFactory = class extends SDKConstruct {
|
|
|
57803
59602
|
}
|
|
57804
59603
|
}
|
|
57805
59604
|
get dirty() {
|
|
57806
|
-
return this.poolFactory.dirty || this.priceOracle.dirty || this.creditManagers.some((cm) => cm.dirty);
|
|
59605
|
+
return this.configurator.dirty || this.poolFactory.dirty || this.priceOracle.dirty || this.creditManagers.some((cm) => cm.dirty);
|
|
57807
59606
|
}
|
|
57808
59607
|
stateHuman(raw = true) {
|
|
57809
59608
|
return {
|
|
@@ -57821,8 +59620,8 @@ var MarketFactory = class extends SDKConstruct {
|
|
|
57821
59620
|
address: z.baseParams.addr,
|
|
57822
59621
|
contractType: z.baseParams.contractType,
|
|
57823
59622
|
version: Number(z.baseParams.version),
|
|
57824
|
-
tokenIn: this.labelAddress(z.tokenIn),
|
|
57825
|
-
tokenOut: this.labelAddress(z.tokenOut)
|
|
59623
|
+
tokenIn: this.labelAddress(z.tokenIn.addr),
|
|
59624
|
+
tokenOut: this.labelAddress(z.tokenOut.addr)
|
|
57826
59625
|
}))
|
|
57827
59626
|
};
|
|
57828
59627
|
}
|
|
@@ -58064,84 +59863,48 @@ async function simulateMulticall(client, parameters) {
|
|
|
58064
59863
|
return results;
|
|
58065
59864
|
}
|
|
58066
59865
|
|
|
58067
|
-
// src/sdk/market/MarketConfiguratorContract.ts
|
|
58068
|
-
var abi29 = iMarketConfiguratorV310Abi;
|
|
58069
|
-
var MarketConfiguratorContract = class extends BaseContract {
|
|
58070
|
-
constructor(sdk, address) {
|
|
58071
|
-
super(sdk, {
|
|
58072
|
-
abi: abi29,
|
|
58073
|
-
addr: address,
|
|
58074
|
-
contractType: AP_MARKET_CONFIGURATOR,
|
|
58075
|
-
version: 0
|
|
58076
|
-
});
|
|
58077
|
-
}
|
|
58078
|
-
processLog(log) {
|
|
58079
|
-
switch (log.eventName) {
|
|
58080
|
-
// case "DeployDegenNFT":
|
|
58081
|
-
// case "SetName":
|
|
58082
|
-
// case "SetPriceFeedFromStore":
|
|
58083
|
-
// case "SetReservePriceFeedFromStore":
|
|
58084
|
-
case "RemoveMarket":
|
|
58085
|
-
case "CreateMarket":
|
|
58086
|
-
this.dirty = true;
|
|
58087
|
-
break;
|
|
58088
|
-
}
|
|
58089
|
-
}
|
|
58090
|
-
};
|
|
58091
|
-
|
|
58092
59866
|
// src/sdk/market/MarketRegister.ts
|
|
58093
59867
|
var MarketRegister = class extends SDKConstruct {
|
|
58094
59868
|
#logger;
|
|
58095
|
-
#curators;
|
|
58096
59869
|
/**
|
|
58097
59870
|
* Mapping pool.address -> MarketFactory
|
|
58098
59871
|
*/
|
|
58099
59872
|
#markets = new AddressMap();
|
|
58100
|
-
// TODO: MarketRegister can be this contract, but v3.0 does not have it
|
|
58101
|
-
marketConfigurator;
|
|
58102
59873
|
constructor(sdk) {
|
|
58103
59874
|
super(sdk);
|
|
58104
59875
|
this.#logger = childLogger("MarketRegister", sdk.logger);
|
|
58105
|
-
try {
|
|
58106
|
-
const mkAddr = this.sdk.addressProvider.getLatestVersion(
|
|
58107
|
-
AP_MARKET_CONFIGURATOR
|
|
58108
|
-
);
|
|
58109
|
-
this.marketConfigurator = new MarketConfiguratorContract(sdk, mkAddr);
|
|
58110
|
-
} catch (e) {
|
|
58111
|
-
this.#logger?.warn(e);
|
|
58112
|
-
}
|
|
58113
59876
|
}
|
|
58114
|
-
async loadMarkets(
|
|
58115
|
-
if (!
|
|
58116
|
-
this.#logger?.warn(
|
|
59877
|
+
async loadMarkets(marketConfigurators, ignoreUpdateablePrices) {
|
|
59878
|
+
if (!marketConfigurators.length) {
|
|
59879
|
+
this.#logger?.warn(
|
|
59880
|
+
"no market configurators provided, skipping loadMarkets"
|
|
59881
|
+
);
|
|
58117
59882
|
return;
|
|
58118
59883
|
}
|
|
58119
|
-
this.#
|
|
58120
|
-
await this.#loadMarkets(curators, [], ignoreUpdateablePrices);
|
|
59884
|
+
await this.#loadMarkets(marketConfigurators, [], ignoreUpdateablePrices);
|
|
58121
59885
|
}
|
|
58122
59886
|
async syncState() {
|
|
58123
|
-
if (this.marketConfigurator?.dirty) {
|
|
58124
|
-
this.#logger?.debug(`need to reload all markets`);
|
|
58125
|
-
await this.#loadMarkets(this.curators, []);
|
|
58126
|
-
return;
|
|
58127
|
-
}
|
|
58128
59887
|
const pools = this.markets.filter((m) => m.dirty).map((m) => m.poolFactory.pool.address);
|
|
58129
59888
|
if (pools.length) {
|
|
58130
59889
|
this.#logger?.debug(`need to reload ${pools.length} markets`);
|
|
58131
59890
|
await this.#loadMarkets([], pools);
|
|
58132
59891
|
}
|
|
58133
59892
|
}
|
|
58134
|
-
async #loadMarkets(
|
|
59893
|
+
async #loadMarkets(configurators, pools, ignoreUpdateablePrices) {
|
|
58135
59894
|
const marketCompressorAddress = this.sdk.addressProvider.getAddress(
|
|
58136
59895
|
AP_MARKET_COMPRESSOR,
|
|
58137
59896
|
310
|
|
58138
59897
|
);
|
|
58139
59898
|
let txs = [];
|
|
58140
59899
|
if (!ignoreUpdateablePrices) {
|
|
58141
|
-
await this.sdk.priceFeeds.preloadUpdatablePriceFeeds(
|
|
59900
|
+
await this.sdk.priceFeeds.preloadUpdatablePriceFeeds(
|
|
59901
|
+
configurators,
|
|
59902
|
+
pools
|
|
59903
|
+
);
|
|
58142
59904
|
const updates = await this.sdk.priceFeeds.generatePriceFeedsUpdateTxs();
|
|
58143
59905
|
txs = updates.txs;
|
|
58144
59906
|
}
|
|
59907
|
+
this.#logger?.debug({ configurators, pools }, "calling getMarkets");
|
|
58145
59908
|
const resp = await simulateMulticall(this.provider.publicClient, {
|
|
58146
59909
|
contracts: [
|
|
58147
59910
|
...txs.map(rawTxToMulticallPriceUpdate),
|
|
@@ -58151,7 +59914,7 @@ var MarketRegister = class extends SDKConstruct {
|
|
|
58151
59914
|
functionName: "getMarkets",
|
|
58152
59915
|
args: [
|
|
58153
59916
|
{
|
|
58154
|
-
|
|
59917
|
+
configurators,
|
|
58155
59918
|
pools,
|
|
58156
59919
|
underlying: ADDRESS_0X0
|
|
58157
59920
|
}
|
|
@@ -58211,6 +59974,9 @@ var MarketRegister = class extends SDKConstruct {
|
|
|
58211
59974
|
get creditManagers() {
|
|
58212
59975
|
return this.markets.flatMap((market) => market.creditManagers);
|
|
58213
59976
|
}
|
|
59977
|
+
get marketConfigurators() {
|
|
59978
|
+
return this.markets.flatMap((market) => market.configurator);
|
|
59979
|
+
}
|
|
58214
59980
|
findCreditManager(creditManager) {
|
|
58215
59981
|
const addr = creditManager.toLowerCase();
|
|
58216
59982
|
for (const market of this.markets) {
|
|
@@ -58261,12 +60027,6 @@ var MarketRegister = class extends SDKConstruct {
|
|
|
58261
60027
|
{ tvl: 0n, tvlUSD: 0n }
|
|
58262
60028
|
);
|
|
58263
60029
|
}
|
|
58264
|
-
get curators() {
|
|
58265
|
-
if (!this.#curators) {
|
|
58266
|
-
throw new Error(`market register has no markets loaded`);
|
|
58267
|
-
}
|
|
58268
|
-
return this.#curators;
|
|
58269
|
-
}
|
|
58270
60030
|
};
|
|
58271
60031
|
var PathOptionFactory = class _PathOptionFactory {
|
|
58272
60032
|
// TODO: get rid of token data from SDK
|
|
@@ -58715,7 +60475,7 @@ var CreditAccountsService = class extends SDKConstruct {
|
|
|
58715
60475
|
owner = ADDRESS_0X0
|
|
58716
60476
|
} = args ?? {};
|
|
58717
60477
|
const arg0 = creditManager ?? {
|
|
58718
|
-
|
|
60478
|
+
configurators: [],
|
|
58719
60479
|
pools: this.pools,
|
|
58720
60480
|
underlying: ADDRESS_0X0
|
|
58721
60481
|
};
|
|
@@ -59461,7 +61221,8 @@ var AddressProviderContractV3_1 = class extends AbstractAddressProviderContract
|
|
|
59461
61221
|
super(sdk, {
|
|
59462
61222
|
addr: address,
|
|
59463
61223
|
name: "AddressProviderV3_1",
|
|
59464
|
-
abi: abi30
|
|
61224
|
+
abi: abi30,
|
|
61225
|
+
version: 310
|
|
59465
61226
|
});
|
|
59466
61227
|
}
|
|
59467
61228
|
parseFunctionParams(params) {
|
|
@@ -59514,7 +61275,8 @@ var AddressProviderContractV3 = class extends AbstractAddressProviderContract {
|
|
|
59514
61275
|
super(sdk, {
|
|
59515
61276
|
addr: address,
|
|
59516
61277
|
name: "AddressProviderV3",
|
|
59517
|
-
abi: abi31
|
|
61278
|
+
abi: abi31,
|
|
61279
|
+
version: 300
|
|
59518
61280
|
});
|
|
59519
61281
|
}
|
|
59520
61282
|
parseFunctionParams(params) {
|
|
@@ -59831,10 +61593,10 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
59831
61593
|
static async attach(options) {
|
|
59832
61594
|
const {
|
|
59833
61595
|
logger,
|
|
59834
|
-
riskCurators,
|
|
59835
61596
|
blockNumber,
|
|
59836
61597
|
redstoneHistoricTimestamp,
|
|
59837
|
-
ignoreUpdateablePrices
|
|
61598
|
+
ignoreUpdateablePrices,
|
|
61599
|
+
marketConfigurators
|
|
59838
61600
|
} = options;
|
|
59839
61601
|
let { networkType, addressProvider, chainId } = options;
|
|
59840
61602
|
const attachClient = viem.createPublicClient({
|
|
@@ -59863,10 +61625,10 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
59863
61625
|
logger
|
|
59864
61626
|
}).#attach({
|
|
59865
61627
|
addressProvider,
|
|
59866
|
-
riskCurators,
|
|
59867
61628
|
blockNumber,
|
|
59868
61629
|
redstoneHistoricTimestamp,
|
|
59869
|
-
ignoreUpdateablePrices
|
|
61630
|
+
ignoreUpdateablePrices,
|
|
61631
|
+
marketConfigurators
|
|
59870
61632
|
});
|
|
59871
61633
|
}
|
|
59872
61634
|
constructor(options) {
|
|
@@ -59879,8 +61641,8 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
59879
61641
|
addressProvider,
|
|
59880
61642
|
blockNumber,
|
|
59881
61643
|
redstoneHistoricTimestamp,
|
|
59882
|
-
|
|
59883
|
-
|
|
61644
|
+
ignoreUpdateablePrices,
|
|
61645
|
+
marketConfigurators
|
|
59884
61646
|
} = opts;
|
|
59885
61647
|
const time = Date.now();
|
|
59886
61648
|
const block = await this.provider.publicClient.getBlock(
|
|
@@ -59919,7 +61681,7 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
59919
61681
|
);
|
|
59920
61682
|
this.#marketRegister = new MarketRegister(this);
|
|
59921
61683
|
await this.#marketRegister.loadMarkets(
|
|
59922
|
-
|
|
61684
|
+
marketConfigurators,
|
|
59923
61685
|
ignoreUpdateablePrices
|
|
59924
61686
|
);
|
|
59925
61687
|
try {
|
|
@@ -60296,7 +62058,6 @@ exports.getAddressProvider = getAddressProvider;
|
|
|
60296
62058
|
exports.halfRAY = halfRAY;
|
|
60297
62059
|
exports.iAdapterAbi = iAdapterAbi;
|
|
60298
62060
|
exports.iAddressProviderV3Abi = iAddressProviderV3Abi;
|
|
60299
|
-
exports.iAddressProviderV3EventsAbi = iAddressProviderV3EventsAbi;
|
|
60300
62061
|
exports.iAddressProviderV3_1Abi = iAddressProviderV3_1Abi;
|
|
60301
62062
|
exports.iArbTokenAbi = iArbTokenAbi;
|
|
60302
62063
|
exports.iBalancerStablePoolAbi = iBalancerStablePoolAbi;
|