@gitmyabi/cinusdc 1.0.0
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/README.md +108 -0
- package/contracts/InstitutionalComet_json.d.ts +3003 -0
- package/contracts/InstitutionalComet_json.js +3412 -0
- package/contracts/InstitutionalComet_json.ts +3954 -0
- package/contracts/TransparentUpgradeableProxy_json.d.ts +401 -0
- package/contracts/TransparentUpgradeableProxy_json.js +398 -0
- package/contracts/TransparentUpgradeableProxy_json.ts +542 -0
- package/contracts/index.d.ts +4 -0
- package/contracts/index.js +10 -0
- package/contracts/index.ts +5 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,3412 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InstitutionalComet_json = exports.InstitutionalComet_jsonAbi = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
/**
|
|
6
|
+
* InstitutionalComet_json ABI
|
|
7
|
+
*
|
|
8
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
9
|
+
*/
|
|
10
|
+
exports.InstitutionalComet_jsonAbi = [
|
|
11
|
+
{
|
|
12
|
+
"inputs": [
|
|
13
|
+
{
|
|
14
|
+
"components": [
|
|
15
|
+
{
|
|
16
|
+
"internalType": "address",
|
|
17
|
+
"name": "governor",
|
|
18
|
+
"type": "address"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"internalType": "address",
|
|
22
|
+
"name": "pauseGuardian",
|
|
23
|
+
"type": "address"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"internalType": "address",
|
|
27
|
+
"name": "baseToken",
|
|
28
|
+
"type": "address"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"internalType": "address",
|
|
32
|
+
"name": "baseTokenPriceFeed",
|
|
33
|
+
"type": "address"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"internalType": "address",
|
|
37
|
+
"name": "extensionDelegate",
|
|
38
|
+
"type": "address"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"internalType": "uint64",
|
|
42
|
+
"name": "supplyKink",
|
|
43
|
+
"type": "uint64"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"internalType": "uint64",
|
|
47
|
+
"name": "supplyPerYearInterestRateSlopeLow",
|
|
48
|
+
"type": "uint64"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"internalType": "uint64",
|
|
52
|
+
"name": "supplyPerYearInterestRateSlopeHigh",
|
|
53
|
+
"type": "uint64"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"internalType": "uint64",
|
|
57
|
+
"name": "supplyPerYearInterestRateBase",
|
|
58
|
+
"type": "uint64"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"internalType": "uint64",
|
|
62
|
+
"name": "borrowKink",
|
|
63
|
+
"type": "uint64"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"internalType": "uint64",
|
|
67
|
+
"name": "borrowPerYearInterestRateSlopeLow",
|
|
68
|
+
"type": "uint64"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"internalType": "uint64",
|
|
72
|
+
"name": "borrowPerYearInterestRateSlopeHigh",
|
|
73
|
+
"type": "uint64"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"internalType": "uint64",
|
|
77
|
+
"name": "borrowPerYearInterestRateBase",
|
|
78
|
+
"type": "uint64"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"internalType": "uint64",
|
|
82
|
+
"name": "storeFrontPriceFactor",
|
|
83
|
+
"type": "uint64"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"internalType": "uint64",
|
|
87
|
+
"name": "trackingIndexScale",
|
|
88
|
+
"type": "uint64"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"internalType": "uint64",
|
|
92
|
+
"name": "baseTrackingSupplySpeed",
|
|
93
|
+
"type": "uint64"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"internalType": "uint64",
|
|
97
|
+
"name": "baseTrackingBorrowSpeed",
|
|
98
|
+
"type": "uint64"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"internalType": "uint104",
|
|
102
|
+
"name": "baseMinForRewards",
|
|
103
|
+
"type": "uint104"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"internalType": "uint104",
|
|
107
|
+
"name": "baseBorrowMin",
|
|
108
|
+
"type": "uint104"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"internalType": "uint104",
|
|
112
|
+
"name": "targetReserves",
|
|
113
|
+
"type": "uint104"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"components": [
|
|
117
|
+
{
|
|
118
|
+
"internalType": "address",
|
|
119
|
+
"name": "asset",
|
|
120
|
+
"type": "address"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"internalType": "address",
|
|
124
|
+
"name": "priceFeed",
|
|
125
|
+
"type": "address"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"internalType": "uint8",
|
|
129
|
+
"name": "decimals",
|
|
130
|
+
"type": "uint8"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"internalType": "uint64",
|
|
134
|
+
"name": "borrowCollateralFactor",
|
|
135
|
+
"type": "uint64"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"internalType": "uint64",
|
|
139
|
+
"name": "liquidateCollateralFactor",
|
|
140
|
+
"type": "uint64"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"internalType": "uint64",
|
|
144
|
+
"name": "liquidationFactor",
|
|
145
|
+
"type": "uint64"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"internalType": "uint128",
|
|
149
|
+
"name": "supplyCap",
|
|
150
|
+
"type": "uint128"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"internalType": "struct CometConfiguration.AssetConfig[]",
|
|
154
|
+
"name": "assetConfigs",
|
|
155
|
+
"type": "tuple[]"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"internalType": "struct CometConfiguration.Configuration",
|
|
159
|
+
"name": "config",
|
|
160
|
+
"type": "tuple"
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
"stateMutability": "nonpayable",
|
|
164
|
+
"type": "constructor"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"inputs": [],
|
|
168
|
+
"name": "Absurd",
|
|
169
|
+
"type": "error"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"inputs": [],
|
|
173
|
+
"name": "AlreadyInitialized",
|
|
174
|
+
"type": "error"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"inputs": [],
|
|
178
|
+
"name": "BadAsset",
|
|
179
|
+
"type": "error"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"inputs": [],
|
|
183
|
+
"name": "BadDecimals",
|
|
184
|
+
"type": "error"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"inputs": [],
|
|
188
|
+
"name": "BadDiscount",
|
|
189
|
+
"type": "error"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"inputs": [],
|
|
193
|
+
"name": "BadMinimum",
|
|
194
|
+
"type": "error"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"inputs": [],
|
|
198
|
+
"name": "BadPrice",
|
|
199
|
+
"type": "error"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"inputs": [],
|
|
203
|
+
"name": "BaseSupplyPaused",
|
|
204
|
+
"type": "error"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"inputs": [],
|
|
208
|
+
"name": "BorrowCFTooLarge",
|
|
209
|
+
"type": "error"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"inputs": [],
|
|
213
|
+
"name": "BorrowTooSmall",
|
|
214
|
+
"type": "error"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"inputs": [],
|
|
218
|
+
"name": "BorrowersTransferPaused",
|
|
219
|
+
"type": "error"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"inputs": [],
|
|
223
|
+
"name": "BorrowersWithdrawPaused",
|
|
224
|
+
"type": "error"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"inputs": [
|
|
228
|
+
{
|
|
229
|
+
"internalType": "uint24",
|
|
230
|
+
"name": "assetIndex",
|
|
231
|
+
"type": "uint24"
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
"name": "CollateralAssetSupplyPaused",
|
|
235
|
+
"type": "error"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"inputs": [
|
|
239
|
+
{
|
|
240
|
+
"internalType": "uint24",
|
|
241
|
+
"name": "assetIndex",
|
|
242
|
+
"type": "uint24"
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"name": "CollateralAssetTransferPaused",
|
|
246
|
+
"type": "error"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"inputs": [
|
|
250
|
+
{
|
|
251
|
+
"internalType": "uint24",
|
|
252
|
+
"name": "assetIndex",
|
|
253
|
+
"type": "uint24"
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"name": "CollateralAssetWithdrawPaused",
|
|
257
|
+
"type": "error"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"inputs": [],
|
|
261
|
+
"name": "CollateralSupplyPaused",
|
|
262
|
+
"type": "error"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"inputs": [],
|
|
266
|
+
"name": "CollateralTransferPaused",
|
|
267
|
+
"type": "error"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"inputs": [],
|
|
271
|
+
"name": "CollateralWithdrawPaused",
|
|
272
|
+
"type": "error"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"inputs": [],
|
|
276
|
+
"name": "DeactivatedCollateralBorrowBlocked",
|
|
277
|
+
"type": "error"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"inputs": [],
|
|
281
|
+
"name": "DeactivatedCollateralTransferBlocked",
|
|
282
|
+
"type": "error"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"inputs": [],
|
|
286
|
+
"name": "ExceedsSupportedUtilization",
|
|
287
|
+
"type": "error"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"inputs": [],
|
|
291
|
+
"name": "InsufficientReserves",
|
|
292
|
+
"type": "error"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"inputs": [],
|
|
296
|
+
"name": "InvalidInt104",
|
|
297
|
+
"type": "error"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"inputs": [],
|
|
301
|
+
"name": "InvalidInt256",
|
|
302
|
+
"type": "error"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"inputs": [],
|
|
306
|
+
"name": "InvalidUInt104",
|
|
307
|
+
"type": "error"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"inputs": [],
|
|
311
|
+
"name": "InvalidUInt128",
|
|
312
|
+
"type": "error"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"inputs": [],
|
|
316
|
+
"name": "InvalidUInt64",
|
|
317
|
+
"type": "error"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"inputs": [],
|
|
321
|
+
"name": "LendersTransferPaused",
|
|
322
|
+
"type": "error"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"inputs": [],
|
|
326
|
+
"name": "LendersWithdrawPaused",
|
|
327
|
+
"type": "error"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"inputs": [],
|
|
331
|
+
"name": "LiqPenaltyTooHigh",
|
|
332
|
+
"type": "error"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"inputs": [],
|
|
336
|
+
"name": "LiquidateCFTooLarge",
|
|
337
|
+
"type": "error"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"inputs": [],
|
|
341
|
+
"name": "NegativeNumber",
|
|
342
|
+
"type": "error"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"inputs": [],
|
|
346
|
+
"name": "NoSelfTransfer",
|
|
347
|
+
"type": "error"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"inputs": [],
|
|
351
|
+
"name": "NotCollateralized",
|
|
352
|
+
"type": "error"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"inputs": [],
|
|
356
|
+
"name": "NotForSale",
|
|
357
|
+
"type": "error"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"inputs": [],
|
|
361
|
+
"name": "NotLiquidatable",
|
|
362
|
+
"type": "error"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"inputs": [],
|
|
366
|
+
"name": "Paused",
|
|
367
|
+
"type": "error"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"inputs": [],
|
|
371
|
+
"name": "ReentrantCallBlocked",
|
|
372
|
+
"type": "error"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"inputs": [],
|
|
376
|
+
"name": "SupplyCapExceeded",
|
|
377
|
+
"type": "error"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"inputs": [],
|
|
381
|
+
"name": "TimestampTooLarge",
|
|
382
|
+
"type": "error"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"inputs": [
|
|
386
|
+
{
|
|
387
|
+
"internalType": "address",
|
|
388
|
+
"name": "asset",
|
|
389
|
+
"type": "address"
|
|
390
|
+
}
|
|
391
|
+
],
|
|
392
|
+
"name": "TokenIsDeactivated",
|
|
393
|
+
"type": "error"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"inputs": [],
|
|
397
|
+
"name": "TooManyAssets",
|
|
398
|
+
"type": "error"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"inputs": [],
|
|
402
|
+
"name": "TooMuchSlippage",
|
|
403
|
+
"type": "error"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"inputs": [],
|
|
407
|
+
"name": "TransferInFailed",
|
|
408
|
+
"type": "error"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"inputs": [],
|
|
412
|
+
"name": "TransferOutFailed",
|
|
413
|
+
"type": "error"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"inputs": [],
|
|
417
|
+
"name": "Unauthorized",
|
|
418
|
+
"type": "error"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"anonymous": false,
|
|
422
|
+
"inputs": [
|
|
423
|
+
{
|
|
424
|
+
"indexed": true,
|
|
425
|
+
"internalType": "address",
|
|
426
|
+
"name": "absorber",
|
|
427
|
+
"type": "address"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"indexed": true,
|
|
431
|
+
"internalType": "address",
|
|
432
|
+
"name": "borrower",
|
|
433
|
+
"type": "address"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"indexed": true,
|
|
437
|
+
"internalType": "address",
|
|
438
|
+
"name": "asset",
|
|
439
|
+
"type": "address"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"indexed": false,
|
|
443
|
+
"internalType": "uint256",
|
|
444
|
+
"name": "collateralAbsorbed",
|
|
445
|
+
"type": "uint256"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"indexed": false,
|
|
449
|
+
"internalType": "uint256",
|
|
450
|
+
"name": "usdValue",
|
|
451
|
+
"type": "uint256"
|
|
452
|
+
}
|
|
453
|
+
],
|
|
454
|
+
"name": "AbsorbCollateral",
|
|
455
|
+
"type": "event"
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"anonymous": false,
|
|
459
|
+
"inputs": [
|
|
460
|
+
{
|
|
461
|
+
"indexed": true,
|
|
462
|
+
"internalType": "address",
|
|
463
|
+
"name": "absorber",
|
|
464
|
+
"type": "address"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"indexed": true,
|
|
468
|
+
"internalType": "address",
|
|
469
|
+
"name": "borrower",
|
|
470
|
+
"type": "address"
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"indexed": false,
|
|
474
|
+
"internalType": "uint256",
|
|
475
|
+
"name": "basePaidOut",
|
|
476
|
+
"type": "uint256"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"indexed": false,
|
|
480
|
+
"internalType": "uint256",
|
|
481
|
+
"name": "usdValue",
|
|
482
|
+
"type": "uint256"
|
|
483
|
+
}
|
|
484
|
+
],
|
|
485
|
+
"name": "AbsorbDebt",
|
|
486
|
+
"type": "event"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"anonymous": false,
|
|
490
|
+
"inputs": [
|
|
491
|
+
{
|
|
492
|
+
"indexed": true,
|
|
493
|
+
"internalType": "address",
|
|
494
|
+
"name": "buyer",
|
|
495
|
+
"type": "address"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"indexed": true,
|
|
499
|
+
"internalType": "address",
|
|
500
|
+
"name": "asset",
|
|
501
|
+
"type": "address"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"indexed": false,
|
|
505
|
+
"internalType": "uint256",
|
|
506
|
+
"name": "baseAmount",
|
|
507
|
+
"type": "uint256"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"indexed": false,
|
|
511
|
+
"internalType": "uint256",
|
|
512
|
+
"name": "collateralAmount",
|
|
513
|
+
"type": "uint256"
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
"name": "BuyCollateral",
|
|
517
|
+
"type": "event"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"anonymous": false,
|
|
521
|
+
"inputs": [
|
|
522
|
+
{
|
|
523
|
+
"indexed": false,
|
|
524
|
+
"internalType": "bool",
|
|
525
|
+
"name": "supplyPaused",
|
|
526
|
+
"type": "bool"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"indexed": false,
|
|
530
|
+
"internalType": "bool",
|
|
531
|
+
"name": "transferPaused",
|
|
532
|
+
"type": "bool"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"indexed": false,
|
|
536
|
+
"internalType": "bool",
|
|
537
|
+
"name": "withdrawPaused",
|
|
538
|
+
"type": "bool"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"indexed": false,
|
|
542
|
+
"internalType": "bool",
|
|
543
|
+
"name": "absorbPaused",
|
|
544
|
+
"type": "bool"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"indexed": false,
|
|
548
|
+
"internalType": "bool",
|
|
549
|
+
"name": "buyPaused",
|
|
550
|
+
"type": "bool"
|
|
551
|
+
}
|
|
552
|
+
],
|
|
553
|
+
"name": "PauseAction",
|
|
554
|
+
"type": "event"
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"anonymous": false,
|
|
558
|
+
"inputs": [
|
|
559
|
+
{
|
|
560
|
+
"indexed": true,
|
|
561
|
+
"internalType": "address",
|
|
562
|
+
"name": "from",
|
|
563
|
+
"type": "address"
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"indexed": true,
|
|
567
|
+
"internalType": "address",
|
|
568
|
+
"name": "dst",
|
|
569
|
+
"type": "address"
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
"indexed": false,
|
|
573
|
+
"internalType": "uint256",
|
|
574
|
+
"name": "amount",
|
|
575
|
+
"type": "uint256"
|
|
576
|
+
}
|
|
577
|
+
],
|
|
578
|
+
"name": "Supply",
|
|
579
|
+
"type": "event"
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"anonymous": false,
|
|
583
|
+
"inputs": [
|
|
584
|
+
{
|
|
585
|
+
"indexed": true,
|
|
586
|
+
"internalType": "address",
|
|
587
|
+
"name": "from",
|
|
588
|
+
"type": "address"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"indexed": true,
|
|
592
|
+
"internalType": "address",
|
|
593
|
+
"name": "dst",
|
|
594
|
+
"type": "address"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"indexed": true,
|
|
598
|
+
"internalType": "address",
|
|
599
|
+
"name": "asset",
|
|
600
|
+
"type": "address"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"indexed": false,
|
|
604
|
+
"internalType": "uint256",
|
|
605
|
+
"name": "amount",
|
|
606
|
+
"type": "uint256"
|
|
607
|
+
}
|
|
608
|
+
],
|
|
609
|
+
"name": "SupplyCollateral",
|
|
610
|
+
"type": "event"
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"anonymous": false,
|
|
614
|
+
"inputs": [
|
|
615
|
+
{
|
|
616
|
+
"indexed": true,
|
|
617
|
+
"internalType": "address",
|
|
618
|
+
"name": "from",
|
|
619
|
+
"type": "address"
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"indexed": true,
|
|
623
|
+
"internalType": "address",
|
|
624
|
+
"name": "to",
|
|
625
|
+
"type": "address"
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"indexed": false,
|
|
629
|
+
"internalType": "uint256",
|
|
630
|
+
"name": "amount",
|
|
631
|
+
"type": "uint256"
|
|
632
|
+
}
|
|
633
|
+
],
|
|
634
|
+
"name": "Transfer",
|
|
635
|
+
"type": "event"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"anonymous": false,
|
|
639
|
+
"inputs": [
|
|
640
|
+
{
|
|
641
|
+
"indexed": true,
|
|
642
|
+
"internalType": "address",
|
|
643
|
+
"name": "from",
|
|
644
|
+
"type": "address"
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"indexed": true,
|
|
648
|
+
"internalType": "address",
|
|
649
|
+
"name": "to",
|
|
650
|
+
"type": "address"
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"indexed": true,
|
|
654
|
+
"internalType": "address",
|
|
655
|
+
"name": "asset",
|
|
656
|
+
"type": "address"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"indexed": false,
|
|
660
|
+
"internalType": "uint256",
|
|
661
|
+
"name": "amount",
|
|
662
|
+
"type": "uint256"
|
|
663
|
+
}
|
|
664
|
+
],
|
|
665
|
+
"name": "TransferCollateral",
|
|
666
|
+
"type": "event"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"anonymous": false,
|
|
670
|
+
"inputs": [
|
|
671
|
+
{
|
|
672
|
+
"indexed": true,
|
|
673
|
+
"internalType": "address",
|
|
674
|
+
"name": "src",
|
|
675
|
+
"type": "address"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"indexed": true,
|
|
679
|
+
"internalType": "address",
|
|
680
|
+
"name": "to",
|
|
681
|
+
"type": "address"
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
"indexed": false,
|
|
685
|
+
"internalType": "uint256",
|
|
686
|
+
"name": "amount",
|
|
687
|
+
"type": "uint256"
|
|
688
|
+
}
|
|
689
|
+
],
|
|
690
|
+
"name": "Withdraw",
|
|
691
|
+
"type": "event"
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"anonymous": false,
|
|
695
|
+
"inputs": [
|
|
696
|
+
{
|
|
697
|
+
"indexed": true,
|
|
698
|
+
"internalType": "address",
|
|
699
|
+
"name": "src",
|
|
700
|
+
"type": "address"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"indexed": true,
|
|
704
|
+
"internalType": "address",
|
|
705
|
+
"name": "to",
|
|
706
|
+
"type": "address"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
"indexed": true,
|
|
710
|
+
"internalType": "address",
|
|
711
|
+
"name": "asset",
|
|
712
|
+
"type": "address"
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"indexed": false,
|
|
716
|
+
"internalType": "uint256",
|
|
717
|
+
"name": "amount",
|
|
718
|
+
"type": "uint256"
|
|
719
|
+
}
|
|
720
|
+
],
|
|
721
|
+
"name": "WithdrawCollateral",
|
|
722
|
+
"type": "event"
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
"anonymous": false,
|
|
726
|
+
"inputs": [
|
|
727
|
+
{
|
|
728
|
+
"indexed": true,
|
|
729
|
+
"internalType": "address",
|
|
730
|
+
"name": "to",
|
|
731
|
+
"type": "address"
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"indexed": false,
|
|
735
|
+
"internalType": "uint256",
|
|
736
|
+
"name": "amount",
|
|
737
|
+
"type": "uint256"
|
|
738
|
+
}
|
|
739
|
+
],
|
|
740
|
+
"name": "WithdrawReserves",
|
|
741
|
+
"type": "event"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"stateMutability": "payable",
|
|
745
|
+
"type": "fallback"
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
"inputs": [],
|
|
749
|
+
"name": "MAX_SUPPORTED_UTILIZATION",
|
|
750
|
+
"outputs": [
|
|
751
|
+
{
|
|
752
|
+
"internalType": "uint256",
|
|
753
|
+
"name": "",
|
|
754
|
+
"type": "uint256"
|
|
755
|
+
}
|
|
756
|
+
],
|
|
757
|
+
"stateMutability": "view",
|
|
758
|
+
"type": "function"
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
"inputs": [
|
|
762
|
+
{
|
|
763
|
+
"internalType": "address",
|
|
764
|
+
"name": "absorber",
|
|
765
|
+
"type": "address"
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"internalType": "address[]",
|
|
769
|
+
"name": "accounts",
|
|
770
|
+
"type": "address[]"
|
|
771
|
+
}
|
|
772
|
+
],
|
|
773
|
+
"name": "absorb",
|
|
774
|
+
"outputs": [],
|
|
775
|
+
"stateMutability": "nonpayable",
|
|
776
|
+
"type": "function"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"inputs": [
|
|
780
|
+
{
|
|
781
|
+
"internalType": "address",
|
|
782
|
+
"name": "account",
|
|
783
|
+
"type": "address"
|
|
784
|
+
}
|
|
785
|
+
],
|
|
786
|
+
"name": "accrueAccount",
|
|
787
|
+
"outputs": [],
|
|
788
|
+
"stateMutability": "nonpayable",
|
|
789
|
+
"type": "function"
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"inputs": [
|
|
793
|
+
{
|
|
794
|
+
"internalType": "address",
|
|
795
|
+
"name": "manager",
|
|
796
|
+
"type": "address"
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"internalType": "address",
|
|
800
|
+
"name": "asset",
|
|
801
|
+
"type": "address"
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"internalType": "uint256",
|
|
805
|
+
"name": "amount",
|
|
806
|
+
"type": "uint256"
|
|
807
|
+
}
|
|
808
|
+
],
|
|
809
|
+
"name": "approveThis",
|
|
810
|
+
"outputs": [],
|
|
811
|
+
"stateMutability": "nonpayable",
|
|
812
|
+
"type": "function"
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
"inputs": [],
|
|
816
|
+
"name": "assetList",
|
|
817
|
+
"outputs": [
|
|
818
|
+
{
|
|
819
|
+
"internalType": "address",
|
|
820
|
+
"name": "",
|
|
821
|
+
"type": "address"
|
|
822
|
+
}
|
|
823
|
+
],
|
|
824
|
+
"stateMutability": "view",
|
|
825
|
+
"type": "function"
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"inputs": [
|
|
829
|
+
{
|
|
830
|
+
"internalType": "address",
|
|
831
|
+
"name": "account",
|
|
832
|
+
"type": "address"
|
|
833
|
+
}
|
|
834
|
+
],
|
|
835
|
+
"name": "balanceOf",
|
|
836
|
+
"outputs": [
|
|
837
|
+
{
|
|
838
|
+
"internalType": "uint256",
|
|
839
|
+
"name": "",
|
|
840
|
+
"type": "uint256"
|
|
841
|
+
}
|
|
842
|
+
],
|
|
843
|
+
"stateMutability": "view",
|
|
844
|
+
"type": "function"
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
"inputs": [],
|
|
848
|
+
"name": "baseBorrowMin",
|
|
849
|
+
"outputs": [
|
|
850
|
+
{
|
|
851
|
+
"internalType": "uint256",
|
|
852
|
+
"name": "",
|
|
853
|
+
"type": "uint256"
|
|
854
|
+
}
|
|
855
|
+
],
|
|
856
|
+
"stateMutability": "view",
|
|
857
|
+
"type": "function"
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
"inputs": [],
|
|
861
|
+
"name": "baseMinForRewards",
|
|
862
|
+
"outputs": [
|
|
863
|
+
{
|
|
864
|
+
"internalType": "uint256",
|
|
865
|
+
"name": "",
|
|
866
|
+
"type": "uint256"
|
|
867
|
+
}
|
|
868
|
+
],
|
|
869
|
+
"stateMutability": "view",
|
|
870
|
+
"type": "function"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
"inputs": [],
|
|
874
|
+
"name": "baseScale",
|
|
875
|
+
"outputs": [
|
|
876
|
+
{
|
|
877
|
+
"internalType": "uint256",
|
|
878
|
+
"name": "",
|
|
879
|
+
"type": "uint256"
|
|
880
|
+
}
|
|
881
|
+
],
|
|
882
|
+
"stateMutability": "view",
|
|
883
|
+
"type": "function"
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"inputs": [],
|
|
887
|
+
"name": "baseToken",
|
|
888
|
+
"outputs": [
|
|
889
|
+
{
|
|
890
|
+
"internalType": "address",
|
|
891
|
+
"name": "",
|
|
892
|
+
"type": "address"
|
|
893
|
+
}
|
|
894
|
+
],
|
|
895
|
+
"stateMutability": "view",
|
|
896
|
+
"type": "function"
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"inputs": [],
|
|
900
|
+
"name": "baseTokenPriceFeed",
|
|
901
|
+
"outputs": [
|
|
902
|
+
{
|
|
903
|
+
"internalType": "address",
|
|
904
|
+
"name": "",
|
|
905
|
+
"type": "address"
|
|
906
|
+
}
|
|
907
|
+
],
|
|
908
|
+
"stateMutability": "view",
|
|
909
|
+
"type": "function"
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"inputs": [],
|
|
913
|
+
"name": "baseTrackingBorrowSpeed",
|
|
914
|
+
"outputs": [
|
|
915
|
+
{
|
|
916
|
+
"internalType": "uint256",
|
|
917
|
+
"name": "",
|
|
918
|
+
"type": "uint256"
|
|
919
|
+
}
|
|
920
|
+
],
|
|
921
|
+
"stateMutability": "view",
|
|
922
|
+
"type": "function"
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
"inputs": [],
|
|
926
|
+
"name": "baseTrackingSupplySpeed",
|
|
927
|
+
"outputs": [
|
|
928
|
+
{
|
|
929
|
+
"internalType": "uint256",
|
|
930
|
+
"name": "",
|
|
931
|
+
"type": "uint256"
|
|
932
|
+
}
|
|
933
|
+
],
|
|
934
|
+
"stateMutability": "view",
|
|
935
|
+
"type": "function"
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"inputs": [
|
|
939
|
+
{
|
|
940
|
+
"internalType": "address",
|
|
941
|
+
"name": "account",
|
|
942
|
+
"type": "address"
|
|
943
|
+
}
|
|
944
|
+
],
|
|
945
|
+
"name": "borrowBalanceOf",
|
|
946
|
+
"outputs": [
|
|
947
|
+
{
|
|
948
|
+
"internalType": "uint256",
|
|
949
|
+
"name": "",
|
|
950
|
+
"type": "uint256"
|
|
951
|
+
}
|
|
952
|
+
],
|
|
953
|
+
"stateMutability": "view",
|
|
954
|
+
"type": "function"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"inputs": [],
|
|
958
|
+
"name": "borrowKink",
|
|
959
|
+
"outputs": [
|
|
960
|
+
{
|
|
961
|
+
"internalType": "uint256",
|
|
962
|
+
"name": "",
|
|
963
|
+
"type": "uint256"
|
|
964
|
+
}
|
|
965
|
+
],
|
|
966
|
+
"stateMutability": "view",
|
|
967
|
+
"type": "function"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"inputs": [],
|
|
971
|
+
"name": "borrowPerSecondInterestRateBase",
|
|
972
|
+
"outputs": [
|
|
973
|
+
{
|
|
974
|
+
"internalType": "uint256",
|
|
975
|
+
"name": "",
|
|
976
|
+
"type": "uint256"
|
|
977
|
+
}
|
|
978
|
+
],
|
|
979
|
+
"stateMutability": "view",
|
|
980
|
+
"type": "function"
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
"inputs": [],
|
|
984
|
+
"name": "borrowPerSecondInterestRateSlopeHigh",
|
|
985
|
+
"outputs": [
|
|
986
|
+
{
|
|
987
|
+
"internalType": "uint256",
|
|
988
|
+
"name": "",
|
|
989
|
+
"type": "uint256"
|
|
990
|
+
}
|
|
991
|
+
],
|
|
992
|
+
"stateMutability": "view",
|
|
993
|
+
"type": "function"
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
"inputs": [],
|
|
997
|
+
"name": "borrowPerSecondInterestRateSlopeLow",
|
|
998
|
+
"outputs": [
|
|
999
|
+
{
|
|
1000
|
+
"internalType": "uint256",
|
|
1001
|
+
"name": "",
|
|
1002
|
+
"type": "uint256"
|
|
1003
|
+
}
|
|
1004
|
+
],
|
|
1005
|
+
"stateMutability": "view",
|
|
1006
|
+
"type": "function"
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
"inputs": [
|
|
1010
|
+
{
|
|
1011
|
+
"internalType": "address",
|
|
1012
|
+
"name": "asset",
|
|
1013
|
+
"type": "address"
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
"internalType": "uint256",
|
|
1017
|
+
"name": "minAmount",
|
|
1018
|
+
"type": "uint256"
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"internalType": "uint256",
|
|
1022
|
+
"name": "baseAmount",
|
|
1023
|
+
"type": "uint256"
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
"internalType": "address",
|
|
1027
|
+
"name": "recipient",
|
|
1028
|
+
"type": "address"
|
|
1029
|
+
}
|
|
1030
|
+
],
|
|
1031
|
+
"name": "buyCollateral",
|
|
1032
|
+
"outputs": [],
|
|
1033
|
+
"stateMutability": "nonpayable",
|
|
1034
|
+
"type": "function"
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
"inputs": [],
|
|
1038
|
+
"name": "collateralsSupplyPauseFlags",
|
|
1039
|
+
"outputs": [
|
|
1040
|
+
{
|
|
1041
|
+
"internalType": "uint24",
|
|
1042
|
+
"name": "",
|
|
1043
|
+
"type": "uint24"
|
|
1044
|
+
}
|
|
1045
|
+
],
|
|
1046
|
+
"stateMutability": "view",
|
|
1047
|
+
"type": "function"
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"inputs": [],
|
|
1051
|
+
"name": "collateralsTransferPauseFlags",
|
|
1052
|
+
"outputs": [
|
|
1053
|
+
{
|
|
1054
|
+
"internalType": "uint24",
|
|
1055
|
+
"name": "",
|
|
1056
|
+
"type": "uint24"
|
|
1057
|
+
}
|
|
1058
|
+
],
|
|
1059
|
+
"stateMutability": "view",
|
|
1060
|
+
"type": "function"
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
"inputs": [],
|
|
1064
|
+
"name": "collateralsWithdrawPauseFlags",
|
|
1065
|
+
"outputs": [
|
|
1066
|
+
{
|
|
1067
|
+
"internalType": "uint24",
|
|
1068
|
+
"name": "",
|
|
1069
|
+
"type": "uint24"
|
|
1070
|
+
}
|
|
1071
|
+
],
|
|
1072
|
+
"stateMutability": "view",
|
|
1073
|
+
"type": "function"
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
"inputs": [],
|
|
1077
|
+
"name": "deactivatedCollaterals",
|
|
1078
|
+
"outputs": [
|
|
1079
|
+
{
|
|
1080
|
+
"internalType": "uint24",
|
|
1081
|
+
"name": "",
|
|
1082
|
+
"type": "uint24"
|
|
1083
|
+
}
|
|
1084
|
+
],
|
|
1085
|
+
"stateMutability": "view",
|
|
1086
|
+
"type": "function"
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"inputs": [],
|
|
1090
|
+
"name": "decimals",
|
|
1091
|
+
"outputs": [
|
|
1092
|
+
{
|
|
1093
|
+
"internalType": "uint8",
|
|
1094
|
+
"name": "",
|
|
1095
|
+
"type": "uint8"
|
|
1096
|
+
}
|
|
1097
|
+
],
|
|
1098
|
+
"stateMutability": "view",
|
|
1099
|
+
"type": "function"
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"inputs": [],
|
|
1103
|
+
"name": "extendedPauseFlags",
|
|
1104
|
+
"outputs": [
|
|
1105
|
+
{
|
|
1106
|
+
"internalType": "uint24",
|
|
1107
|
+
"name": "",
|
|
1108
|
+
"type": "uint24"
|
|
1109
|
+
}
|
|
1110
|
+
],
|
|
1111
|
+
"stateMutability": "view",
|
|
1112
|
+
"type": "function"
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
"inputs": [],
|
|
1116
|
+
"name": "extensionDelegate",
|
|
1117
|
+
"outputs": [
|
|
1118
|
+
{
|
|
1119
|
+
"internalType": "address",
|
|
1120
|
+
"name": "",
|
|
1121
|
+
"type": "address"
|
|
1122
|
+
}
|
|
1123
|
+
],
|
|
1124
|
+
"stateMutability": "view",
|
|
1125
|
+
"type": "function"
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
"inputs": [
|
|
1129
|
+
{
|
|
1130
|
+
"internalType": "uint8",
|
|
1131
|
+
"name": "i",
|
|
1132
|
+
"type": "uint8"
|
|
1133
|
+
}
|
|
1134
|
+
],
|
|
1135
|
+
"name": "getAssetInfo",
|
|
1136
|
+
"outputs": [
|
|
1137
|
+
{
|
|
1138
|
+
"components": [
|
|
1139
|
+
{
|
|
1140
|
+
"internalType": "uint8",
|
|
1141
|
+
"name": "offset",
|
|
1142
|
+
"type": "uint8"
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
"internalType": "address",
|
|
1146
|
+
"name": "asset",
|
|
1147
|
+
"type": "address"
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
"internalType": "address",
|
|
1151
|
+
"name": "priceFeed",
|
|
1152
|
+
"type": "address"
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
"internalType": "uint64",
|
|
1156
|
+
"name": "scale",
|
|
1157
|
+
"type": "uint64"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
"internalType": "uint64",
|
|
1161
|
+
"name": "borrowCollateralFactor",
|
|
1162
|
+
"type": "uint64"
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
"internalType": "uint64",
|
|
1166
|
+
"name": "liquidateCollateralFactor",
|
|
1167
|
+
"type": "uint64"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"internalType": "uint64",
|
|
1171
|
+
"name": "liquidationFactor",
|
|
1172
|
+
"type": "uint64"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
"internalType": "uint128",
|
|
1176
|
+
"name": "supplyCap",
|
|
1177
|
+
"type": "uint128"
|
|
1178
|
+
}
|
|
1179
|
+
],
|
|
1180
|
+
"internalType": "struct CometCore.AssetInfo",
|
|
1181
|
+
"name": "",
|
|
1182
|
+
"type": "tuple"
|
|
1183
|
+
}
|
|
1184
|
+
],
|
|
1185
|
+
"stateMutability": "view",
|
|
1186
|
+
"type": "function"
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
"inputs": [
|
|
1190
|
+
{
|
|
1191
|
+
"internalType": "address",
|
|
1192
|
+
"name": "asset",
|
|
1193
|
+
"type": "address"
|
|
1194
|
+
}
|
|
1195
|
+
],
|
|
1196
|
+
"name": "getAssetInfoByAddress",
|
|
1197
|
+
"outputs": [
|
|
1198
|
+
{
|
|
1199
|
+
"components": [
|
|
1200
|
+
{
|
|
1201
|
+
"internalType": "uint8",
|
|
1202
|
+
"name": "offset",
|
|
1203
|
+
"type": "uint8"
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
"internalType": "address",
|
|
1207
|
+
"name": "asset",
|
|
1208
|
+
"type": "address"
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
"internalType": "address",
|
|
1212
|
+
"name": "priceFeed",
|
|
1213
|
+
"type": "address"
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
"internalType": "uint64",
|
|
1217
|
+
"name": "scale",
|
|
1218
|
+
"type": "uint64"
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
"internalType": "uint64",
|
|
1222
|
+
"name": "borrowCollateralFactor",
|
|
1223
|
+
"type": "uint64"
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
"internalType": "uint64",
|
|
1227
|
+
"name": "liquidateCollateralFactor",
|
|
1228
|
+
"type": "uint64"
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
"internalType": "uint64",
|
|
1232
|
+
"name": "liquidationFactor",
|
|
1233
|
+
"type": "uint64"
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
"internalType": "uint128",
|
|
1237
|
+
"name": "supplyCap",
|
|
1238
|
+
"type": "uint128"
|
|
1239
|
+
}
|
|
1240
|
+
],
|
|
1241
|
+
"internalType": "struct CometCore.AssetInfo",
|
|
1242
|
+
"name": "",
|
|
1243
|
+
"type": "tuple"
|
|
1244
|
+
}
|
|
1245
|
+
],
|
|
1246
|
+
"stateMutability": "view",
|
|
1247
|
+
"type": "function"
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
"inputs": [
|
|
1251
|
+
{
|
|
1252
|
+
"internalType": "uint256",
|
|
1253
|
+
"name": "utilization",
|
|
1254
|
+
"type": "uint256"
|
|
1255
|
+
}
|
|
1256
|
+
],
|
|
1257
|
+
"name": "getBorrowRate",
|
|
1258
|
+
"outputs": [
|
|
1259
|
+
{
|
|
1260
|
+
"internalType": "uint64",
|
|
1261
|
+
"name": "",
|
|
1262
|
+
"type": "uint64"
|
|
1263
|
+
}
|
|
1264
|
+
],
|
|
1265
|
+
"stateMutability": "view",
|
|
1266
|
+
"type": "function"
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"inputs": [
|
|
1270
|
+
{
|
|
1271
|
+
"internalType": "address",
|
|
1272
|
+
"name": "asset",
|
|
1273
|
+
"type": "address"
|
|
1274
|
+
}
|
|
1275
|
+
],
|
|
1276
|
+
"name": "getCollateralReserves",
|
|
1277
|
+
"outputs": [
|
|
1278
|
+
{
|
|
1279
|
+
"internalType": "uint256",
|
|
1280
|
+
"name": "",
|
|
1281
|
+
"type": "uint256"
|
|
1282
|
+
}
|
|
1283
|
+
],
|
|
1284
|
+
"stateMutability": "view",
|
|
1285
|
+
"type": "function"
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
"inputs": [
|
|
1289
|
+
{
|
|
1290
|
+
"internalType": "address",
|
|
1291
|
+
"name": "priceFeed",
|
|
1292
|
+
"type": "address"
|
|
1293
|
+
}
|
|
1294
|
+
],
|
|
1295
|
+
"name": "getPrice",
|
|
1296
|
+
"outputs": [
|
|
1297
|
+
{
|
|
1298
|
+
"internalType": "uint256",
|
|
1299
|
+
"name": "",
|
|
1300
|
+
"type": "uint256"
|
|
1301
|
+
}
|
|
1302
|
+
],
|
|
1303
|
+
"stateMutability": "view",
|
|
1304
|
+
"type": "function"
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
"inputs": [],
|
|
1308
|
+
"name": "getReserves",
|
|
1309
|
+
"outputs": [
|
|
1310
|
+
{
|
|
1311
|
+
"internalType": "int256",
|
|
1312
|
+
"name": "",
|
|
1313
|
+
"type": "int256"
|
|
1314
|
+
}
|
|
1315
|
+
],
|
|
1316
|
+
"stateMutability": "view",
|
|
1317
|
+
"type": "function"
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
"inputs": [
|
|
1321
|
+
{
|
|
1322
|
+
"internalType": "uint256",
|
|
1323
|
+
"name": "utilization",
|
|
1324
|
+
"type": "uint256"
|
|
1325
|
+
}
|
|
1326
|
+
],
|
|
1327
|
+
"name": "getSupplyRate",
|
|
1328
|
+
"outputs": [
|
|
1329
|
+
{
|
|
1330
|
+
"internalType": "uint64",
|
|
1331
|
+
"name": "",
|
|
1332
|
+
"type": "uint64"
|
|
1333
|
+
}
|
|
1334
|
+
],
|
|
1335
|
+
"stateMutability": "view",
|
|
1336
|
+
"type": "function"
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
"inputs": [],
|
|
1340
|
+
"name": "getUtilization",
|
|
1341
|
+
"outputs": [
|
|
1342
|
+
{
|
|
1343
|
+
"internalType": "uint256",
|
|
1344
|
+
"name": "",
|
|
1345
|
+
"type": "uint256"
|
|
1346
|
+
}
|
|
1347
|
+
],
|
|
1348
|
+
"stateMutability": "view",
|
|
1349
|
+
"type": "function"
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
"inputs": [],
|
|
1353
|
+
"name": "governor",
|
|
1354
|
+
"outputs": [
|
|
1355
|
+
{
|
|
1356
|
+
"internalType": "address",
|
|
1357
|
+
"name": "",
|
|
1358
|
+
"type": "address"
|
|
1359
|
+
}
|
|
1360
|
+
],
|
|
1361
|
+
"stateMutability": "view",
|
|
1362
|
+
"type": "function"
|
|
1363
|
+
},
|
|
1364
|
+
{
|
|
1365
|
+
"inputs": [
|
|
1366
|
+
{
|
|
1367
|
+
"internalType": "address",
|
|
1368
|
+
"name": "owner",
|
|
1369
|
+
"type": "address"
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
"internalType": "address",
|
|
1373
|
+
"name": "manager",
|
|
1374
|
+
"type": "address"
|
|
1375
|
+
}
|
|
1376
|
+
],
|
|
1377
|
+
"name": "hasPermission",
|
|
1378
|
+
"outputs": [
|
|
1379
|
+
{
|
|
1380
|
+
"internalType": "bool",
|
|
1381
|
+
"name": "",
|
|
1382
|
+
"type": "bool"
|
|
1383
|
+
}
|
|
1384
|
+
],
|
|
1385
|
+
"stateMutability": "view",
|
|
1386
|
+
"type": "function"
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
"inputs": [],
|
|
1390
|
+
"name": "initializeStorage",
|
|
1391
|
+
"outputs": [],
|
|
1392
|
+
"stateMutability": "nonpayable",
|
|
1393
|
+
"type": "function"
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"inputs": [],
|
|
1397
|
+
"name": "isAbsorbPaused",
|
|
1398
|
+
"outputs": [
|
|
1399
|
+
{
|
|
1400
|
+
"internalType": "bool",
|
|
1401
|
+
"name": "",
|
|
1402
|
+
"type": "bool"
|
|
1403
|
+
}
|
|
1404
|
+
],
|
|
1405
|
+
"stateMutability": "view",
|
|
1406
|
+
"type": "function"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
"inputs": [
|
|
1410
|
+
{
|
|
1411
|
+
"internalType": "address",
|
|
1412
|
+
"name": "",
|
|
1413
|
+
"type": "address"
|
|
1414
|
+
},
|
|
1415
|
+
{
|
|
1416
|
+
"internalType": "address",
|
|
1417
|
+
"name": "",
|
|
1418
|
+
"type": "address"
|
|
1419
|
+
}
|
|
1420
|
+
],
|
|
1421
|
+
"name": "isAllowed",
|
|
1422
|
+
"outputs": [
|
|
1423
|
+
{
|
|
1424
|
+
"internalType": "bool",
|
|
1425
|
+
"name": "",
|
|
1426
|
+
"type": "bool"
|
|
1427
|
+
}
|
|
1428
|
+
],
|
|
1429
|
+
"stateMutability": "view",
|
|
1430
|
+
"type": "function"
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
"inputs": [],
|
|
1434
|
+
"name": "isBaseSupplyPaused",
|
|
1435
|
+
"outputs": [
|
|
1436
|
+
{
|
|
1437
|
+
"internalType": "bool",
|
|
1438
|
+
"name": "",
|
|
1439
|
+
"type": "bool"
|
|
1440
|
+
}
|
|
1441
|
+
],
|
|
1442
|
+
"stateMutability": "view",
|
|
1443
|
+
"type": "function"
|
|
1444
|
+
},
|
|
1445
|
+
{
|
|
1446
|
+
"inputs": [
|
|
1447
|
+
{
|
|
1448
|
+
"internalType": "address",
|
|
1449
|
+
"name": "account",
|
|
1450
|
+
"type": "address"
|
|
1451
|
+
}
|
|
1452
|
+
],
|
|
1453
|
+
"name": "isBorrowCollateralized",
|
|
1454
|
+
"outputs": [
|
|
1455
|
+
{
|
|
1456
|
+
"internalType": "bool",
|
|
1457
|
+
"name": "",
|
|
1458
|
+
"type": "bool"
|
|
1459
|
+
}
|
|
1460
|
+
],
|
|
1461
|
+
"stateMutability": "view",
|
|
1462
|
+
"type": "function"
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
"inputs": [],
|
|
1466
|
+
"name": "isBorrowersTransferPaused",
|
|
1467
|
+
"outputs": [
|
|
1468
|
+
{
|
|
1469
|
+
"internalType": "bool",
|
|
1470
|
+
"name": "",
|
|
1471
|
+
"type": "bool"
|
|
1472
|
+
}
|
|
1473
|
+
],
|
|
1474
|
+
"stateMutability": "view",
|
|
1475
|
+
"type": "function"
|
|
1476
|
+
},
|
|
1477
|
+
{
|
|
1478
|
+
"inputs": [],
|
|
1479
|
+
"name": "isBorrowersWithdrawPaused",
|
|
1480
|
+
"outputs": [
|
|
1481
|
+
{
|
|
1482
|
+
"internalType": "bool",
|
|
1483
|
+
"name": "",
|
|
1484
|
+
"type": "bool"
|
|
1485
|
+
}
|
|
1486
|
+
],
|
|
1487
|
+
"stateMutability": "view",
|
|
1488
|
+
"type": "function"
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
"inputs": [],
|
|
1492
|
+
"name": "isBuyPaused",
|
|
1493
|
+
"outputs": [
|
|
1494
|
+
{
|
|
1495
|
+
"internalType": "bool",
|
|
1496
|
+
"name": "",
|
|
1497
|
+
"type": "bool"
|
|
1498
|
+
}
|
|
1499
|
+
],
|
|
1500
|
+
"stateMutability": "view",
|
|
1501
|
+
"type": "function"
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
"inputs": [
|
|
1505
|
+
{
|
|
1506
|
+
"internalType": "uint24",
|
|
1507
|
+
"name": "assetIndex",
|
|
1508
|
+
"type": "uint24"
|
|
1509
|
+
}
|
|
1510
|
+
],
|
|
1511
|
+
"name": "isCollateralAssetSupplyPaused",
|
|
1512
|
+
"outputs": [
|
|
1513
|
+
{
|
|
1514
|
+
"internalType": "bool",
|
|
1515
|
+
"name": "",
|
|
1516
|
+
"type": "bool"
|
|
1517
|
+
}
|
|
1518
|
+
],
|
|
1519
|
+
"stateMutability": "view",
|
|
1520
|
+
"type": "function"
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
"inputs": [
|
|
1524
|
+
{
|
|
1525
|
+
"internalType": "uint24",
|
|
1526
|
+
"name": "assetIndex",
|
|
1527
|
+
"type": "uint24"
|
|
1528
|
+
}
|
|
1529
|
+
],
|
|
1530
|
+
"name": "isCollateralAssetTransferPaused",
|
|
1531
|
+
"outputs": [
|
|
1532
|
+
{
|
|
1533
|
+
"internalType": "bool",
|
|
1534
|
+
"name": "",
|
|
1535
|
+
"type": "bool"
|
|
1536
|
+
}
|
|
1537
|
+
],
|
|
1538
|
+
"stateMutability": "view",
|
|
1539
|
+
"type": "function"
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
"inputs": [
|
|
1543
|
+
{
|
|
1544
|
+
"internalType": "uint24",
|
|
1545
|
+
"name": "assetIndex",
|
|
1546
|
+
"type": "uint24"
|
|
1547
|
+
}
|
|
1548
|
+
],
|
|
1549
|
+
"name": "isCollateralAssetWithdrawPaused",
|
|
1550
|
+
"outputs": [
|
|
1551
|
+
{
|
|
1552
|
+
"internalType": "bool",
|
|
1553
|
+
"name": "",
|
|
1554
|
+
"type": "bool"
|
|
1555
|
+
}
|
|
1556
|
+
],
|
|
1557
|
+
"stateMutability": "view",
|
|
1558
|
+
"type": "function"
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
"inputs": [
|
|
1562
|
+
{
|
|
1563
|
+
"internalType": "uint24",
|
|
1564
|
+
"name": "assetIndex",
|
|
1565
|
+
"type": "uint24"
|
|
1566
|
+
}
|
|
1567
|
+
],
|
|
1568
|
+
"name": "isCollateralDeactivated",
|
|
1569
|
+
"outputs": [
|
|
1570
|
+
{
|
|
1571
|
+
"internalType": "bool",
|
|
1572
|
+
"name": "",
|
|
1573
|
+
"type": "bool"
|
|
1574
|
+
}
|
|
1575
|
+
],
|
|
1576
|
+
"stateMutability": "view",
|
|
1577
|
+
"type": "function"
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
"inputs": [],
|
|
1581
|
+
"name": "isCollateralSupplyPaused",
|
|
1582
|
+
"outputs": [
|
|
1583
|
+
{
|
|
1584
|
+
"internalType": "bool",
|
|
1585
|
+
"name": "",
|
|
1586
|
+
"type": "bool"
|
|
1587
|
+
}
|
|
1588
|
+
],
|
|
1589
|
+
"stateMutability": "view",
|
|
1590
|
+
"type": "function"
|
|
1591
|
+
},
|
|
1592
|
+
{
|
|
1593
|
+
"inputs": [],
|
|
1594
|
+
"name": "isCollateralTransferPaused",
|
|
1595
|
+
"outputs": [
|
|
1596
|
+
{
|
|
1597
|
+
"internalType": "bool",
|
|
1598
|
+
"name": "",
|
|
1599
|
+
"type": "bool"
|
|
1600
|
+
}
|
|
1601
|
+
],
|
|
1602
|
+
"stateMutability": "view",
|
|
1603
|
+
"type": "function"
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
"inputs": [],
|
|
1607
|
+
"name": "isCollateralWithdrawPaused",
|
|
1608
|
+
"outputs": [
|
|
1609
|
+
{
|
|
1610
|
+
"internalType": "bool",
|
|
1611
|
+
"name": "",
|
|
1612
|
+
"type": "bool"
|
|
1613
|
+
}
|
|
1614
|
+
],
|
|
1615
|
+
"stateMutability": "view",
|
|
1616
|
+
"type": "function"
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
"inputs": [],
|
|
1620
|
+
"name": "isLendersTransferPaused",
|
|
1621
|
+
"outputs": [
|
|
1622
|
+
{
|
|
1623
|
+
"internalType": "bool",
|
|
1624
|
+
"name": "",
|
|
1625
|
+
"type": "bool"
|
|
1626
|
+
}
|
|
1627
|
+
],
|
|
1628
|
+
"stateMutability": "view",
|
|
1629
|
+
"type": "function"
|
|
1630
|
+
},
|
|
1631
|
+
{
|
|
1632
|
+
"inputs": [],
|
|
1633
|
+
"name": "isLendersWithdrawPaused",
|
|
1634
|
+
"outputs": [
|
|
1635
|
+
{
|
|
1636
|
+
"internalType": "bool",
|
|
1637
|
+
"name": "",
|
|
1638
|
+
"type": "bool"
|
|
1639
|
+
}
|
|
1640
|
+
],
|
|
1641
|
+
"stateMutability": "view",
|
|
1642
|
+
"type": "function"
|
|
1643
|
+
},
|
|
1644
|
+
{
|
|
1645
|
+
"inputs": [
|
|
1646
|
+
{
|
|
1647
|
+
"internalType": "address",
|
|
1648
|
+
"name": "account",
|
|
1649
|
+
"type": "address"
|
|
1650
|
+
}
|
|
1651
|
+
],
|
|
1652
|
+
"name": "isLiquidatable",
|
|
1653
|
+
"outputs": [
|
|
1654
|
+
{
|
|
1655
|
+
"internalType": "bool",
|
|
1656
|
+
"name": "",
|
|
1657
|
+
"type": "bool"
|
|
1658
|
+
}
|
|
1659
|
+
],
|
|
1660
|
+
"stateMutability": "view",
|
|
1661
|
+
"type": "function"
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
"inputs": [],
|
|
1665
|
+
"name": "isSupplyPaused",
|
|
1666
|
+
"outputs": [
|
|
1667
|
+
{
|
|
1668
|
+
"internalType": "bool",
|
|
1669
|
+
"name": "",
|
|
1670
|
+
"type": "bool"
|
|
1671
|
+
}
|
|
1672
|
+
],
|
|
1673
|
+
"stateMutability": "view",
|
|
1674
|
+
"type": "function"
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
"inputs": [],
|
|
1678
|
+
"name": "isTransferPaused",
|
|
1679
|
+
"outputs": [
|
|
1680
|
+
{
|
|
1681
|
+
"internalType": "bool",
|
|
1682
|
+
"name": "",
|
|
1683
|
+
"type": "bool"
|
|
1684
|
+
}
|
|
1685
|
+
],
|
|
1686
|
+
"stateMutability": "view",
|
|
1687
|
+
"type": "function"
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
"inputs": [],
|
|
1691
|
+
"name": "isWithdrawPaused",
|
|
1692
|
+
"outputs": [
|
|
1693
|
+
{
|
|
1694
|
+
"internalType": "bool",
|
|
1695
|
+
"name": "",
|
|
1696
|
+
"type": "bool"
|
|
1697
|
+
}
|
|
1698
|
+
],
|
|
1699
|
+
"stateMutability": "view",
|
|
1700
|
+
"type": "function"
|
|
1701
|
+
},
|
|
1702
|
+
{
|
|
1703
|
+
"inputs": [
|
|
1704
|
+
{
|
|
1705
|
+
"internalType": "address",
|
|
1706
|
+
"name": "",
|
|
1707
|
+
"type": "address"
|
|
1708
|
+
}
|
|
1709
|
+
],
|
|
1710
|
+
"name": "liquidatorPoints",
|
|
1711
|
+
"outputs": [
|
|
1712
|
+
{
|
|
1713
|
+
"internalType": "uint32",
|
|
1714
|
+
"name": "numAbsorbs",
|
|
1715
|
+
"type": "uint32"
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"internalType": "uint64",
|
|
1719
|
+
"name": "numAbsorbed",
|
|
1720
|
+
"type": "uint64"
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
"internalType": "uint128",
|
|
1724
|
+
"name": "approxSpend",
|
|
1725
|
+
"type": "uint128"
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
"internalType": "uint32",
|
|
1729
|
+
"name": "_reserved",
|
|
1730
|
+
"type": "uint32"
|
|
1731
|
+
}
|
|
1732
|
+
],
|
|
1733
|
+
"stateMutability": "view",
|
|
1734
|
+
"type": "function"
|
|
1735
|
+
},
|
|
1736
|
+
{
|
|
1737
|
+
"inputs": [],
|
|
1738
|
+
"name": "numAssets",
|
|
1739
|
+
"outputs": [
|
|
1740
|
+
{
|
|
1741
|
+
"internalType": "uint8",
|
|
1742
|
+
"name": "",
|
|
1743
|
+
"type": "uint8"
|
|
1744
|
+
}
|
|
1745
|
+
],
|
|
1746
|
+
"stateMutability": "view",
|
|
1747
|
+
"type": "function"
|
|
1748
|
+
},
|
|
1749
|
+
{
|
|
1750
|
+
"inputs": [
|
|
1751
|
+
{
|
|
1752
|
+
"internalType": "bool",
|
|
1753
|
+
"name": "supplyPaused",
|
|
1754
|
+
"type": "bool"
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
"internalType": "bool",
|
|
1758
|
+
"name": "transferPaused",
|
|
1759
|
+
"type": "bool"
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
"internalType": "bool",
|
|
1763
|
+
"name": "withdrawPaused",
|
|
1764
|
+
"type": "bool"
|
|
1765
|
+
},
|
|
1766
|
+
{
|
|
1767
|
+
"internalType": "bool",
|
|
1768
|
+
"name": "absorbPaused",
|
|
1769
|
+
"type": "bool"
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
"internalType": "bool",
|
|
1773
|
+
"name": "buyPaused",
|
|
1774
|
+
"type": "bool"
|
|
1775
|
+
}
|
|
1776
|
+
],
|
|
1777
|
+
"name": "pause",
|
|
1778
|
+
"outputs": [],
|
|
1779
|
+
"stateMutability": "nonpayable",
|
|
1780
|
+
"type": "function"
|
|
1781
|
+
},
|
|
1782
|
+
{
|
|
1783
|
+
"inputs": [],
|
|
1784
|
+
"name": "pauseGuardian",
|
|
1785
|
+
"outputs": [
|
|
1786
|
+
{
|
|
1787
|
+
"internalType": "address",
|
|
1788
|
+
"name": "",
|
|
1789
|
+
"type": "address"
|
|
1790
|
+
}
|
|
1791
|
+
],
|
|
1792
|
+
"stateMutability": "view",
|
|
1793
|
+
"type": "function"
|
|
1794
|
+
},
|
|
1795
|
+
{
|
|
1796
|
+
"inputs": [
|
|
1797
|
+
{
|
|
1798
|
+
"internalType": "address",
|
|
1799
|
+
"name": "asset",
|
|
1800
|
+
"type": "address"
|
|
1801
|
+
},
|
|
1802
|
+
{
|
|
1803
|
+
"internalType": "uint256",
|
|
1804
|
+
"name": "baseAmount",
|
|
1805
|
+
"type": "uint256"
|
|
1806
|
+
}
|
|
1807
|
+
],
|
|
1808
|
+
"name": "quoteCollateral",
|
|
1809
|
+
"outputs": [
|
|
1810
|
+
{
|
|
1811
|
+
"internalType": "uint256",
|
|
1812
|
+
"name": "",
|
|
1813
|
+
"type": "uint256"
|
|
1814
|
+
}
|
|
1815
|
+
],
|
|
1816
|
+
"stateMutability": "view",
|
|
1817
|
+
"type": "function"
|
|
1818
|
+
},
|
|
1819
|
+
{
|
|
1820
|
+
"inputs": [],
|
|
1821
|
+
"name": "storeFrontPriceFactor",
|
|
1822
|
+
"outputs": [
|
|
1823
|
+
{
|
|
1824
|
+
"internalType": "uint256",
|
|
1825
|
+
"name": "",
|
|
1826
|
+
"type": "uint256"
|
|
1827
|
+
}
|
|
1828
|
+
],
|
|
1829
|
+
"stateMutability": "view",
|
|
1830
|
+
"type": "function"
|
|
1831
|
+
},
|
|
1832
|
+
{
|
|
1833
|
+
"inputs": [
|
|
1834
|
+
{
|
|
1835
|
+
"internalType": "address",
|
|
1836
|
+
"name": "asset",
|
|
1837
|
+
"type": "address"
|
|
1838
|
+
},
|
|
1839
|
+
{
|
|
1840
|
+
"internalType": "uint256",
|
|
1841
|
+
"name": "amount",
|
|
1842
|
+
"type": "uint256"
|
|
1843
|
+
}
|
|
1844
|
+
],
|
|
1845
|
+
"name": "supply",
|
|
1846
|
+
"outputs": [],
|
|
1847
|
+
"stateMutability": "nonpayable",
|
|
1848
|
+
"type": "function"
|
|
1849
|
+
},
|
|
1850
|
+
{
|
|
1851
|
+
"inputs": [
|
|
1852
|
+
{
|
|
1853
|
+
"internalType": "address",
|
|
1854
|
+
"name": "from",
|
|
1855
|
+
"type": "address"
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
"internalType": "address",
|
|
1859
|
+
"name": "dst",
|
|
1860
|
+
"type": "address"
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
"internalType": "address",
|
|
1864
|
+
"name": "asset",
|
|
1865
|
+
"type": "address"
|
|
1866
|
+
},
|
|
1867
|
+
{
|
|
1868
|
+
"internalType": "uint256",
|
|
1869
|
+
"name": "amount",
|
|
1870
|
+
"type": "uint256"
|
|
1871
|
+
}
|
|
1872
|
+
],
|
|
1873
|
+
"name": "supplyFrom",
|
|
1874
|
+
"outputs": [],
|
|
1875
|
+
"stateMutability": "nonpayable",
|
|
1876
|
+
"type": "function"
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
"inputs": [],
|
|
1880
|
+
"name": "supplyKink",
|
|
1881
|
+
"outputs": [
|
|
1882
|
+
{
|
|
1883
|
+
"internalType": "uint256",
|
|
1884
|
+
"name": "",
|
|
1885
|
+
"type": "uint256"
|
|
1886
|
+
}
|
|
1887
|
+
],
|
|
1888
|
+
"stateMutability": "view",
|
|
1889
|
+
"type": "function"
|
|
1890
|
+
},
|
|
1891
|
+
{
|
|
1892
|
+
"inputs": [],
|
|
1893
|
+
"name": "supplyPerSecondInterestRateBase",
|
|
1894
|
+
"outputs": [
|
|
1895
|
+
{
|
|
1896
|
+
"internalType": "uint256",
|
|
1897
|
+
"name": "",
|
|
1898
|
+
"type": "uint256"
|
|
1899
|
+
}
|
|
1900
|
+
],
|
|
1901
|
+
"stateMutability": "view",
|
|
1902
|
+
"type": "function"
|
|
1903
|
+
},
|
|
1904
|
+
{
|
|
1905
|
+
"inputs": [],
|
|
1906
|
+
"name": "supplyPerSecondInterestRateSlopeHigh",
|
|
1907
|
+
"outputs": [
|
|
1908
|
+
{
|
|
1909
|
+
"internalType": "uint256",
|
|
1910
|
+
"name": "",
|
|
1911
|
+
"type": "uint256"
|
|
1912
|
+
}
|
|
1913
|
+
],
|
|
1914
|
+
"stateMutability": "view",
|
|
1915
|
+
"type": "function"
|
|
1916
|
+
},
|
|
1917
|
+
{
|
|
1918
|
+
"inputs": [],
|
|
1919
|
+
"name": "supplyPerSecondInterestRateSlopeLow",
|
|
1920
|
+
"outputs": [
|
|
1921
|
+
{
|
|
1922
|
+
"internalType": "uint256",
|
|
1923
|
+
"name": "",
|
|
1924
|
+
"type": "uint256"
|
|
1925
|
+
}
|
|
1926
|
+
],
|
|
1927
|
+
"stateMutability": "view",
|
|
1928
|
+
"type": "function"
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
"inputs": [
|
|
1932
|
+
{
|
|
1933
|
+
"internalType": "address",
|
|
1934
|
+
"name": "dst",
|
|
1935
|
+
"type": "address"
|
|
1936
|
+
},
|
|
1937
|
+
{
|
|
1938
|
+
"internalType": "address",
|
|
1939
|
+
"name": "asset",
|
|
1940
|
+
"type": "address"
|
|
1941
|
+
},
|
|
1942
|
+
{
|
|
1943
|
+
"internalType": "uint256",
|
|
1944
|
+
"name": "amount",
|
|
1945
|
+
"type": "uint256"
|
|
1946
|
+
}
|
|
1947
|
+
],
|
|
1948
|
+
"name": "supplyTo",
|
|
1949
|
+
"outputs": [],
|
|
1950
|
+
"stateMutability": "nonpayable",
|
|
1951
|
+
"type": "function"
|
|
1952
|
+
},
|
|
1953
|
+
{
|
|
1954
|
+
"inputs": [],
|
|
1955
|
+
"name": "targetReserves",
|
|
1956
|
+
"outputs": [
|
|
1957
|
+
{
|
|
1958
|
+
"internalType": "uint256",
|
|
1959
|
+
"name": "",
|
|
1960
|
+
"type": "uint256"
|
|
1961
|
+
}
|
|
1962
|
+
],
|
|
1963
|
+
"stateMutability": "view",
|
|
1964
|
+
"type": "function"
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
"inputs": [],
|
|
1968
|
+
"name": "totalBorrow",
|
|
1969
|
+
"outputs": [
|
|
1970
|
+
{
|
|
1971
|
+
"internalType": "uint256",
|
|
1972
|
+
"name": "",
|
|
1973
|
+
"type": "uint256"
|
|
1974
|
+
}
|
|
1975
|
+
],
|
|
1976
|
+
"stateMutability": "view",
|
|
1977
|
+
"type": "function"
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
"inputs": [],
|
|
1981
|
+
"name": "totalSupply",
|
|
1982
|
+
"outputs": [
|
|
1983
|
+
{
|
|
1984
|
+
"internalType": "uint256",
|
|
1985
|
+
"name": "",
|
|
1986
|
+
"type": "uint256"
|
|
1987
|
+
}
|
|
1988
|
+
],
|
|
1989
|
+
"stateMutability": "view",
|
|
1990
|
+
"type": "function"
|
|
1991
|
+
},
|
|
1992
|
+
{
|
|
1993
|
+
"inputs": [
|
|
1994
|
+
{
|
|
1995
|
+
"internalType": "address",
|
|
1996
|
+
"name": "",
|
|
1997
|
+
"type": "address"
|
|
1998
|
+
}
|
|
1999
|
+
],
|
|
2000
|
+
"name": "totalsCollateral",
|
|
2001
|
+
"outputs": [
|
|
2002
|
+
{
|
|
2003
|
+
"internalType": "uint128",
|
|
2004
|
+
"name": "totalSupplyAsset",
|
|
2005
|
+
"type": "uint128"
|
|
2006
|
+
},
|
|
2007
|
+
{
|
|
2008
|
+
"internalType": "uint128",
|
|
2009
|
+
"name": "_reserved",
|
|
2010
|
+
"type": "uint128"
|
|
2011
|
+
}
|
|
2012
|
+
],
|
|
2013
|
+
"stateMutability": "view",
|
|
2014
|
+
"type": "function"
|
|
2015
|
+
},
|
|
2016
|
+
{
|
|
2017
|
+
"inputs": [],
|
|
2018
|
+
"name": "trackingIndexScale",
|
|
2019
|
+
"outputs": [
|
|
2020
|
+
{
|
|
2021
|
+
"internalType": "uint256",
|
|
2022
|
+
"name": "",
|
|
2023
|
+
"type": "uint256"
|
|
2024
|
+
}
|
|
2025
|
+
],
|
|
2026
|
+
"stateMutability": "view",
|
|
2027
|
+
"type": "function"
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
"inputs": [
|
|
2031
|
+
{
|
|
2032
|
+
"internalType": "address",
|
|
2033
|
+
"name": "dst",
|
|
2034
|
+
"type": "address"
|
|
2035
|
+
},
|
|
2036
|
+
{
|
|
2037
|
+
"internalType": "uint256",
|
|
2038
|
+
"name": "amount",
|
|
2039
|
+
"type": "uint256"
|
|
2040
|
+
}
|
|
2041
|
+
],
|
|
2042
|
+
"name": "transfer",
|
|
2043
|
+
"outputs": [
|
|
2044
|
+
{
|
|
2045
|
+
"internalType": "bool",
|
|
2046
|
+
"name": "",
|
|
2047
|
+
"type": "bool"
|
|
2048
|
+
}
|
|
2049
|
+
],
|
|
2050
|
+
"stateMutability": "nonpayable",
|
|
2051
|
+
"type": "function"
|
|
2052
|
+
},
|
|
2053
|
+
{
|
|
2054
|
+
"inputs": [
|
|
2055
|
+
{
|
|
2056
|
+
"internalType": "address",
|
|
2057
|
+
"name": "dst",
|
|
2058
|
+
"type": "address"
|
|
2059
|
+
},
|
|
2060
|
+
{
|
|
2061
|
+
"internalType": "address",
|
|
2062
|
+
"name": "asset",
|
|
2063
|
+
"type": "address"
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
"internalType": "uint256",
|
|
2067
|
+
"name": "amount",
|
|
2068
|
+
"type": "uint256"
|
|
2069
|
+
}
|
|
2070
|
+
],
|
|
2071
|
+
"name": "transferAsset",
|
|
2072
|
+
"outputs": [],
|
|
2073
|
+
"stateMutability": "nonpayable",
|
|
2074
|
+
"type": "function"
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
"inputs": [
|
|
2078
|
+
{
|
|
2079
|
+
"internalType": "address",
|
|
2080
|
+
"name": "src",
|
|
2081
|
+
"type": "address"
|
|
2082
|
+
},
|
|
2083
|
+
{
|
|
2084
|
+
"internalType": "address",
|
|
2085
|
+
"name": "dst",
|
|
2086
|
+
"type": "address"
|
|
2087
|
+
},
|
|
2088
|
+
{
|
|
2089
|
+
"internalType": "address",
|
|
2090
|
+
"name": "asset",
|
|
2091
|
+
"type": "address"
|
|
2092
|
+
},
|
|
2093
|
+
{
|
|
2094
|
+
"internalType": "uint256",
|
|
2095
|
+
"name": "amount",
|
|
2096
|
+
"type": "uint256"
|
|
2097
|
+
}
|
|
2098
|
+
],
|
|
2099
|
+
"name": "transferAssetFrom",
|
|
2100
|
+
"outputs": [],
|
|
2101
|
+
"stateMutability": "nonpayable",
|
|
2102
|
+
"type": "function"
|
|
2103
|
+
},
|
|
2104
|
+
{
|
|
2105
|
+
"inputs": [
|
|
2106
|
+
{
|
|
2107
|
+
"internalType": "address",
|
|
2108
|
+
"name": "src",
|
|
2109
|
+
"type": "address"
|
|
2110
|
+
},
|
|
2111
|
+
{
|
|
2112
|
+
"internalType": "address",
|
|
2113
|
+
"name": "dst",
|
|
2114
|
+
"type": "address"
|
|
2115
|
+
},
|
|
2116
|
+
{
|
|
2117
|
+
"internalType": "uint256",
|
|
2118
|
+
"name": "amount",
|
|
2119
|
+
"type": "uint256"
|
|
2120
|
+
}
|
|
2121
|
+
],
|
|
2122
|
+
"name": "transferFrom",
|
|
2123
|
+
"outputs": [
|
|
2124
|
+
{
|
|
2125
|
+
"internalType": "bool",
|
|
2126
|
+
"name": "",
|
|
2127
|
+
"type": "bool"
|
|
2128
|
+
}
|
|
2129
|
+
],
|
|
2130
|
+
"stateMutability": "nonpayable",
|
|
2131
|
+
"type": "function"
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
"inputs": [
|
|
2135
|
+
{
|
|
2136
|
+
"internalType": "address",
|
|
2137
|
+
"name": "",
|
|
2138
|
+
"type": "address"
|
|
2139
|
+
}
|
|
2140
|
+
],
|
|
2141
|
+
"name": "userBasic",
|
|
2142
|
+
"outputs": [
|
|
2143
|
+
{
|
|
2144
|
+
"internalType": "int104",
|
|
2145
|
+
"name": "principal",
|
|
2146
|
+
"type": "int104"
|
|
2147
|
+
},
|
|
2148
|
+
{
|
|
2149
|
+
"internalType": "uint64",
|
|
2150
|
+
"name": "baseTrackingIndex",
|
|
2151
|
+
"type": "uint64"
|
|
2152
|
+
},
|
|
2153
|
+
{
|
|
2154
|
+
"internalType": "uint64",
|
|
2155
|
+
"name": "baseTrackingAccrued",
|
|
2156
|
+
"type": "uint64"
|
|
2157
|
+
},
|
|
2158
|
+
{
|
|
2159
|
+
"internalType": "uint16",
|
|
2160
|
+
"name": "assetsIn",
|
|
2161
|
+
"type": "uint16"
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
"internalType": "uint8",
|
|
2165
|
+
"name": "_reserved",
|
|
2166
|
+
"type": "uint8"
|
|
2167
|
+
}
|
|
2168
|
+
],
|
|
2169
|
+
"stateMutability": "view",
|
|
2170
|
+
"type": "function"
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
"inputs": [
|
|
2174
|
+
{
|
|
2175
|
+
"internalType": "address",
|
|
2176
|
+
"name": "",
|
|
2177
|
+
"type": "address"
|
|
2178
|
+
},
|
|
2179
|
+
{
|
|
2180
|
+
"internalType": "address",
|
|
2181
|
+
"name": "",
|
|
2182
|
+
"type": "address"
|
|
2183
|
+
}
|
|
2184
|
+
],
|
|
2185
|
+
"name": "userCollateral",
|
|
2186
|
+
"outputs": [
|
|
2187
|
+
{
|
|
2188
|
+
"internalType": "uint128",
|
|
2189
|
+
"name": "balance",
|
|
2190
|
+
"type": "uint128"
|
|
2191
|
+
},
|
|
2192
|
+
{
|
|
2193
|
+
"internalType": "uint128",
|
|
2194
|
+
"name": "_reserved",
|
|
2195
|
+
"type": "uint128"
|
|
2196
|
+
}
|
|
2197
|
+
],
|
|
2198
|
+
"stateMutability": "view",
|
|
2199
|
+
"type": "function"
|
|
2200
|
+
},
|
|
2201
|
+
{
|
|
2202
|
+
"inputs": [
|
|
2203
|
+
{
|
|
2204
|
+
"internalType": "address",
|
|
2205
|
+
"name": "",
|
|
2206
|
+
"type": "address"
|
|
2207
|
+
}
|
|
2208
|
+
],
|
|
2209
|
+
"name": "userNonce",
|
|
2210
|
+
"outputs": [
|
|
2211
|
+
{
|
|
2212
|
+
"internalType": "uint256",
|
|
2213
|
+
"name": "",
|
|
2214
|
+
"type": "uint256"
|
|
2215
|
+
}
|
|
2216
|
+
],
|
|
2217
|
+
"stateMutability": "view",
|
|
2218
|
+
"type": "function"
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
"inputs": [
|
|
2222
|
+
{
|
|
2223
|
+
"internalType": "address",
|
|
2224
|
+
"name": "asset",
|
|
2225
|
+
"type": "address"
|
|
2226
|
+
},
|
|
2227
|
+
{
|
|
2228
|
+
"internalType": "uint256",
|
|
2229
|
+
"name": "amount",
|
|
2230
|
+
"type": "uint256"
|
|
2231
|
+
}
|
|
2232
|
+
],
|
|
2233
|
+
"name": "withdraw",
|
|
2234
|
+
"outputs": [],
|
|
2235
|
+
"stateMutability": "nonpayable",
|
|
2236
|
+
"type": "function"
|
|
2237
|
+
},
|
|
2238
|
+
{
|
|
2239
|
+
"inputs": [
|
|
2240
|
+
{
|
|
2241
|
+
"internalType": "address",
|
|
2242
|
+
"name": "src",
|
|
2243
|
+
"type": "address"
|
|
2244
|
+
},
|
|
2245
|
+
{
|
|
2246
|
+
"internalType": "address",
|
|
2247
|
+
"name": "to",
|
|
2248
|
+
"type": "address"
|
|
2249
|
+
},
|
|
2250
|
+
{
|
|
2251
|
+
"internalType": "address",
|
|
2252
|
+
"name": "asset",
|
|
2253
|
+
"type": "address"
|
|
2254
|
+
},
|
|
2255
|
+
{
|
|
2256
|
+
"internalType": "uint256",
|
|
2257
|
+
"name": "amount",
|
|
2258
|
+
"type": "uint256"
|
|
2259
|
+
}
|
|
2260
|
+
],
|
|
2261
|
+
"name": "withdrawFrom",
|
|
2262
|
+
"outputs": [],
|
|
2263
|
+
"stateMutability": "nonpayable",
|
|
2264
|
+
"type": "function"
|
|
2265
|
+
},
|
|
2266
|
+
{
|
|
2267
|
+
"inputs": [
|
|
2268
|
+
{
|
|
2269
|
+
"internalType": "address",
|
|
2270
|
+
"name": "to",
|
|
2271
|
+
"type": "address"
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
"internalType": "uint256",
|
|
2275
|
+
"name": "amount",
|
|
2276
|
+
"type": "uint256"
|
|
2277
|
+
}
|
|
2278
|
+
],
|
|
2279
|
+
"name": "withdrawReserves",
|
|
2280
|
+
"outputs": [],
|
|
2281
|
+
"stateMutability": "nonpayable",
|
|
2282
|
+
"type": "function"
|
|
2283
|
+
},
|
|
2284
|
+
{
|
|
2285
|
+
"inputs": [
|
|
2286
|
+
{
|
|
2287
|
+
"internalType": "address",
|
|
2288
|
+
"name": "to",
|
|
2289
|
+
"type": "address"
|
|
2290
|
+
},
|
|
2291
|
+
{
|
|
2292
|
+
"internalType": "address",
|
|
2293
|
+
"name": "asset",
|
|
2294
|
+
"type": "address"
|
|
2295
|
+
},
|
|
2296
|
+
{
|
|
2297
|
+
"internalType": "uint256",
|
|
2298
|
+
"name": "amount",
|
|
2299
|
+
"type": "uint256"
|
|
2300
|
+
}
|
|
2301
|
+
],
|
|
2302
|
+
"name": "withdrawTo",
|
|
2303
|
+
"outputs": [],
|
|
2304
|
+
"stateMutability": "nonpayable",
|
|
2305
|
+
"type": "function"
|
|
2306
|
+
}
|
|
2307
|
+
];
|
|
2308
|
+
/**
|
|
2309
|
+
* InstitutionalComet_json Contract Class
|
|
2310
|
+
*
|
|
2311
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
2312
|
+
*
|
|
2313
|
+
* @example
|
|
2314
|
+
* ```typescript
|
|
2315
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
2316
|
+
* import { mainnet } from 'viem/chains';
|
|
2317
|
+
* import { InstitutionalComet_json } from 'InstitutionalComet_json';
|
|
2318
|
+
*
|
|
2319
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
2320
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
2321
|
+
*
|
|
2322
|
+
* const contract = new InstitutionalComet_json('0x...', { publicClient, walletClient });
|
|
2323
|
+
*
|
|
2324
|
+
* // Read functions
|
|
2325
|
+
* const result = await contract.balanceOf('0x...');
|
|
2326
|
+
*
|
|
2327
|
+
* // Write functions
|
|
2328
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
2329
|
+
*
|
|
2330
|
+
* // Simulate transactions (dry-run)
|
|
2331
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
2332
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
2333
|
+
*
|
|
2334
|
+
* // Watch events
|
|
2335
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
2336
|
+
* console.log('Transfer event:', event);
|
|
2337
|
+
* });
|
|
2338
|
+
* ```
|
|
2339
|
+
*/
|
|
2340
|
+
class InstitutionalComet_json {
|
|
2341
|
+
constructor(address, clients) {
|
|
2342
|
+
this.contractAddress = address;
|
|
2343
|
+
this.publicClient = clients.publicClient;
|
|
2344
|
+
this.contract = (0, viem_1.getContract)({
|
|
2345
|
+
address,
|
|
2346
|
+
abi: exports.InstitutionalComet_jsonAbi,
|
|
2347
|
+
client: {
|
|
2348
|
+
public: clients.publicClient,
|
|
2349
|
+
wallet: clients.walletClient,
|
|
2350
|
+
},
|
|
2351
|
+
});
|
|
2352
|
+
}
|
|
2353
|
+
/**
|
|
2354
|
+
* Get the contract address
|
|
2355
|
+
*/
|
|
2356
|
+
get address() {
|
|
2357
|
+
return this.contractAddress;
|
|
2358
|
+
}
|
|
2359
|
+
/**
|
|
2360
|
+
* Get the underlying viem contract instance
|
|
2361
|
+
*/
|
|
2362
|
+
getContract() {
|
|
2363
|
+
return this.contract;
|
|
2364
|
+
}
|
|
2365
|
+
/**
|
|
2366
|
+
* MAX_SUPPORTED_UTILIZATION
|
|
2367
|
+
* view
|
|
2368
|
+
*/
|
|
2369
|
+
async MAX_SUPPORTED_UTILIZATION() {
|
|
2370
|
+
return this.contract.read.MAX_SUPPORTED_UTILIZATION();
|
|
2371
|
+
}
|
|
2372
|
+
/**
|
|
2373
|
+
* assetList
|
|
2374
|
+
* view
|
|
2375
|
+
*/
|
|
2376
|
+
async assetList() {
|
|
2377
|
+
return this.contract.read.assetList();
|
|
2378
|
+
}
|
|
2379
|
+
/**
|
|
2380
|
+
* balanceOf
|
|
2381
|
+
* view
|
|
2382
|
+
*/
|
|
2383
|
+
async balanceOf(account) {
|
|
2384
|
+
return this.contract.read.balanceOf([account]);
|
|
2385
|
+
}
|
|
2386
|
+
/**
|
|
2387
|
+
* baseBorrowMin
|
|
2388
|
+
* view
|
|
2389
|
+
*/
|
|
2390
|
+
async baseBorrowMin() {
|
|
2391
|
+
return this.contract.read.baseBorrowMin();
|
|
2392
|
+
}
|
|
2393
|
+
/**
|
|
2394
|
+
* baseMinForRewards
|
|
2395
|
+
* view
|
|
2396
|
+
*/
|
|
2397
|
+
async baseMinForRewards() {
|
|
2398
|
+
return this.contract.read.baseMinForRewards();
|
|
2399
|
+
}
|
|
2400
|
+
/**
|
|
2401
|
+
* baseScale
|
|
2402
|
+
* view
|
|
2403
|
+
*/
|
|
2404
|
+
async baseScale() {
|
|
2405
|
+
return this.contract.read.baseScale();
|
|
2406
|
+
}
|
|
2407
|
+
/**
|
|
2408
|
+
* baseToken
|
|
2409
|
+
* view
|
|
2410
|
+
*/
|
|
2411
|
+
async baseToken() {
|
|
2412
|
+
return this.contract.read.baseToken();
|
|
2413
|
+
}
|
|
2414
|
+
/**
|
|
2415
|
+
* baseTokenPriceFeed
|
|
2416
|
+
* view
|
|
2417
|
+
*/
|
|
2418
|
+
async baseTokenPriceFeed() {
|
|
2419
|
+
return this.contract.read.baseTokenPriceFeed();
|
|
2420
|
+
}
|
|
2421
|
+
/**
|
|
2422
|
+
* baseTrackingBorrowSpeed
|
|
2423
|
+
* view
|
|
2424
|
+
*/
|
|
2425
|
+
async baseTrackingBorrowSpeed() {
|
|
2426
|
+
return this.contract.read.baseTrackingBorrowSpeed();
|
|
2427
|
+
}
|
|
2428
|
+
/**
|
|
2429
|
+
* baseTrackingSupplySpeed
|
|
2430
|
+
* view
|
|
2431
|
+
*/
|
|
2432
|
+
async baseTrackingSupplySpeed() {
|
|
2433
|
+
return this.contract.read.baseTrackingSupplySpeed();
|
|
2434
|
+
}
|
|
2435
|
+
/**
|
|
2436
|
+
* borrowBalanceOf
|
|
2437
|
+
* view
|
|
2438
|
+
*/
|
|
2439
|
+
async borrowBalanceOf(account) {
|
|
2440
|
+
return this.contract.read.borrowBalanceOf([account]);
|
|
2441
|
+
}
|
|
2442
|
+
/**
|
|
2443
|
+
* borrowKink
|
|
2444
|
+
* view
|
|
2445
|
+
*/
|
|
2446
|
+
async borrowKink() {
|
|
2447
|
+
return this.contract.read.borrowKink();
|
|
2448
|
+
}
|
|
2449
|
+
/**
|
|
2450
|
+
* borrowPerSecondInterestRateBase
|
|
2451
|
+
* view
|
|
2452
|
+
*/
|
|
2453
|
+
async borrowPerSecondInterestRateBase() {
|
|
2454
|
+
return this.contract.read.borrowPerSecondInterestRateBase();
|
|
2455
|
+
}
|
|
2456
|
+
/**
|
|
2457
|
+
* borrowPerSecondInterestRateSlopeHigh
|
|
2458
|
+
* view
|
|
2459
|
+
*/
|
|
2460
|
+
async borrowPerSecondInterestRateSlopeHigh() {
|
|
2461
|
+
return this.contract.read.borrowPerSecondInterestRateSlopeHigh();
|
|
2462
|
+
}
|
|
2463
|
+
/**
|
|
2464
|
+
* borrowPerSecondInterestRateSlopeLow
|
|
2465
|
+
* view
|
|
2466
|
+
*/
|
|
2467
|
+
async borrowPerSecondInterestRateSlopeLow() {
|
|
2468
|
+
return this.contract.read.borrowPerSecondInterestRateSlopeLow();
|
|
2469
|
+
}
|
|
2470
|
+
/**
|
|
2471
|
+
* collateralsSupplyPauseFlags
|
|
2472
|
+
* view
|
|
2473
|
+
*/
|
|
2474
|
+
async collateralsSupplyPauseFlags() {
|
|
2475
|
+
return this.contract.read.collateralsSupplyPauseFlags();
|
|
2476
|
+
}
|
|
2477
|
+
/**
|
|
2478
|
+
* collateralsTransferPauseFlags
|
|
2479
|
+
* view
|
|
2480
|
+
*/
|
|
2481
|
+
async collateralsTransferPauseFlags() {
|
|
2482
|
+
return this.contract.read.collateralsTransferPauseFlags();
|
|
2483
|
+
}
|
|
2484
|
+
/**
|
|
2485
|
+
* collateralsWithdrawPauseFlags
|
|
2486
|
+
* view
|
|
2487
|
+
*/
|
|
2488
|
+
async collateralsWithdrawPauseFlags() {
|
|
2489
|
+
return this.contract.read.collateralsWithdrawPauseFlags();
|
|
2490
|
+
}
|
|
2491
|
+
/**
|
|
2492
|
+
* deactivatedCollaterals
|
|
2493
|
+
* view
|
|
2494
|
+
*/
|
|
2495
|
+
async deactivatedCollaterals() {
|
|
2496
|
+
return this.contract.read.deactivatedCollaterals();
|
|
2497
|
+
}
|
|
2498
|
+
/**
|
|
2499
|
+
* decimals
|
|
2500
|
+
* view
|
|
2501
|
+
*/
|
|
2502
|
+
async decimals() {
|
|
2503
|
+
return this.contract.read.decimals();
|
|
2504
|
+
}
|
|
2505
|
+
/**
|
|
2506
|
+
* extendedPauseFlags
|
|
2507
|
+
* view
|
|
2508
|
+
*/
|
|
2509
|
+
async extendedPauseFlags() {
|
|
2510
|
+
return this.contract.read.extendedPauseFlags();
|
|
2511
|
+
}
|
|
2512
|
+
/**
|
|
2513
|
+
* extensionDelegate
|
|
2514
|
+
* view
|
|
2515
|
+
*/
|
|
2516
|
+
async extensionDelegate() {
|
|
2517
|
+
return this.contract.read.extensionDelegate();
|
|
2518
|
+
}
|
|
2519
|
+
/**
|
|
2520
|
+
* getAssetInfo
|
|
2521
|
+
* view
|
|
2522
|
+
*/
|
|
2523
|
+
async getAssetInfo(i) {
|
|
2524
|
+
return this.contract.read.getAssetInfo([i]);
|
|
2525
|
+
}
|
|
2526
|
+
/**
|
|
2527
|
+
* getAssetInfoByAddress
|
|
2528
|
+
* view
|
|
2529
|
+
*/
|
|
2530
|
+
async getAssetInfoByAddress(asset) {
|
|
2531
|
+
return this.contract.read.getAssetInfoByAddress([asset]);
|
|
2532
|
+
}
|
|
2533
|
+
/**
|
|
2534
|
+
* getBorrowRate
|
|
2535
|
+
* view
|
|
2536
|
+
*/
|
|
2537
|
+
async getBorrowRate(utilization) {
|
|
2538
|
+
return this.contract.read.getBorrowRate([utilization]);
|
|
2539
|
+
}
|
|
2540
|
+
/**
|
|
2541
|
+
* getCollateralReserves
|
|
2542
|
+
* view
|
|
2543
|
+
*/
|
|
2544
|
+
async getCollateralReserves(asset) {
|
|
2545
|
+
return this.contract.read.getCollateralReserves([asset]);
|
|
2546
|
+
}
|
|
2547
|
+
/**
|
|
2548
|
+
* getPrice
|
|
2549
|
+
* view
|
|
2550
|
+
*/
|
|
2551
|
+
async getPrice(priceFeed) {
|
|
2552
|
+
return this.contract.read.getPrice([priceFeed]);
|
|
2553
|
+
}
|
|
2554
|
+
/**
|
|
2555
|
+
* getReserves
|
|
2556
|
+
* view
|
|
2557
|
+
*/
|
|
2558
|
+
async getReserves() {
|
|
2559
|
+
return this.contract.read.getReserves();
|
|
2560
|
+
}
|
|
2561
|
+
/**
|
|
2562
|
+
* getSupplyRate
|
|
2563
|
+
* view
|
|
2564
|
+
*/
|
|
2565
|
+
async getSupplyRate(utilization) {
|
|
2566
|
+
return this.contract.read.getSupplyRate([utilization]);
|
|
2567
|
+
}
|
|
2568
|
+
/**
|
|
2569
|
+
* getUtilization
|
|
2570
|
+
* view
|
|
2571
|
+
*/
|
|
2572
|
+
async getUtilization() {
|
|
2573
|
+
return this.contract.read.getUtilization();
|
|
2574
|
+
}
|
|
2575
|
+
/**
|
|
2576
|
+
* governor
|
|
2577
|
+
* view
|
|
2578
|
+
*/
|
|
2579
|
+
async governor() {
|
|
2580
|
+
return this.contract.read.governor();
|
|
2581
|
+
}
|
|
2582
|
+
/**
|
|
2583
|
+
* hasPermission
|
|
2584
|
+
* view
|
|
2585
|
+
*/
|
|
2586
|
+
async hasPermission(owner, manager) {
|
|
2587
|
+
return this.contract.read.hasPermission([owner, manager]);
|
|
2588
|
+
}
|
|
2589
|
+
/**
|
|
2590
|
+
* isAbsorbPaused
|
|
2591
|
+
* view
|
|
2592
|
+
*/
|
|
2593
|
+
async isAbsorbPaused() {
|
|
2594
|
+
return this.contract.read.isAbsorbPaused();
|
|
2595
|
+
}
|
|
2596
|
+
/**
|
|
2597
|
+
* isAllowed
|
|
2598
|
+
* view
|
|
2599
|
+
*/
|
|
2600
|
+
async isAllowed(arg0, arg1) {
|
|
2601
|
+
return this.contract.read.isAllowed([arg0, arg1]);
|
|
2602
|
+
}
|
|
2603
|
+
/**
|
|
2604
|
+
* isBaseSupplyPaused
|
|
2605
|
+
* view
|
|
2606
|
+
*/
|
|
2607
|
+
async isBaseSupplyPaused() {
|
|
2608
|
+
return this.contract.read.isBaseSupplyPaused();
|
|
2609
|
+
}
|
|
2610
|
+
/**
|
|
2611
|
+
* isBorrowCollateralized
|
|
2612
|
+
* view
|
|
2613
|
+
*/
|
|
2614
|
+
async isBorrowCollateralized(account) {
|
|
2615
|
+
return this.contract.read.isBorrowCollateralized([account]);
|
|
2616
|
+
}
|
|
2617
|
+
/**
|
|
2618
|
+
* isBorrowersTransferPaused
|
|
2619
|
+
* view
|
|
2620
|
+
*/
|
|
2621
|
+
async isBorrowersTransferPaused() {
|
|
2622
|
+
return this.contract.read.isBorrowersTransferPaused();
|
|
2623
|
+
}
|
|
2624
|
+
/**
|
|
2625
|
+
* isBorrowersWithdrawPaused
|
|
2626
|
+
* view
|
|
2627
|
+
*/
|
|
2628
|
+
async isBorrowersWithdrawPaused() {
|
|
2629
|
+
return this.contract.read.isBorrowersWithdrawPaused();
|
|
2630
|
+
}
|
|
2631
|
+
/**
|
|
2632
|
+
* isBuyPaused
|
|
2633
|
+
* view
|
|
2634
|
+
*/
|
|
2635
|
+
async isBuyPaused() {
|
|
2636
|
+
return this.contract.read.isBuyPaused();
|
|
2637
|
+
}
|
|
2638
|
+
/**
|
|
2639
|
+
* isCollateralAssetSupplyPaused
|
|
2640
|
+
* view
|
|
2641
|
+
*/
|
|
2642
|
+
async isCollateralAssetSupplyPaused(assetIndex) {
|
|
2643
|
+
return this.contract.read.isCollateralAssetSupplyPaused([assetIndex]);
|
|
2644
|
+
}
|
|
2645
|
+
/**
|
|
2646
|
+
* isCollateralAssetTransferPaused
|
|
2647
|
+
* view
|
|
2648
|
+
*/
|
|
2649
|
+
async isCollateralAssetTransferPaused(assetIndex) {
|
|
2650
|
+
return this.contract.read.isCollateralAssetTransferPaused([assetIndex]);
|
|
2651
|
+
}
|
|
2652
|
+
/**
|
|
2653
|
+
* isCollateralAssetWithdrawPaused
|
|
2654
|
+
* view
|
|
2655
|
+
*/
|
|
2656
|
+
async isCollateralAssetWithdrawPaused(assetIndex) {
|
|
2657
|
+
return this.contract.read.isCollateralAssetWithdrawPaused([assetIndex]);
|
|
2658
|
+
}
|
|
2659
|
+
/**
|
|
2660
|
+
* isCollateralDeactivated
|
|
2661
|
+
* view
|
|
2662
|
+
*/
|
|
2663
|
+
async isCollateralDeactivated(assetIndex) {
|
|
2664
|
+
return this.contract.read.isCollateralDeactivated([assetIndex]);
|
|
2665
|
+
}
|
|
2666
|
+
/**
|
|
2667
|
+
* isCollateralSupplyPaused
|
|
2668
|
+
* view
|
|
2669
|
+
*/
|
|
2670
|
+
async isCollateralSupplyPaused() {
|
|
2671
|
+
return this.contract.read.isCollateralSupplyPaused();
|
|
2672
|
+
}
|
|
2673
|
+
/**
|
|
2674
|
+
* isCollateralTransferPaused
|
|
2675
|
+
* view
|
|
2676
|
+
*/
|
|
2677
|
+
async isCollateralTransferPaused() {
|
|
2678
|
+
return this.contract.read.isCollateralTransferPaused();
|
|
2679
|
+
}
|
|
2680
|
+
/**
|
|
2681
|
+
* isCollateralWithdrawPaused
|
|
2682
|
+
* view
|
|
2683
|
+
*/
|
|
2684
|
+
async isCollateralWithdrawPaused() {
|
|
2685
|
+
return this.contract.read.isCollateralWithdrawPaused();
|
|
2686
|
+
}
|
|
2687
|
+
/**
|
|
2688
|
+
* isLendersTransferPaused
|
|
2689
|
+
* view
|
|
2690
|
+
*/
|
|
2691
|
+
async isLendersTransferPaused() {
|
|
2692
|
+
return this.contract.read.isLendersTransferPaused();
|
|
2693
|
+
}
|
|
2694
|
+
/**
|
|
2695
|
+
* isLendersWithdrawPaused
|
|
2696
|
+
* view
|
|
2697
|
+
*/
|
|
2698
|
+
async isLendersWithdrawPaused() {
|
|
2699
|
+
return this.contract.read.isLendersWithdrawPaused();
|
|
2700
|
+
}
|
|
2701
|
+
/**
|
|
2702
|
+
* isLiquidatable
|
|
2703
|
+
* view
|
|
2704
|
+
*/
|
|
2705
|
+
async isLiquidatable(account) {
|
|
2706
|
+
return this.contract.read.isLiquidatable([account]);
|
|
2707
|
+
}
|
|
2708
|
+
/**
|
|
2709
|
+
* isSupplyPaused
|
|
2710
|
+
* view
|
|
2711
|
+
*/
|
|
2712
|
+
async isSupplyPaused() {
|
|
2713
|
+
return this.contract.read.isSupplyPaused();
|
|
2714
|
+
}
|
|
2715
|
+
/**
|
|
2716
|
+
* isTransferPaused
|
|
2717
|
+
* view
|
|
2718
|
+
*/
|
|
2719
|
+
async isTransferPaused() {
|
|
2720
|
+
return this.contract.read.isTransferPaused();
|
|
2721
|
+
}
|
|
2722
|
+
/**
|
|
2723
|
+
* isWithdrawPaused
|
|
2724
|
+
* view
|
|
2725
|
+
*/
|
|
2726
|
+
async isWithdrawPaused() {
|
|
2727
|
+
return this.contract.read.isWithdrawPaused();
|
|
2728
|
+
}
|
|
2729
|
+
/**
|
|
2730
|
+
* liquidatorPoints
|
|
2731
|
+
* view
|
|
2732
|
+
*/
|
|
2733
|
+
async liquidatorPoints(arg0) {
|
|
2734
|
+
return this.contract.read.liquidatorPoints([arg0]);
|
|
2735
|
+
}
|
|
2736
|
+
/**
|
|
2737
|
+
* numAssets
|
|
2738
|
+
* view
|
|
2739
|
+
*/
|
|
2740
|
+
async numAssets() {
|
|
2741
|
+
return this.contract.read.numAssets();
|
|
2742
|
+
}
|
|
2743
|
+
/**
|
|
2744
|
+
* pauseGuardian
|
|
2745
|
+
* view
|
|
2746
|
+
*/
|
|
2747
|
+
async pauseGuardian() {
|
|
2748
|
+
return this.contract.read.pauseGuardian();
|
|
2749
|
+
}
|
|
2750
|
+
/**
|
|
2751
|
+
* quoteCollateral
|
|
2752
|
+
* view
|
|
2753
|
+
*/
|
|
2754
|
+
async quoteCollateral(asset, baseAmount) {
|
|
2755
|
+
return this.contract.read.quoteCollateral([asset, baseAmount]);
|
|
2756
|
+
}
|
|
2757
|
+
/**
|
|
2758
|
+
* storeFrontPriceFactor
|
|
2759
|
+
* view
|
|
2760
|
+
*/
|
|
2761
|
+
async storeFrontPriceFactor() {
|
|
2762
|
+
return this.contract.read.storeFrontPriceFactor();
|
|
2763
|
+
}
|
|
2764
|
+
/**
|
|
2765
|
+
* supplyKink
|
|
2766
|
+
* view
|
|
2767
|
+
*/
|
|
2768
|
+
async supplyKink() {
|
|
2769
|
+
return this.contract.read.supplyKink();
|
|
2770
|
+
}
|
|
2771
|
+
/**
|
|
2772
|
+
* supplyPerSecondInterestRateBase
|
|
2773
|
+
* view
|
|
2774
|
+
*/
|
|
2775
|
+
async supplyPerSecondInterestRateBase() {
|
|
2776
|
+
return this.contract.read.supplyPerSecondInterestRateBase();
|
|
2777
|
+
}
|
|
2778
|
+
/**
|
|
2779
|
+
* supplyPerSecondInterestRateSlopeHigh
|
|
2780
|
+
* view
|
|
2781
|
+
*/
|
|
2782
|
+
async supplyPerSecondInterestRateSlopeHigh() {
|
|
2783
|
+
return this.contract.read.supplyPerSecondInterestRateSlopeHigh();
|
|
2784
|
+
}
|
|
2785
|
+
/**
|
|
2786
|
+
* supplyPerSecondInterestRateSlopeLow
|
|
2787
|
+
* view
|
|
2788
|
+
*/
|
|
2789
|
+
async supplyPerSecondInterestRateSlopeLow() {
|
|
2790
|
+
return this.contract.read.supplyPerSecondInterestRateSlopeLow();
|
|
2791
|
+
}
|
|
2792
|
+
/**
|
|
2793
|
+
* targetReserves
|
|
2794
|
+
* view
|
|
2795
|
+
*/
|
|
2796
|
+
async targetReserves() {
|
|
2797
|
+
return this.contract.read.targetReserves();
|
|
2798
|
+
}
|
|
2799
|
+
/**
|
|
2800
|
+
* totalBorrow
|
|
2801
|
+
* view
|
|
2802
|
+
*/
|
|
2803
|
+
async totalBorrow() {
|
|
2804
|
+
return this.contract.read.totalBorrow();
|
|
2805
|
+
}
|
|
2806
|
+
/**
|
|
2807
|
+
* totalSupply
|
|
2808
|
+
* view
|
|
2809
|
+
*/
|
|
2810
|
+
async totalSupply() {
|
|
2811
|
+
return this.contract.read.totalSupply();
|
|
2812
|
+
}
|
|
2813
|
+
/**
|
|
2814
|
+
* totalsCollateral
|
|
2815
|
+
* view
|
|
2816
|
+
*/
|
|
2817
|
+
async totalsCollateral(arg0) {
|
|
2818
|
+
return this.contract.read.totalsCollateral([arg0]);
|
|
2819
|
+
}
|
|
2820
|
+
/**
|
|
2821
|
+
* trackingIndexScale
|
|
2822
|
+
* view
|
|
2823
|
+
*/
|
|
2824
|
+
async trackingIndexScale() {
|
|
2825
|
+
return this.contract.read.trackingIndexScale();
|
|
2826
|
+
}
|
|
2827
|
+
/**
|
|
2828
|
+
* userBasic
|
|
2829
|
+
* view
|
|
2830
|
+
*/
|
|
2831
|
+
async userBasic(arg0) {
|
|
2832
|
+
return this.contract.read.userBasic([arg0]);
|
|
2833
|
+
}
|
|
2834
|
+
/**
|
|
2835
|
+
* userCollateral
|
|
2836
|
+
* view
|
|
2837
|
+
*/
|
|
2838
|
+
async userCollateral(arg0, arg1) {
|
|
2839
|
+
return this.contract.read.userCollateral([arg0, arg1]);
|
|
2840
|
+
}
|
|
2841
|
+
/**
|
|
2842
|
+
* userNonce
|
|
2843
|
+
* view
|
|
2844
|
+
*/
|
|
2845
|
+
async userNonce(arg0) {
|
|
2846
|
+
return this.contract.read.userNonce([arg0]);
|
|
2847
|
+
}
|
|
2848
|
+
/**
|
|
2849
|
+
* absorb
|
|
2850
|
+
* nonpayable
|
|
2851
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2852
|
+
*/
|
|
2853
|
+
async absorb(absorber, accounts, options) {
|
|
2854
|
+
if (!this.contract.write) {
|
|
2855
|
+
throw new Error('Wallet client is required for write operations');
|
|
2856
|
+
}
|
|
2857
|
+
return this.contract.write.absorb([absorber, accounts], options);
|
|
2858
|
+
}
|
|
2859
|
+
/**
|
|
2860
|
+
* accrueAccount
|
|
2861
|
+
* nonpayable
|
|
2862
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2863
|
+
*/
|
|
2864
|
+
async accrueAccount(account, options) {
|
|
2865
|
+
if (!this.contract.write) {
|
|
2866
|
+
throw new Error('Wallet client is required for write operations');
|
|
2867
|
+
}
|
|
2868
|
+
return this.contract.write.accrueAccount([account], options);
|
|
2869
|
+
}
|
|
2870
|
+
/**
|
|
2871
|
+
* approveThis
|
|
2872
|
+
* nonpayable
|
|
2873
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2874
|
+
*/
|
|
2875
|
+
async approveThis(manager, asset, amount, options) {
|
|
2876
|
+
if (!this.contract.write) {
|
|
2877
|
+
throw new Error('Wallet client is required for write operations');
|
|
2878
|
+
}
|
|
2879
|
+
return this.contract.write.approveThis([manager, asset, amount], options);
|
|
2880
|
+
}
|
|
2881
|
+
/**
|
|
2882
|
+
* buyCollateral
|
|
2883
|
+
* nonpayable
|
|
2884
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2885
|
+
*/
|
|
2886
|
+
async buyCollateral(asset, minAmount, baseAmount, recipient, options) {
|
|
2887
|
+
if (!this.contract.write) {
|
|
2888
|
+
throw new Error('Wallet client is required for write operations');
|
|
2889
|
+
}
|
|
2890
|
+
return this.contract.write.buyCollateral([asset, minAmount, baseAmount, recipient], options);
|
|
2891
|
+
}
|
|
2892
|
+
/**
|
|
2893
|
+
* initializeStorage
|
|
2894
|
+
* nonpayable
|
|
2895
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2896
|
+
*/
|
|
2897
|
+
async initializeStorage(options) {
|
|
2898
|
+
if (!this.contract.write) {
|
|
2899
|
+
throw new Error('Wallet client is required for write operations');
|
|
2900
|
+
}
|
|
2901
|
+
return this.contract.write.initializeStorage(options);
|
|
2902
|
+
}
|
|
2903
|
+
/**
|
|
2904
|
+
* pause
|
|
2905
|
+
* nonpayable
|
|
2906
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2907
|
+
*/
|
|
2908
|
+
async pause(supplyPaused, transferPaused, withdrawPaused, absorbPaused, buyPaused, options) {
|
|
2909
|
+
if (!this.contract.write) {
|
|
2910
|
+
throw new Error('Wallet client is required for write operations');
|
|
2911
|
+
}
|
|
2912
|
+
return this.contract.write.pause([supplyPaused, transferPaused, withdrawPaused, absorbPaused, buyPaused], options);
|
|
2913
|
+
}
|
|
2914
|
+
/**
|
|
2915
|
+
* supply
|
|
2916
|
+
* nonpayable
|
|
2917
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2918
|
+
*/
|
|
2919
|
+
async supply(asset, amount, options) {
|
|
2920
|
+
if (!this.contract.write) {
|
|
2921
|
+
throw new Error('Wallet client is required for write operations');
|
|
2922
|
+
}
|
|
2923
|
+
return this.contract.write.supply([asset, amount], options);
|
|
2924
|
+
}
|
|
2925
|
+
/**
|
|
2926
|
+
* supplyFrom
|
|
2927
|
+
* nonpayable
|
|
2928
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2929
|
+
*/
|
|
2930
|
+
async supplyFrom(from, dst, asset, amount, options) {
|
|
2931
|
+
if (!this.contract.write) {
|
|
2932
|
+
throw new Error('Wallet client is required for write operations');
|
|
2933
|
+
}
|
|
2934
|
+
return this.contract.write.supplyFrom([from, dst, asset, amount], options);
|
|
2935
|
+
}
|
|
2936
|
+
/**
|
|
2937
|
+
* supplyTo
|
|
2938
|
+
* nonpayable
|
|
2939
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2940
|
+
*/
|
|
2941
|
+
async supplyTo(dst, asset, amount, options) {
|
|
2942
|
+
if (!this.contract.write) {
|
|
2943
|
+
throw new Error('Wallet client is required for write operations');
|
|
2944
|
+
}
|
|
2945
|
+
return this.contract.write.supplyTo([dst, asset, amount], options);
|
|
2946
|
+
}
|
|
2947
|
+
/**
|
|
2948
|
+
* transfer
|
|
2949
|
+
* nonpayable
|
|
2950
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2951
|
+
*/
|
|
2952
|
+
async transfer(dst, amount, options) {
|
|
2953
|
+
if (!this.contract.write) {
|
|
2954
|
+
throw new Error('Wallet client is required for write operations');
|
|
2955
|
+
}
|
|
2956
|
+
return this.contract.write.transfer([dst, amount], options);
|
|
2957
|
+
}
|
|
2958
|
+
/**
|
|
2959
|
+
* transferAsset
|
|
2960
|
+
* nonpayable
|
|
2961
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2962
|
+
*/
|
|
2963
|
+
async transferAsset(dst, asset, amount, options) {
|
|
2964
|
+
if (!this.contract.write) {
|
|
2965
|
+
throw new Error('Wallet client is required for write operations');
|
|
2966
|
+
}
|
|
2967
|
+
return this.contract.write.transferAsset([dst, asset, amount], options);
|
|
2968
|
+
}
|
|
2969
|
+
/**
|
|
2970
|
+
* transferAssetFrom
|
|
2971
|
+
* nonpayable
|
|
2972
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2973
|
+
*/
|
|
2974
|
+
async transferAssetFrom(src, dst, asset, amount, options) {
|
|
2975
|
+
if (!this.contract.write) {
|
|
2976
|
+
throw new Error('Wallet client is required for write operations');
|
|
2977
|
+
}
|
|
2978
|
+
return this.contract.write.transferAssetFrom([src, dst, asset, amount], options);
|
|
2979
|
+
}
|
|
2980
|
+
/**
|
|
2981
|
+
* transferFrom
|
|
2982
|
+
* nonpayable
|
|
2983
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2984
|
+
*/
|
|
2985
|
+
async transferFrom(src, dst, amount, options) {
|
|
2986
|
+
if (!this.contract.write) {
|
|
2987
|
+
throw new Error('Wallet client is required for write operations');
|
|
2988
|
+
}
|
|
2989
|
+
return this.contract.write.transferFrom([src, dst, amount], options);
|
|
2990
|
+
}
|
|
2991
|
+
/**
|
|
2992
|
+
* withdraw
|
|
2993
|
+
* nonpayable
|
|
2994
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2995
|
+
*/
|
|
2996
|
+
async withdraw(asset, amount, options) {
|
|
2997
|
+
if (!this.contract.write) {
|
|
2998
|
+
throw new Error('Wallet client is required for write operations');
|
|
2999
|
+
}
|
|
3000
|
+
return this.contract.write.withdraw([asset, amount], options);
|
|
3001
|
+
}
|
|
3002
|
+
/**
|
|
3003
|
+
* withdrawFrom
|
|
3004
|
+
* nonpayable
|
|
3005
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3006
|
+
*/
|
|
3007
|
+
async withdrawFrom(src, to, asset, amount, options) {
|
|
3008
|
+
if (!this.contract.write) {
|
|
3009
|
+
throw new Error('Wallet client is required for write operations');
|
|
3010
|
+
}
|
|
3011
|
+
return this.contract.write.withdrawFrom([src, to, asset, amount], options);
|
|
3012
|
+
}
|
|
3013
|
+
/**
|
|
3014
|
+
* withdrawReserves
|
|
3015
|
+
* nonpayable
|
|
3016
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3017
|
+
*/
|
|
3018
|
+
async withdrawReserves(to, amount, options) {
|
|
3019
|
+
if (!this.contract.write) {
|
|
3020
|
+
throw new Error('Wallet client is required for write operations');
|
|
3021
|
+
}
|
|
3022
|
+
return this.contract.write.withdrawReserves([to, amount], options);
|
|
3023
|
+
}
|
|
3024
|
+
/**
|
|
3025
|
+
* withdrawTo
|
|
3026
|
+
* nonpayable
|
|
3027
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3028
|
+
*/
|
|
3029
|
+
async withdrawTo(to, asset, amount, options) {
|
|
3030
|
+
if (!this.contract.write) {
|
|
3031
|
+
throw new Error('Wallet client is required for write operations');
|
|
3032
|
+
}
|
|
3033
|
+
return this.contract.write.withdrawTo([to, asset, amount], options);
|
|
3034
|
+
}
|
|
3035
|
+
/**
|
|
3036
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
3037
|
+
*
|
|
3038
|
+
* @example
|
|
3039
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
3040
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
3041
|
+
* console.log('Would succeed:', result.result);
|
|
3042
|
+
*/
|
|
3043
|
+
get simulate() {
|
|
3044
|
+
const contract = this.contract;
|
|
3045
|
+
if (!contract.simulate) {
|
|
3046
|
+
throw new Error('Public client is required for simulation');
|
|
3047
|
+
}
|
|
3048
|
+
return {
|
|
3049
|
+
/**
|
|
3050
|
+
* Simulate absorb
|
|
3051
|
+
* Returns gas estimate and result without sending transaction
|
|
3052
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3053
|
+
*/
|
|
3054
|
+
async absorb(absorber, accounts, options) {
|
|
3055
|
+
return contract.simulate.absorb([absorber, accounts], options);
|
|
3056
|
+
},
|
|
3057
|
+
/**
|
|
3058
|
+
* Simulate accrueAccount
|
|
3059
|
+
* Returns gas estimate and result without sending transaction
|
|
3060
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3061
|
+
*/
|
|
3062
|
+
async accrueAccount(account, options) {
|
|
3063
|
+
return contract.simulate.accrueAccount([account], options);
|
|
3064
|
+
},
|
|
3065
|
+
/**
|
|
3066
|
+
* Simulate approveThis
|
|
3067
|
+
* Returns gas estimate and result without sending transaction
|
|
3068
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3069
|
+
*/
|
|
3070
|
+
async approveThis(manager, asset, amount, options) {
|
|
3071
|
+
return contract.simulate.approveThis([manager, asset, amount], options);
|
|
3072
|
+
},
|
|
3073
|
+
/**
|
|
3074
|
+
* Simulate buyCollateral
|
|
3075
|
+
* Returns gas estimate and result without sending transaction
|
|
3076
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3077
|
+
*/
|
|
3078
|
+
async buyCollateral(asset, minAmount, baseAmount, recipient, options) {
|
|
3079
|
+
return contract.simulate.buyCollateral([asset, minAmount, baseAmount, recipient], options);
|
|
3080
|
+
},
|
|
3081
|
+
/**
|
|
3082
|
+
* Simulate initializeStorage
|
|
3083
|
+
* Returns gas estimate and result without sending transaction
|
|
3084
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3085
|
+
*/
|
|
3086
|
+
async initializeStorage(options) {
|
|
3087
|
+
return contract.simulate.initializeStorage(options);
|
|
3088
|
+
},
|
|
3089
|
+
/**
|
|
3090
|
+
* Simulate pause
|
|
3091
|
+
* Returns gas estimate and result without sending transaction
|
|
3092
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3093
|
+
*/
|
|
3094
|
+
async pause(supplyPaused, transferPaused, withdrawPaused, absorbPaused, buyPaused, options) {
|
|
3095
|
+
return contract.simulate.pause([supplyPaused, transferPaused, withdrawPaused, absorbPaused, buyPaused], options);
|
|
3096
|
+
},
|
|
3097
|
+
/**
|
|
3098
|
+
* Simulate supply
|
|
3099
|
+
* Returns gas estimate and result without sending transaction
|
|
3100
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3101
|
+
*/
|
|
3102
|
+
async supply(asset, amount, options) {
|
|
3103
|
+
return contract.simulate.supply([asset, amount], options);
|
|
3104
|
+
},
|
|
3105
|
+
/**
|
|
3106
|
+
* Simulate supplyFrom
|
|
3107
|
+
* Returns gas estimate and result without sending transaction
|
|
3108
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3109
|
+
*/
|
|
3110
|
+
async supplyFrom(from, dst, asset, amount, options) {
|
|
3111
|
+
return contract.simulate.supplyFrom([from, dst, asset, amount], options);
|
|
3112
|
+
},
|
|
3113
|
+
/**
|
|
3114
|
+
* Simulate supplyTo
|
|
3115
|
+
* Returns gas estimate and result without sending transaction
|
|
3116
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3117
|
+
*/
|
|
3118
|
+
async supplyTo(dst, asset, amount, options) {
|
|
3119
|
+
return contract.simulate.supplyTo([dst, asset, amount], options);
|
|
3120
|
+
},
|
|
3121
|
+
/**
|
|
3122
|
+
* Simulate transfer
|
|
3123
|
+
* Returns gas estimate and result without sending transaction
|
|
3124
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3125
|
+
*/
|
|
3126
|
+
async transfer(dst, amount, options) {
|
|
3127
|
+
return contract.simulate.transfer([dst, amount], options);
|
|
3128
|
+
},
|
|
3129
|
+
/**
|
|
3130
|
+
* Simulate transferAsset
|
|
3131
|
+
* Returns gas estimate and result without sending transaction
|
|
3132
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3133
|
+
*/
|
|
3134
|
+
async transferAsset(dst, asset, amount, options) {
|
|
3135
|
+
return contract.simulate.transferAsset([dst, asset, amount], options);
|
|
3136
|
+
},
|
|
3137
|
+
/**
|
|
3138
|
+
* Simulate transferAssetFrom
|
|
3139
|
+
* Returns gas estimate and result without sending transaction
|
|
3140
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3141
|
+
*/
|
|
3142
|
+
async transferAssetFrom(src, dst, asset, amount, options) {
|
|
3143
|
+
return contract.simulate.transferAssetFrom([src, dst, asset, amount], options);
|
|
3144
|
+
},
|
|
3145
|
+
/**
|
|
3146
|
+
* Simulate transferFrom
|
|
3147
|
+
* Returns gas estimate and result without sending transaction
|
|
3148
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3149
|
+
*/
|
|
3150
|
+
async transferFrom(src, dst, amount, options) {
|
|
3151
|
+
return contract.simulate.transferFrom([src, dst, amount], options);
|
|
3152
|
+
},
|
|
3153
|
+
/**
|
|
3154
|
+
* Simulate withdraw
|
|
3155
|
+
* Returns gas estimate and result without sending transaction
|
|
3156
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3157
|
+
*/
|
|
3158
|
+
async withdraw(asset, amount, options) {
|
|
3159
|
+
return contract.simulate.withdraw([asset, amount], options);
|
|
3160
|
+
},
|
|
3161
|
+
/**
|
|
3162
|
+
* Simulate withdrawFrom
|
|
3163
|
+
* Returns gas estimate and result without sending transaction
|
|
3164
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3165
|
+
*/
|
|
3166
|
+
async withdrawFrom(src, to, asset, amount, options) {
|
|
3167
|
+
return contract.simulate.withdrawFrom([src, to, asset, amount], options);
|
|
3168
|
+
},
|
|
3169
|
+
/**
|
|
3170
|
+
* Simulate withdrawReserves
|
|
3171
|
+
* Returns gas estimate and result without sending transaction
|
|
3172
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3173
|
+
*/
|
|
3174
|
+
async withdrawReserves(to, amount, options) {
|
|
3175
|
+
return contract.simulate.withdrawReserves([to, amount], options);
|
|
3176
|
+
},
|
|
3177
|
+
/**
|
|
3178
|
+
* Simulate withdrawTo
|
|
3179
|
+
* Returns gas estimate and result without sending transaction
|
|
3180
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3181
|
+
*/
|
|
3182
|
+
async withdrawTo(to, asset, amount, options) {
|
|
3183
|
+
return contract.simulate.withdrawTo([to, asset, amount], options);
|
|
3184
|
+
}
|
|
3185
|
+
};
|
|
3186
|
+
}
|
|
3187
|
+
/**
|
|
3188
|
+
* Watch contract events
|
|
3189
|
+
*
|
|
3190
|
+
* @example
|
|
3191
|
+
* // Watch all Transfer events
|
|
3192
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
3193
|
+
* console.log('Transfer:', event);
|
|
3194
|
+
* });
|
|
3195
|
+
*
|
|
3196
|
+
* // Stop watching
|
|
3197
|
+
* unwatch();
|
|
3198
|
+
*/
|
|
3199
|
+
get watch() {
|
|
3200
|
+
return {
|
|
3201
|
+
/**
|
|
3202
|
+
* Watch AbsorbCollateral events
|
|
3203
|
+
* @param callback Function to call when event is emitted
|
|
3204
|
+
* @param filter Optional filter for indexed parameters
|
|
3205
|
+
* @returns Unwatch function to stop listening
|
|
3206
|
+
*/
|
|
3207
|
+
AbsorbCollateral: (callback, filter) => {
|
|
3208
|
+
return this.publicClient.watchContractEvent({
|
|
3209
|
+
address: this.contractAddress,
|
|
3210
|
+
abi: exports.InstitutionalComet_jsonAbi,
|
|
3211
|
+
eventName: 'AbsorbCollateral',
|
|
3212
|
+
args: filter,
|
|
3213
|
+
onLogs: (logs) => {
|
|
3214
|
+
logs.forEach((log) => {
|
|
3215
|
+
callback(log.args);
|
|
3216
|
+
});
|
|
3217
|
+
},
|
|
3218
|
+
});
|
|
3219
|
+
},
|
|
3220
|
+
/**
|
|
3221
|
+
* Watch AbsorbDebt events
|
|
3222
|
+
* @param callback Function to call when event is emitted
|
|
3223
|
+
* @param filter Optional filter for indexed parameters
|
|
3224
|
+
* @returns Unwatch function to stop listening
|
|
3225
|
+
*/
|
|
3226
|
+
AbsorbDebt: (callback, filter) => {
|
|
3227
|
+
return this.publicClient.watchContractEvent({
|
|
3228
|
+
address: this.contractAddress,
|
|
3229
|
+
abi: exports.InstitutionalComet_jsonAbi,
|
|
3230
|
+
eventName: 'AbsorbDebt',
|
|
3231
|
+
args: filter,
|
|
3232
|
+
onLogs: (logs) => {
|
|
3233
|
+
logs.forEach((log) => {
|
|
3234
|
+
callback(log.args);
|
|
3235
|
+
});
|
|
3236
|
+
},
|
|
3237
|
+
});
|
|
3238
|
+
},
|
|
3239
|
+
/**
|
|
3240
|
+
* Watch BuyCollateral events
|
|
3241
|
+
* @param callback Function to call when event is emitted
|
|
3242
|
+
* @param filter Optional filter for indexed parameters
|
|
3243
|
+
* @returns Unwatch function to stop listening
|
|
3244
|
+
*/
|
|
3245
|
+
BuyCollateral: (callback, filter) => {
|
|
3246
|
+
return this.publicClient.watchContractEvent({
|
|
3247
|
+
address: this.contractAddress,
|
|
3248
|
+
abi: exports.InstitutionalComet_jsonAbi,
|
|
3249
|
+
eventName: 'BuyCollateral',
|
|
3250
|
+
args: filter,
|
|
3251
|
+
onLogs: (logs) => {
|
|
3252
|
+
logs.forEach((log) => {
|
|
3253
|
+
callback(log.args);
|
|
3254
|
+
});
|
|
3255
|
+
},
|
|
3256
|
+
});
|
|
3257
|
+
},
|
|
3258
|
+
/**
|
|
3259
|
+
* Watch PauseAction events
|
|
3260
|
+
* @param callback Function to call when event is emitted
|
|
3261
|
+
* @param filter Optional filter for indexed parameters
|
|
3262
|
+
* @returns Unwatch function to stop listening
|
|
3263
|
+
*/
|
|
3264
|
+
PauseAction: (callback) => {
|
|
3265
|
+
return this.publicClient.watchContractEvent({
|
|
3266
|
+
address: this.contractAddress,
|
|
3267
|
+
abi: exports.InstitutionalComet_jsonAbi,
|
|
3268
|
+
eventName: 'PauseAction',
|
|
3269
|
+
onLogs: (logs) => {
|
|
3270
|
+
logs.forEach((log) => {
|
|
3271
|
+
callback(log.args);
|
|
3272
|
+
});
|
|
3273
|
+
},
|
|
3274
|
+
});
|
|
3275
|
+
},
|
|
3276
|
+
/**
|
|
3277
|
+
* Watch Supply events
|
|
3278
|
+
* @param callback Function to call when event is emitted
|
|
3279
|
+
* @param filter Optional filter for indexed parameters
|
|
3280
|
+
* @returns Unwatch function to stop listening
|
|
3281
|
+
*/
|
|
3282
|
+
Supply: (callback, filter) => {
|
|
3283
|
+
return this.publicClient.watchContractEvent({
|
|
3284
|
+
address: this.contractAddress,
|
|
3285
|
+
abi: exports.InstitutionalComet_jsonAbi,
|
|
3286
|
+
eventName: 'Supply',
|
|
3287
|
+
args: filter,
|
|
3288
|
+
onLogs: (logs) => {
|
|
3289
|
+
logs.forEach((log) => {
|
|
3290
|
+
callback(log.args);
|
|
3291
|
+
});
|
|
3292
|
+
},
|
|
3293
|
+
});
|
|
3294
|
+
},
|
|
3295
|
+
/**
|
|
3296
|
+
* Watch SupplyCollateral events
|
|
3297
|
+
* @param callback Function to call when event is emitted
|
|
3298
|
+
* @param filter Optional filter for indexed parameters
|
|
3299
|
+
* @returns Unwatch function to stop listening
|
|
3300
|
+
*/
|
|
3301
|
+
SupplyCollateral: (callback, filter) => {
|
|
3302
|
+
return this.publicClient.watchContractEvent({
|
|
3303
|
+
address: this.contractAddress,
|
|
3304
|
+
abi: exports.InstitutionalComet_jsonAbi,
|
|
3305
|
+
eventName: 'SupplyCollateral',
|
|
3306
|
+
args: filter,
|
|
3307
|
+
onLogs: (logs) => {
|
|
3308
|
+
logs.forEach((log) => {
|
|
3309
|
+
callback(log.args);
|
|
3310
|
+
});
|
|
3311
|
+
},
|
|
3312
|
+
});
|
|
3313
|
+
},
|
|
3314
|
+
/**
|
|
3315
|
+
* Watch Transfer events
|
|
3316
|
+
* @param callback Function to call when event is emitted
|
|
3317
|
+
* @param filter Optional filter for indexed parameters
|
|
3318
|
+
* @returns Unwatch function to stop listening
|
|
3319
|
+
*/
|
|
3320
|
+
Transfer: (callback, filter) => {
|
|
3321
|
+
return this.publicClient.watchContractEvent({
|
|
3322
|
+
address: this.contractAddress,
|
|
3323
|
+
abi: exports.InstitutionalComet_jsonAbi,
|
|
3324
|
+
eventName: 'Transfer',
|
|
3325
|
+
args: filter,
|
|
3326
|
+
onLogs: (logs) => {
|
|
3327
|
+
logs.forEach((log) => {
|
|
3328
|
+
callback(log.args);
|
|
3329
|
+
});
|
|
3330
|
+
},
|
|
3331
|
+
});
|
|
3332
|
+
},
|
|
3333
|
+
/**
|
|
3334
|
+
* Watch TransferCollateral events
|
|
3335
|
+
* @param callback Function to call when event is emitted
|
|
3336
|
+
* @param filter Optional filter for indexed parameters
|
|
3337
|
+
* @returns Unwatch function to stop listening
|
|
3338
|
+
*/
|
|
3339
|
+
TransferCollateral: (callback, filter) => {
|
|
3340
|
+
return this.publicClient.watchContractEvent({
|
|
3341
|
+
address: this.contractAddress,
|
|
3342
|
+
abi: exports.InstitutionalComet_jsonAbi,
|
|
3343
|
+
eventName: 'TransferCollateral',
|
|
3344
|
+
args: filter,
|
|
3345
|
+
onLogs: (logs) => {
|
|
3346
|
+
logs.forEach((log) => {
|
|
3347
|
+
callback(log.args);
|
|
3348
|
+
});
|
|
3349
|
+
},
|
|
3350
|
+
});
|
|
3351
|
+
},
|
|
3352
|
+
/**
|
|
3353
|
+
* Watch Withdraw events
|
|
3354
|
+
* @param callback Function to call when event is emitted
|
|
3355
|
+
* @param filter Optional filter for indexed parameters
|
|
3356
|
+
* @returns Unwatch function to stop listening
|
|
3357
|
+
*/
|
|
3358
|
+
Withdraw: (callback, filter) => {
|
|
3359
|
+
return this.publicClient.watchContractEvent({
|
|
3360
|
+
address: this.contractAddress,
|
|
3361
|
+
abi: exports.InstitutionalComet_jsonAbi,
|
|
3362
|
+
eventName: 'Withdraw',
|
|
3363
|
+
args: filter,
|
|
3364
|
+
onLogs: (logs) => {
|
|
3365
|
+
logs.forEach((log) => {
|
|
3366
|
+
callback(log.args);
|
|
3367
|
+
});
|
|
3368
|
+
},
|
|
3369
|
+
});
|
|
3370
|
+
},
|
|
3371
|
+
/**
|
|
3372
|
+
* Watch WithdrawCollateral events
|
|
3373
|
+
* @param callback Function to call when event is emitted
|
|
3374
|
+
* @param filter Optional filter for indexed parameters
|
|
3375
|
+
* @returns Unwatch function to stop listening
|
|
3376
|
+
*/
|
|
3377
|
+
WithdrawCollateral: (callback, filter) => {
|
|
3378
|
+
return this.publicClient.watchContractEvent({
|
|
3379
|
+
address: this.contractAddress,
|
|
3380
|
+
abi: exports.InstitutionalComet_jsonAbi,
|
|
3381
|
+
eventName: 'WithdrawCollateral',
|
|
3382
|
+
args: filter,
|
|
3383
|
+
onLogs: (logs) => {
|
|
3384
|
+
logs.forEach((log) => {
|
|
3385
|
+
callback(log.args);
|
|
3386
|
+
});
|
|
3387
|
+
},
|
|
3388
|
+
});
|
|
3389
|
+
},
|
|
3390
|
+
/**
|
|
3391
|
+
* Watch WithdrawReserves events
|
|
3392
|
+
* @param callback Function to call when event is emitted
|
|
3393
|
+
* @param filter Optional filter for indexed parameters
|
|
3394
|
+
* @returns Unwatch function to stop listening
|
|
3395
|
+
*/
|
|
3396
|
+
WithdrawReserves: (callback, filter) => {
|
|
3397
|
+
return this.publicClient.watchContractEvent({
|
|
3398
|
+
address: this.contractAddress,
|
|
3399
|
+
abi: exports.InstitutionalComet_jsonAbi,
|
|
3400
|
+
eventName: 'WithdrawReserves',
|
|
3401
|
+
args: filter,
|
|
3402
|
+
onLogs: (logs) => {
|
|
3403
|
+
logs.forEach((log) => {
|
|
3404
|
+
callback(log.args);
|
|
3405
|
+
});
|
|
3406
|
+
},
|
|
3407
|
+
});
|
|
3408
|
+
}
|
|
3409
|
+
};
|
|
3410
|
+
}
|
|
3411
|
+
}
|
|
3412
|
+
exports.InstitutionalComet_json = InstitutionalComet_json;
|