@gearbox-protocol/sdk 3.1.3-next.2 → 3.2.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.
Files changed (67) hide show
  1. package/dist/cjs/abi/compressors.js +527 -1133
  2. package/dist/cjs/adapters/abi/adapters.js +0 -123
  3. package/dist/cjs/adapters/abi/iBalancerV3RouterAdapter.js +153 -0
  4. package/dist/cjs/adapters/abi/index.js +3 -1
  5. package/dist/cjs/dev/setLTZero.js +0 -7
  6. package/dist/cjs/sdk/GearboxSDK.js +6 -1
  7. package/dist/cjs/sdk/accounts/CreditAccountsService.js +30 -45
  8. package/dist/cjs/sdk/chain/chains.js +14 -2
  9. package/dist/cjs/sdk/constants/address-provider.js +19 -12
  10. package/dist/cjs/sdk/constants/addresses.js +8 -4
  11. package/dist/cjs/sdk/constants/networks.js +11 -4
  12. package/dist/cjs/sdk/market/MarketSuite.js +1 -1
  13. package/dist/cjs/sdk/market/credit/CreditFacadeV300Contract.js +5 -1
  14. package/dist/cjs/sdk/market/credit/CreditFacadeV310Contract.js +5 -1
  15. package/dist/cjs/sdk/market/oracle/PriceOracleBaseContract.js +5 -6
  16. package/dist/cjs/sdk/market/pool/PoolSuite.js +1 -1
  17. package/dist/cjs/sdk/market/pricefeeds/PriceFeedsRegister.js +4 -4
  18. package/dist/cjs/sdk/router/RouterV300Contract.js +2 -1
  19. package/dist/cjs/sdk/sdk-gov-legacy/contracts/contracts.js +74 -37
  20. package/dist/cjs/sdk/sdk-gov-legacy/tokens/quoted.js +2 -1
  21. package/dist/cjs/sdk/sdk-gov-legacy/tokens/token.js +4 -2
  22. package/dist/cjs/sdk/sdk-gov-legacy/tokens/tokenData.js +2 -1
  23. package/dist/cjs/sdk/sdk-legacy/core/creditAccount.js +1 -3
  24. package/dist/cjs/sdk/sdk-legacy/core/endpoint.js +2 -1
  25. package/dist/esm/abi/compressors.js +522 -1133
  26. package/dist/esm/adapters/abi/adapters.js +0 -120
  27. package/dist/esm/adapters/abi/iBalancerV3RouterAdapter.js +129 -0
  28. package/dist/esm/adapters/abi/index.js +1 -0
  29. package/dist/esm/dev/setLTZero.js +0 -7
  30. package/dist/esm/sdk/GearboxSDK.js +6 -1
  31. package/dist/esm/sdk/accounts/CreditAccountsService.js +30 -45
  32. package/dist/esm/sdk/chain/chains.js +16 -3
  33. package/dist/esm/sdk/constants/address-provider.js +17 -12
  34. package/dist/esm/sdk/constants/addresses.js +8 -4
  35. package/dist/esm/sdk/constants/networks.js +11 -4
  36. package/dist/esm/sdk/market/MarketSuite.js +1 -1
  37. package/dist/esm/sdk/market/credit/CreditFacadeV300Contract.js +5 -1
  38. package/dist/esm/sdk/market/credit/CreditFacadeV310Contract.js +5 -1
  39. package/dist/esm/sdk/market/oracle/PriceOracleBaseContract.js +5 -6
  40. package/dist/esm/sdk/market/pool/PoolSuite.js +1 -1
  41. package/dist/esm/sdk/market/pricefeeds/PriceFeedsRegister.js +6 -9
  42. package/dist/esm/sdk/router/RouterV300Contract.js +2 -1
  43. package/dist/esm/sdk/sdk-gov-legacy/contracts/contracts.js +74 -37
  44. package/dist/esm/sdk/sdk-gov-legacy/tokens/quoted.js +2 -1
  45. package/dist/esm/sdk/sdk-gov-legacy/tokens/token.js +4 -2
  46. package/dist/esm/sdk/sdk-gov-legacy/tokens/tokenData.js +2 -1
  47. package/dist/esm/sdk/sdk-legacy/core/creditAccount.js +1 -3
  48. package/dist/esm/sdk/sdk-legacy/core/endpoint.js +2 -1
  49. package/dist/types/abi/compressors.d.ts +1106 -1734
  50. package/dist/types/adapters/BalancerV3RouterAdapterContract.d.ts +104 -62
  51. package/dist/types/adapters/abi/adapters.d.ts +0 -213
  52. package/dist/types/adapters/abi/iBalancerV3RouterAdapter.d.ts +230 -0
  53. package/dist/types/adapters/abi/index.d.ts +1 -0
  54. package/dist/types/sdk/accounts/CreditAccountsService.d.ts +3 -3
  55. package/dist/types/sdk/accounts/types.d.ts +2 -15
  56. package/dist/types/sdk/base/types.d.ts +6 -6
  57. package/dist/types/sdk/chain/chains.d.ts +2 -2
  58. package/dist/types/sdk/constants/address-provider.d.ts +13 -11
  59. package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +85 -425
  60. package/dist/types/sdk/market/pool/PoolQuotaKeeperV300Contract.d.ts +2 -2
  61. package/dist/types/sdk/market/pool/PoolQuotaKeeperV310Contract.d.ts +2 -2
  62. package/dist/types/sdk/market/pool/createPoolQuotaKeeper.d.ts +2 -2
  63. package/dist/types/sdk/types/state-human.d.ts +3 -1
  64. package/package.json +1 -1
  65. package/dist/cjs/sdk/accounts/utils.js +0 -38
  66. package/dist/esm/sdk/accounts/utils.js +0 -14
  67. package/dist/types/sdk/accounts/utils.d.ts +0 -2
@@ -1,7 +1,6 @@
1
- import type { Abi, Address, ContractFunctionReturnType } from "viem";
2
- import { iPriceFeedCompressorAbi } from "../../../abi/compressors.js";
1
+ import type { Abi, Address } from "viem";
3
2
  import type { BaseContractOptions } from "../../base/BaseContract.js";
4
- import type { PriceFeedTreeNode, PriceOracleData } from "../../base/index.js";
3
+ import type { PriceFeedMapEntry, PriceFeedTreeNode, PriceOracleData } from "../../base/index.js";
5
4
  import { BaseContract } from "../../base/index.js";
6
5
  import type { GearboxSDK } from "../../GearboxSDK.js";
7
6
  import type { PriceOracleStateHuman } from "../../types/index.js";
@@ -126,140 +125,37 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
126
125
  readonly name: "priceOracle";
127
126
  readonly internalType: "address";
128
127
  readonly type: "address";
128
+ }, {
129
+ readonly name: "tokens";
130
+ readonly internalType: "address[]";
131
+ readonly type: "address[]";
129
132
  }];
130
- readonly name: "getPriceOracleState";
133
+ readonly name: "getPriceFeeds";
131
134
  readonly outputs: readonly [{
132
- readonly name: "";
133
- readonly internalType: "struct PriceOracleState";
134
- readonly type: "tuple";
135
+ readonly name: "priceFeedMap";
136
+ readonly internalType: "struct PriceFeedMapEntry[]";
137
+ readonly type: "tuple[]";
135
138
  readonly components: readonly [{
136
- readonly name: "baseParams";
137
- readonly internalType: "struct BaseParams";
138
- readonly type: "tuple";
139
- readonly components: readonly [{
140
- readonly name: "addr";
141
- readonly internalType: "address";
142
- readonly type: "address";
143
- }, {
144
- readonly name: "version";
145
- readonly internalType: "uint256";
146
- readonly type: "uint256";
147
- }, {
148
- readonly name: "contractType";
149
- readonly internalType: "bytes32";
150
- readonly type: "bytes32";
151
- }, {
152
- readonly name: "serializedParams";
153
- readonly internalType: "bytes";
154
- readonly type: "bytes";
155
- }];
139
+ readonly name: "token";
140
+ readonly internalType: "address";
141
+ readonly type: "address";
156
142
  }, {
157
- readonly name: "priceFeedMap";
158
- readonly internalType: "struct PriceFeedMapEntry[]";
159
- readonly type: "tuple[]";
160
- readonly components: readonly [{
161
- readonly name: "token";
162
- readonly internalType: "address";
163
- readonly type: "address";
164
- }, {
165
- readonly name: "reserve";
166
- readonly internalType: "bool";
167
- readonly type: "bool";
168
- }, {
169
- readonly name: "priceFeed";
170
- readonly internalType: "address";
171
- readonly type: "address";
172
- }, {
173
- readonly name: "stalenessPeriod";
174
- readonly internalType: "uint32";
175
- readonly type: "uint32";
176
- }];
143
+ readonly name: "reserve";
144
+ readonly internalType: "bool";
145
+ readonly type: "bool";
177
146
  }, {
178
- readonly name: "priceFeedTree";
179
- readonly internalType: "struct PriceFeedTreeNode[]";
180
- readonly type: "tuple[]";
181
- readonly components: readonly [{
182
- readonly name: "baseParams";
183
- readonly internalType: "struct BaseParams";
184
- readonly type: "tuple";
185
- readonly components: readonly [{
186
- readonly name: "addr";
187
- readonly internalType: "address";
188
- readonly type: "address";
189
- }, {
190
- readonly name: "version";
191
- readonly internalType: "uint256";
192
- readonly type: "uint256";
193
- }, {
194
- readonly name: "contractType";
195
- readonly internalType: "bytes32";
196
- readonly type: "bytes32";
197
- }, {
198
- readonly name: "serializedParams";
199
- readonly internalType: "bytes";
200
- readonly type: "bytes";
201
- }];
202
- }, {
203
- readonly name: "description";
204
- readonly internalType: "string";
205
- readonly type: "string";
206
- }, {
207
- readonly name: "decimals";
208
- readonly internalType: "uint8";
209
- readonly type: "uint8";
210
- }, {
211
- readonly name: "skipCheck";
212
- readonly internalType: "bool";
213
- readonly type: "bool";
214
- }, {
215
- readonly name: "updatable";
216
- readonly internalType: "bool";
217
- readonly type: "bool";
218
- }, {
219
- readonly name: "underlyingFeeds";
220
- readonly internalType: "address[]";
221
- readonly type: "address[]";
222
- }, {
223
- readonly name: "underlyingStalenessPeriods";
224
- readonly internalType: "uint32[]";
225
- readonly type: "uint32[]";
226
- }, {
227
- readonly name: "answer";
228
- readonly internalType: "struct PriceFeedAnswer";
229
- readonly type: "tuple";
230
- readonly components: readonly [{
231
- readonly name: "price";
232
- readonly internalType: "int256";
233
- readonly type: "int256";
234
- }, {
235
- readonly name: "updatedAt";
236
- readonly internalType: "uint256";
237
- readonly type: "uint256";
238
- }, {
239
- readonly name: "success";
240
- readonly internalType: "bool";
241
- readonly type: "bool";
242
- }];
243
- }];
147
+ readonly name: "priceFeed";
148
+ readonly internalType: "address";
149
+ readonly type: "address";
150
+ }, {
151
+ readonly name: "stalenessPeriod";
152
+ readonly internalType: "uint32";
153
+ readonly type: "uint32";
244
154
  }];
245
- }];
246
- readonly stateMutability: "view";
247
- }, {
248
- readonly type: "function";
249
- readonly inputs: readonly [{
250
- readonly name: "priceOracle";
251
- readonly internalType: "address";
252
- readonly type: "address";
253
155
  }, {
254
- readonly name: "tokens";
255
- readonly internalType: "address[]";
256
- readonly type: "address[]";
257
- }];
258
- readonly name: "getPriceOracleState";
259
- readonly outputs: readonly [{
260
- readonly name: "";
261
- readonly internalType: "struct PriceOracleState";
262
- readonly type: "tuple";
156
+ readonly name: "priceFeedTree";
157
+ readonly internalType: "struct PriceFeedTreeNode[]";
158
+ readonly type: "tuple[]";
263
159
  readonly components: readonly [{
264
160
  readonly name: "baseParams";
265
161
  readonly internalType: "struct BaseParams";
@@ -282,229 +178,45 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
282
178
  readonly type: "bytes";
283
179
  }];
284
180
  }, {
285
- readonly name: "priceFeedMap";
286
- readonly internalType: "struct PriceFeedMapEntry[]";
287
- readonly type: "tuple[]";
288
- readonly components: readonly [{
289
- readonly name: "token";
290
- readonly internalType: "address";
291
- readonly type: "address";
292
- }, {
293
- readonly name: "reserve";
294
- readonly internalType: "bool";
295
- readonly type: "bool";
296
- }, {
297
- readonly name: "priceFeed";
298
- readonly internalType: "address";
299
- readonly type: "address";
300
- }, {
301
- readonly name: "stalenessPeriod";
302
- readonly internalType: "uint32";
303
- readonly type: "uint32";
304
- }];
181
+ readonly name: "description";
182
+ readonly internalType: "string";
183
+ readonly type: "string";
305
184
  }, {
306
- readonly name: "priceFeedTree";
307
- readonly internalType: "struct PriceFeedTreeNode[]";
308
- readonly type: "tuple[]";
309
- readonly components: readonly [{
310
- readonly name: "baseParams";
311
- readonly internalType: "struct BaseParams";
312
- readonly type: "tuple";
313
- readonly components: readonly [{
314
- readonly name: "addr";
315
- readonly internalType: "address";
316
- readonly type: "address";
317
- }, {
318
- readonly name: "version";
319
- readonly internalType: "uint256";
320
- readonly type: "uint256";
321
- }, {
322
- readonly name: "contractType";
323
- readonly internalType: "bytes32";
324
- readonly type: "bytes32";
325
- }, {
326
- readonly name: "serializedParams";
327
- readonly internalType: "bytes";
328
- readonly type: "bytes";
329
- }];
330
- }, {
331
- readonly name: "description";
332
- readonly internalType: "string";
333
- readonly type: "string";
334
- }, {
335
- readonly name: "decimals";
336
- readonly internalType: "uint8";
337
- readonly type: "uint8";
338
- }, {
339
- readonly name: "skipCheck";
340
- readonly internalType: "bool";
341
- readonly type: "bool";
342
- }, {
343
- readonly name: "updatable";
344
- readonly internalType: "bool";
345
- readonly type: "bool";
346
- }, {
347
- readonly name: "underlyingFeeds";
348
- readonly internalType: "address[]";
349
- readonly type: "address[]";
350
- }, {
351
- readonly name: "underlyingStalenessPeriods";
352
- readonly internalType: "uint32[]";
353
- readonly type: "uint32[]";
354
- }, {
355
- readonly name: "answer";
356
- readonly internalType: "struct PriceFeedAnswer";
357
- readonly type: "tuple";
358
- readonly components: readonly [{
359
- readonly name: "price";
360
- readonly internalType: "int256";
361
- readonly type: "int256";
362
- }, {
363
- readonly name: "updatedAt";
364
- readonly internalType: "uint256";
365
- readonly type: "uint256";
366
- }, {
367
- readonly name: "success";
368
- readonly internalType: "bool";
369
- readonly type: "bool";
370
- }];
371
- }];
372
- }];
373
- }];
374
- readonly stateMutability: "view";
375
- }, {
376
- readonly type: "function";
377
- readonly inputs: readonly [{
378
- readonly name: "filter";
379
- readonly internalType: "struct MarketFilter";
380
- readonly type: "tuple";
381
- readonly components: readonly [{
382
- readonly name: "configurators";
383
- readonly internalType: "address[]";
384
- readonly type: "address[]";
185
+ readonly name: "decimals";
186
+ readonly internalType: "uint8";
187
+ readonly type: "uint8";
188
+ }, {
189
+ readonly name: "skipCheck";
190
+ readonly internalType: "bool";
191
+ readonly type: "bool";
192
+ }, {
193
+ readonly name: "updatable";
194
+ readonly internalType: "bool";
195
+ readonly type: "bool";
385
196
  }, {
386
- readonly name: "pools";
197
+ readonly name: "underlyingFeeds";
387
198
  readonly internalType: "address[]";
388
199
  readonly type: "address[]";
389
200
  }, {
390
- readonly name: "underlying";
391
- readonly internalType: "address";
392
- readonly type: "address";
393
- }];
394
- }];
395
- readonly name: "getPriceOracles";
396
- readonly outputs: readonly [{
397
- readonly name: "";
398
- readonly internalType: "struct PriceOracleState[]";
399
- readonly type: "tuple[]";
400
- readonly components: readonly [{
401
- readonly name: "baseParams";
402
- readonly internalType: "struct BaseParams";
201
+ readonly name: "underlyingStalenessPeriods";
202
+ readonly internalType: "uint32[]";
203
+ readonly type: "uint32[]";
204
+ }, {
205
+ readonly name: "answer";
206
+ readonly internalType: "struct PriceFeedAnswer";
403
207
  readonly type: "tuple";
404
208
  readonly components: readonly [{
405
- readonly name: "addr";
406
- readonly internalType: "address";
407
- readonly type: "address";
209
+ readonly name: "price";
210
+ readonly internalType: "int256";
211
+ readonly type: "int256";
408
212
  }, {
409
- readonly name: "version";
213
+ readonly name: "updatedAt";
410
214
  readonly internalType: "uint256";
411
215
  readonly type: "uint256";
412
216
  }, {
413
- readonly name: "contractType";
414
- readonly internalType: "bytes32";
415
- readonly type: "bytes32";
416
- }, {
417
- readonly name: "serializedParams";
418
- readonly internalType: "bytes";
419
- readonly type: "bytes";
420
- }];
421
- }, {
422
- readonly name: "priceFeedMap";
423
- readonly internalType: "struct PriceFeedMapEntry[]";
424
- readonly type: "tuple[]";
425
- readonly components: readonly [{
426
- readonly name: "token";
427
- readonly internalType: "address";
428
- readonly type: "address";
429
- }, {
430
- readonly name: "reserve";
431
- readonly internalType: "bool";
432
- readonly type: "bool";
433
- }, {
434
- readonly name: "priceFeed";
435
- readonly internalType: "address";
436
- readonly type: "address";
437
- }, {
438
- readonly name: "stalenessPeriod";
439
- readonly internalType: "uint32";
440
- readonly type: "uint32";
441
- }];
442
- }, {
443
- readonly name: "priceFeedTree";
444
- readonly internalType: "struct PriceFeedTreeNode[]";
445
- readonly type: "tuple[]";
446
- readonly components: readonly [{
447
- readonly name: "baseParams";
448
- readonly internalType: "struct BaseParams";
449
- readonly type: "tuple";
450
- readonly components: readonly [{
451
- readonly name: "addr";
452
- readonly internalType: "address";
453
- readonly type: "address";
454
- }, {
455
- readonly name: "version";
456
- readonly internalType: "uint256";
457
- readonly type: "uint256";
458
- }, {
459
- readonly name: "contractType";
460
- readonly internalType: "bytes32";
461
- readonly type: "bytes32";
462
- }, {
463
- readonly name: "serializedParams";
464
- readonly internalType: "bytes";
465
- readonly type: "bytes";
466
- }];
467
- }, {
468
- readonly name: "description";
469
- readonly internalType: "string";
470
- readonly type: "string";
471
- }, {
472
- readonly name: "decimals";
473
- readonly internalType: "uint8";
474
- readonly type: "uint8";
475
- }, {
476
- readonly name: "skipCheck";
477
- readonly internalType: "bool";
478
- readonly type: "bool";
479
- }, {
480
- readonly name: "updatable";
217
+ readonly name: "success";
481
218
  readonly internalType: "bool";
482
219
  readonly type: "bool";
483
- }, {
484
- readonly name: "underlyingFeeds";
485
- readonly internalType: "address[]";
486
- readonly type: "address[]";
487
- }, {
488
- readonly name: "underlyingStalenessPeriods";
489
- readonly internalType: "uint32[]";
490
- readonly type: "uint32[]";
491
- }, {
492
- readonly name: "answer";
493
- readonly internalType: "struct PriceFeedAnswer";
494
- readonly type: "tuple";
495
- readonly components: readonly [{
496
- readonly name: "price";
497
- readonly internalType: "int256";
498
- readonly type: "int256";
499
- }, {
500
- readonly name: "updatedAt";
501
- readonly internalType: "uint256";
502
- readonly type: "uint256";
503
- }, {
504
- readonly name: "success";
505
- readonly internalType: "bool";
506
- readonly type: "bool";
507
- }];
508
220
  }];
509
221
  }];
510
222
  }];
@@ -512,101 +224,34 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
512
224
  }, {
513
225
  readonly type: "function";
514
226
  readonly inputs: readonly [{
515
- readonly name: "priceFeeds";
516
- readonly internalType: "address[]";
517
- readonly type: "address[]";
227
+ readonly name: "priceOracle";
228
+ readonly internalType: "address";
229
+ readonly type: "address";
518
230
  }];
519
- readonly name: "getUpdatablePriceFeeds";
231
+ readonly name: "getPriceFeeds";
520
232
  readonly outputs: readonly [{
521
- readonly name: "";
522
- readonly internalType: "struct BaseParams[]";
233
+ readonly name: "priceFeedMap";
234
+ readonly internalType: "struct PriceFeedMapEntry[]";
523
235
  readonly type: "tuple[]";
524
236
  readonly components: readonly [{
525
- readonly name: "addr";
237
+ readonly name: "token";
526
238
  readonly internalType: "address";
527
239
  readonly type: "address";
528
240
  }, {
529
- readonly name: "version";
530
- readonly internalType: "uint256";
531
- readonly type: "uint256";
532
- }, {
533
- readonly name: "contractType";
534
- readonly internalType: "bytes32";
535
- readonly type: "bytes32";
536
- }, {
537
- readonly name: "serializedParams";
538
- readonly internalType: "bytes";
539
- readonly type: "bytes";
540
- }];
541
- }];
542
- readonly stateMutability: "view";
543
- }, {
544
- readonly type: "function";
545
- readonly inputs: readonly [{
546
- readonly name: "filter";
547
- readonly internalType: "struct MarketFilter";
548
- readonly type: "tuple";
549
- readonly components: readonly [{
550
- readonly name: "configurators";
551
- readonly internalType: "address[]";
552
- readonly type: "address[]";
553
- }, {
554
- readonly name: "pools";
555
- readonly internalType: "address[]";
556
- readonly type: "address[]";
241
+ readonly name: "reserve";
242
+ readonly internalType: "bool";
243
+ readonly type: "bool";
557
244
  }, {
558
- readonly name: "underlying";
245
+ readonly name: "priceFeed";
559
246
  readonly internalType: "address";
560
247
  readonly type: "address";
561
- }];
562
- }];
563
- readonly name: "getUpdatablePriceFeeds";
564
- readonly outputs: readonly [{
565
- readonly name: "";
566
- readonly internalType: "struct BaseParams[]";
567
- readonly type: "tuple[]";
568
- readonly components: readonly [{
569
- readonly name: "addr";
570
- readonly internalType: "address";
571
- readonly type: "address";
572
- }, {
573
- readonly name: "version";
574
- readonly internalType: "uint256";
575
- readonly type: "uint256";
576
- }, {
577
- readonly name: "contractType";
578
- readonly internalType: "bytes32";
579
- readonly type: "bytes32";
580
248
  }, {
581
- readonly name: "serializedParams";
582
- readonly internalType: "bytes";
583
- readonly type: "bytes";
249
+ readonly name: "stalenessPeriod";
250
+ readonly internalType: "uint32";
251
+ readonly type: "uint32";
584
252
  }];
585
- }];
586
- readonly stateMutability: "view";
587
- }, {
588
- readonly type: "function";
589
- readonly inputs: readonly [{
590
- readonly name: "filter";
591
- readonly internalType: "struct MarketFilter";
592
- readonly type: "tuple";
593
- readonly components: readonly [{
594
- readonly name: "configurators";
595
- readonly internalType: "address[]";
596
- readonly type: "address[]";
597
- }, {
598
- readonly name: "pools";
599
- readonly internalType: "address[]";
600
- readonly type: "address[]";
601
- }, {
602
- readonly name: "underlying";
603
- readonly internalType: "address";
604
- readonly type: "address";
605
- }];
606
- }];
607
- readonly name: "loadPriceFeedTree";
608
- readonly outputs: readonly [{
609
- readonly name: "";
253
+ }, {
254
+ readonly name: "priceFeedTree";
610
255
  readonly internalType: "struct PriceFeedTreeNode[]";
611
256
  readonly type: "tuple[]";
612
257
  readonly components: readonly [{
@@ -683,7 +328,7 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
683
328
  }];
684
329
  readonly name: "loadPriceFeedTree";
685
330
  readonly outputs: readonly [{
686
- readonly name: "";
331
+ readonly name: "priceFeedTree";
687
332
  readonly internalType: "struct PriceFeedTreeNode[]";
688
333
  readonly type: "tuple[]";
689
334
  readonly components: readonly [{
@@ -761,12 +406,27 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
761
406
  readonly type: "uint256";
762
407
  }];
763
408
  readonly stateMutability: "view";
409
+ }, {
410
+ readonly type: "event";
411
+ readonly anonymous: false;
412
+ readonly inputs: readonly [{
413
+ readonly name: "contractType";
414
+ readonly internalType: "bytes32";
415
+ readonly type: "bytes32";
416
+ readonly indexed: true;
417
+ }, {
418
+ readonly name: "serializer";
419
+ readonly internalType: "address";
420
+ readonly type: "address";
421
+ readonly indexed: true;
422
+ }];
423
+ readonly name: "SetSerializer";
764
424
  }];
765
425
  address: `0x${string}`;
766
426
  functionName: string;
767
427
  args: any[];
768
428
  };
769
- onResult: (resp: ContractFunctionReturnType<typeof iPriceFeedCompressorAbi, "view", "getPriceOracleState">) => void;
429
+ onResult: ([entries, tree]: [PriceFeedMapEntry[], PriceFeedTreeNode[]]) => void;
770
430
  };
771
431
  /**
772
432
  * Helper method to find "attachment point" of price feed (makes sense for updatable price feeds only) -
@@ -1,5 +1,5 @@
1
1
  import type { ContractEventName, Log } from "viem";
2
- import type { IBaseContract, PoolState, QuotaKeeperState, QuotaState } from "../../base/index.js";
2
+ import type { IBaseContract, PoolQuotaKeeperState, PoolState, QuotaState } from "../../base/index.js";
3
3
  import { BaseContract } from "../../base/index.js";
4
4
  import type { GearboxSDK } from "../../GearboxSDK.js";
5
5
  import type { PoolQuotaKeeperStateHuman } from "../../types/index.js";
@@ -442,7 +442,7 @@ type abi = typeof abi;
442
442
  export declare class PoolQuotaKeeperV300Contract extends BaseContract<abi> implements IBaseContract {
443
443
  readonly decimals: number;
444
444
  readonly quotas: AddressMap<QuotaState>;
445
- constructor(sdk: GearboxSDK, pool: PoolState, pqk: QuotaKeeperState);
445
+ constructor(sdk: GearboxSDK, pool: PoolState, pqk: PoolQuotaKeeperState);
446
446
  stateHuman(raw?: boolean): PoolQuotaKeeperStateHuman;
447
447
  processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
448
448
  }
@@ -1,5 +1,5 @@
1
1
  import type { ContractEventName, Log } from "viem";
2
- import type { IBaseContract, PoolState, QuotaKeeperState, QuotaState } from "../../base/index.js";
2
+ import type { IBaseContract, PoolQuotaKeeperState, PoolState, QuotaState } from "../../base/index.js";
3
3
  import { BaseContract } from "../../base/index.js";
4
4
  import type { GearboxSDK } from "../../GearboxSDK.js";
5
5
  import type { PoolQuotaKeeperStateHuman } from "../../types/index.js";
@@ -472,7 +472,7 @@ type abi = typeof abi;
472
472
  export declare class PoolQuotaKeeperV310Contract extends BaseContract<abi> implements IBaseContract {
473
473
  readonly decimals: number;
474
474
  readonly quotas: AddressMap<QuotaState>;
475
- constructor(sdk: GearboxSDK, pool: PoolState, pqk: QuotaKeeperState);
475
+ constructor(sdk: GearboxSDK, pool: PoolState, pqk: PoolQuotaKeeperState);
476
476
  stateHuman(raw?: boolean): PoolQuotaKeeperStateHuman;
477
477
  processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
478
478
  }
@@ -1,4 +1,4 @@
1
- import type { PoolState, QuotaKeeperState } from "../../base/index.js";
1
+ import type { PoolQuotaKeeperState, PoolState } from "../../base/index.js";
2
2
  import type { GearboxSDK } from "../../GearboxSDK.js";
3
3
  import type { PoolQuotaKeeperContract } from "./types.js";
4
- export default function createPoolQuotaKeeper(sdk: GearboxSDK, pool: PoolState, pqk: QuotaKeeperState): PoolQuotaKeeperContract;
4
+ export default function createPoolQuotaKeeper(sdk: GearboxSDK, pool: PoolState, pqk: PoolQuotaKeeperState): PoolQuotaKeeperContract;
@@ -73,7 +73,9 @@ export interface CreditFacadeStateHuman extends BaseContractStateHuman {
73
73
  botList: string;
74
74
  minDebt: string;
75
75
  maxDebt: string;
76
- forbiddenTokensMask: string;
76
+ currentCumulativeLoss: string;
77
+ maxCumulativeLoss: string;
78
+ forbiddenTokenMask: string;
77
79
  isPaused: boolean;
78
80
  }
79
81
  export interface CreditManagerStateHuman extends BaseContractStateHuman {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "3.1.3-next.2",
3
+ "version": "3.2.0",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",