@gearbox-protocol/sdk 3.0.1-next.1 → 3.0.1

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 (40) 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/sdk/accounts/CreditAccountsService.js +7 -4
  6. package/dist/cjs/sdk/constants/address-provider.js +14 -8
  7. package/dist/cjs/sdk/market/MarketSuite.js +1 -1
  8. package/dist/cjs/sdk/market/credit/CreditFacadeV300Contract.js +5 -1
  9. package/dist/cjs/sdk/market/credit/CreditFacadeV310Contract.js +5 -1
  10. package/dist/cjs/sdk/market/oracle/PriceOracleBaseContract.js +5 -6
  11. package/dist/cjs/sdk/market/pool/PoolSuite.js +1 -1
  12. package/dist/cjs/sdk/market/pricefeeds/PriceFeedsRegister.js +4 -4
  13. package/dist/esm/abi/compressors.js +522 -1133
  14. package/dist/esm/adapters/abi/adapters.js +0 -120
  15. package/dist/esm/adapters/abi/iBalancerV3RouterAdapter.js +129 -0
  16. package/dist/esm/adapters/abi/index.js +1 -0
  17. package/dist/esm/sdk/accounts/CreditAccountsService.js +7 -4
  18. package/dist/esm/sdk/constants/address-provider.js +12 -8
  19. package/dist/esm/sdk/market/MarketSuite.js +1 -1
  20. package/dist/esm/sdk/market/credit/CreditFacadeV300Contract.js +5 -1
  21. package/dist/esm/sdk/market/credit/CreditFacadeV310Contract.js +5 -1
  22. package/dist/esm/sdk/market/oracle/PriceOracleBaseContract.js +5 -6
  23. package/dist/esm/sdk/market/pool/PoolSuite.js +1 -1
  24. package/dist/esm/sdk/market/pricefeeds/PriceFeedsRegister.js +6 -9
  25. package/dist/types/abi/compressors.d.ts +1106 -1734
  26. package/dist/types/adapters/BalancerV3RouterAdapterContract.d.ts +104 -62
  27. package/dist/types/adapters/abi/adapters.d.ts +0 -213
  28. package/dist/types/adapters/abi/iBalancerV3RouterAdapter.d.ts +230 -0
  29. package/dist/types/adapters/abi/index.d.ts +1 -0
  30. package/dist/types/sdk/accounts/CreditAccountsService.d.ts +2 -1
  31. package/dist/types/sdk/accounts/types.d.ts +2 -2
  32. package/dist/types/sdk/base/types.d.ts +6 -6
  33. package/dist/types/sdk/constants/address-provider.d.ts +10 -8
  34. package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +85 -425
  35. package/dist/types/sdk/market/pool/PoolQuotaKeeperV300Contract.d.ts +2 -2
  36. package/dist/types/sdk/market/pool/PoolQuotaKeeperV310Contract.d.ts +2 -2
  37. package/dist/types/sdk/market/pool/createPoolQuotaKeeper.d.ts +2 -2
  38. package/dist/types/sdk/router/types.d.ts +4 -0
  39. package/dist/types/sdk/types/state-human.d.ts +3 -1
  40. package/package.json +2 -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";
@@ -119,140 +118,37 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
119
118
  readonly name: "priceOracle";
120
119
  readonly internalType: "address";
121
120
  readonly type: "address";
121
+ }, {
122
+ readonly name: "tokens";
123
+ readonly internalType: "address[]";
124
+ readonly type: "address[]";
122
125
  }];
123
- readonly name: "getPriceOracleState";
126
+ readonly name: "getPriceFeeds";
124
127
  readonly outputs: readonly [{
125
- readonly name: "";
126
- readonly internalType: "struct PriceOracleState";
127
- readonly type: "tuple";
128
+ readonly name: "priceFeedMap";
129
+ readonly internalType: "struct PriceFeedMapEntry[]";
130
+ readonly type: "tuple[]";
128
131
  readonly components: readonly [{
129
- readonly name: "baseParams";
130
- readonly internalType: "struct BaseParams";
131
- readonly type: "tuple";
132
- readonly components: readonly [{
133
- readonly name: "addr";
134
- readonly internalType: "address";
135
- readonly type: "address";
136
- }, {
137
- readonly name: "version";
138
- readonly internalType: "uint256";
139
- readonly type: "uint256";
140
- }, {
141
- readonly name: "contractType";
142
- readonly internalType: "bytes32";
143
- readonly type: "bytes32";
144
- }, {
145
- readonly name: "serializedParams";
146
- readonly internalType: "bytes";
147
- readonly type: "bytes";
148
- }];
132
+ readonly name: "token";
133
+ readonly internalType: "address";
134
+ readonly type: "address";
149
135
  }, {
150
- readonly name: "priceFeedMap";
151
- readonly internalType: "struct PriceFeedMapEntry[]";
152
- readonly type: "tuple[]";
153
- readonly components: readonly [{
154
- readonly name: "token";
155
- readonly internalType: "address";
156
- readonly type: "address";
157
- }, {
158
- readonly name: "reserve";
159
- readonly internalType: "bool";
160
- readonly type: "bool";
161
- }, {
162
- readonly name: "priceFeed";
163
- readonly internalType: "address";
164
- readonly type: "address";
165
- }, {
166
- readonly name: "stalenessPeriod";
167
- readonly internalType: "uint32";
168
- readonly type: "uint32";
169
- }];
136
+ readonly name: "reserve";
137
+ readonly internalType: "bool";
138
+ readonly type: "bool";
170
139
  }, {
171
- readonly name: "priceFeedTree";
172
- readonly internalType: "struct PriceFeedTreeNode[]";
173
- readonly type: "tuple[]";
174
- readonly components: readonly [{
175
- readonly name: "baseParams";
176
- readonly internalType: "struct BaseParams";
177
- readonly type: "tuple";
178
- readonly components: readonly [{
179
- readonly name: "addr";
180
- readonly internalType: "address";
181
- readonly type: "address";
182
- }, {
183
- readonly name: "version";
184
- readonly internalType: "uint256";
185
- readonly type: "uint256";
186
- }, {
187
- readonly name: "contractType";
188
- readonly internalType: "bytes32";
189
- readonly type: "bytes32";
190
- }, {
191
- readonly name: "serializedParams";
192
- readonly internalType: "bytes";
193
- readonly type: "bytes";
194
- }];
195
- }, {
196
- readonly name: "description";
197
- readonly internalType: "string";
198
- readonly type: "string";
199
- }, {
200
- readonly name: "decimals";
201
- readonly internalType: "uint8";
202
- readonly type: "uint8";
203
- }, {
204
- readonly name: "skipCheck";
205
- readonly internalType: "bool";
206
- readonly type: "bool";
207
- }, {
208
- readonly name: "updatable";
209
- readonly internalType: "bool";
210
- readonly type: "bool";
211
- }, {
212
- readonly name: "underlyingFeeds";
213
- readonly internalType: "address[]";
214
- readonly type: "address[]";
215
- }, {
216
- readonly name: "underlyingStalenessPeriods";
217
- readonly internalType: "uint32[]";
218
- readonly type: "uint32[]";
219
- }, {
220
- readonly name: "answer";
221
- readonly internalType: "struct PriceFeedAnswer";
222
- readonly type: "tuple";
223
- readonly components: readonly [{
224
- readonly name: "price";
225
- readonly internalType: "int256";
226
- readonly type: "int256";
227
- }, {
228
- readonly name: "updatedAt";
229
- readonly internalType: "uint256";
230
- readonly type: "uint256";
231
- }, {
232
- readonly name: "success";
233
- readonly internalType: "bool";
234
- readonly type: "bool";
235
- }];
236
- }];
140
+ readonly name: "priceFeed";
141
+ readonly internalType: "address";
142
+ readonly type: "address";
143
+ }, {
144
+ readonly name: "stalenessPeriod";
145
+ readonly internalType: "uint32";
146
+ readonly type: "uint32";
237
147
  }];
238
- }];
239
- readonly stateMutability: "view";
240
- }, {
241
- readonly type: "function";
242
- readonly inputs: readonly [{
243
- readonly name: "priceOracle";
244
- readonly internalType: "address";
245
- readonly type: "address";
246
148
  }, {
247
- readonly name: "tokens";
248
- readonly internalType: "address[]";
249
- readonly type: "address[]";
250
- }];
251
- readonly name: "getPriceOracleState";
252
- readonly outputs: readonly [{
253
- readonly name: "";
254
- readonly internalType: "struct PriceOracleState";
255
- readonly type: "tuple";
149
+ readonly name: "priceFeedTree";
150
+ readonly internalType: "struct PriceFeedTreeNode[]";
151
+ readonly type: "tuple[]";
256
152
  readonly components: readonly [{
257
153
  readonly name: "baseParams";
258
154
  readonly internalType: "struct BaseParams";
@@ -275,229 +171,45 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
275
171
  readonly type: "bytes";
276
172
  }];
277
173
  }, {
278
- readonly name: "priceFeedMap";
279
- readonly internalType: "struct PriceFeedMapEntry[]";
280
- readonly type: "tuple[]";
281
- readonly components: readonly [{
282
- readonly name: "token";
283
- readonly internalType: "address";
284
- readonly type: "address";
285
- }, {
286
- readonly name: "reserve";
287
- readonly internalType: "bool";
288
- readonly type: "bool";
289
- }, {
290
- readonly name: "priceFeed";
291
- readonly internalType: "address";
292
- readonly type: "address";
293
- }, {
294
- readonly name: "stalenessPeriod";
295
- readonly internalType: "uint32";
296
- readonly type: "uint32";
297
- }];
174
+ readonly name: "description";
175
+ readonly internalType: "string";
176
+ readonly type: "string";
298
177
  }, {
299
- readonly name: "priceFeedTree";
300
- readonly internalType: "struct PriceFeedTreeNode[]";
301
- readonly type: "tuple[]";
302
- readonly components: readonly [{
303
- readonly name: "baseParams";
304
- readonly internalType: "struct BaseParams";
305
- readonly type: "tuple";
306
- readonly components: readonly [{
307
- readonly name: "addr";
308
- readonly internalType: "address";
309
- readonly type: "address";
310
- }, {
311
- readonly name: "version";
312
- readonly internalType: "uint256";
313
- readonly type: "uint256";
314
- }, {
315
- readonly name: "contractType";
316
- readonly internalType: "bytes32";
317
- readonly type: "bytes32";
318
- }, {
319
- readonly name: "serializedParams";
320
- readonly internalType: "bytes";
321
- readonly type: "bytes";
322
- }];
323
- }, {
324
- readonly name: "description";
325
- readonly internalType: "string";
326
- readonly type: "string";
327
- }, {
328
- readonly name: "decimals";
329
- readonly internalType: "uint8";
330
- readonly type: "uint8";
331
- }, {
332
- readonly name: "skipCheck";
333
- readonly internalType: "bool";
334
- readonly type: "bool";
335
- }, {
336
- readonly name: "updatable";
337
- readonly internalType: "bool";
338
- readonly type: "bool";
339
- }, {
340
- readonly name: "underlyingFeeds";
341
- readonly internalType: "address[]";
342
- readonly type: "address[]";
343
- }, {
344
- readonly name: "underlyingStalenessPeriods";
345
- readonly internalType: "uint32[]";
346
- readonly type: "uint32[]";
347
- }, {
348
- readonly name: "answer";
349
- readonly internalType: "struct PriceFeedAnswer";
350
- readonly type: "tuple";
351
- readonly components: readonly [{
352
- readonly name: "price";
353
- readonly internalType: "int256";
354
- readonly type: "int256";
355
- }, {
356
- readonly name: "updatedAt";
357
- readonly internalType: "uint256";
358
- readonly type: "uint256";
359
- }, {
360
- readonly name: "success";
361
- readonly internalType: "bool";
362
- readonly type: "bool";
363
- }];
364
- }];
365
- }];
366
- }];
367
- readonly stateMutability: "view";
368
- }, {
369
- readonly type: "function";
370
- readonly inputs: readonly [{
371
- readonly name: "filter";
372
- readonly internalType: "struct MarketFilter";
373
- readonly type: "tuple";
374
- readonly components: readonly [{
375
- readonly name: "configurators";
376
- readonly internalType: "address[]";
377
- readonly type: "address[]";
178
+ readonly name: "decimals";
179
+ readonly internalType: "uint8";
180
+ readonly type: "uint8";
181
+ }, {
182
+ readonly name: "skipCheck";
183
+ readonly internalType: "bool";
184
+ readonly type: "bool";
185
+ }, {
186
+ readonly name: "updatable";
187
+ readonly internalType: "bool";
188
+ readonly type: "bool";
378
189
  }, {
379
- readonly name: "pools";
190
+ readonly name: "underlyingFeeds";
380
191
  readonly internalType: "address[]";
381
192
  readonly type: "address[]";
382
193
  }, {
383
- readonly name: "underlying";
384
- readonly internalType: "address";
385
- readonly type: "address";
386
- }];
387
- }];
388
- readonly name: "getPriceOracles";
389
- readonly outputs: readonly [{
390
- readonly name: "";
391
- readonly internalType: "struct PriceOracleState[]";
392
- readonly type: "tuple[]";
393
- readonly components: readonly [{
394
- readonly name: "baseParams";
395
- readonly internalType: "struct BaseParams";
194
+ readonly name: "underlyingStalenessPeriods";
195
+ readonly internalType: "uint32[]";
196
+ readonly type: "uint32[]";
197
+ }, {
198
+ readonly name: "answer";
199
+ readonly internalType: "struct PriceFeedAnswer";
396
200
  readonly type: "tuple";
397
201
  readonly components: readonly [{
398
- readonly name: "addr";
399
- readonly internalType: "address";
400
- readonly type: "address";
202
+ readonly name: "price";
203
+ readonly internalType: "int256";
204
+ readonly type: "int256";
401
205
  }, {
402
- readonly name: "version";
206
+ readonly name: "updatedAt";
403
207
  readonly internalType: "uint256";
404
208
  readonly type: "uint256";
405
209
  }, {
406
- readonly name: "contractType";
407
- readonly internalType: "bytes32";
408
- readonly type: "bytes32";
409
- }, {
410
- readonly name: "serializedParams";
411
- readonly internalType: "bytes";
412
- readonly type: "bytes";
413
- }];
414
- }, {
415
- readonly name: "priceFeedMap";
416
- readonly internalType: "struct PriceFeedMapEntry[]";
417
- readonly type: "tuple[]";
418
- readonly components: readonly [{
419
- readonly name: "token";
420
- readonly internalType: "address";
421
- readonly type: "address";
422
- }, {
423
- readonly name: "reserve";
424
- readonly internalType: "bool";
425
- readonly type: "bool";
426
- }, {
427
- readonly name: "priceFeed";
428
- readonly internalType: "address";
429
- readonly type: "address";
430
- }, {
431
- readonly name: "stalenessPeriod";
432
- readonly internalType: "uint32";
433
- readonly type: "uint32";
434
- }];
435
- }, {
436
- readonly name: "priceFeedTree";
437
- readonly internalType: "struct PriceFeedTreeNode[]";
438
- readonly type: "tuple[]";
439
- readonly components: readonly [{
440
- readonly name: "baseParams";
441
- readonly internalType: "struct BaseParams";
442
- readonly type: "tuple";
443
- readonly components: readonly [{
444
- readonly name: "addr";
445
- readonly internalType: "address";
446
- readonly type: "address";
447
- }, {
448
- readonly name: "version";
449
- readonly internalType: "uint256";
450
- readonly type: "uint256";
451
- }, {
452
- readonly name: "contractType";
453
- readonly internalType: "bytes32";
454
- readonly type: "bytes32";
455
- }, {
456
- readonly name: "serializedParams";
457
- readonly internalType: "bytes";
458
- readonly type: "bytes";
459
- }];
460
- }, {
461
- readonly name: "description";
462
- readonly internalType: "string";
463
- readonly type: "string";
464
- }, {
465
- readonly name: "decimals";
466
- readonly internalType: "uint8";
467
- readonly type: "uint8";
468
- }, {
469
- readonly name: "skipCheck";
470
- readonly internalType: "bool";
471
- readonly type: "bool";
472
- }, {
473
- readonly name: "updatable";
210
+ readonly name: "success";
474
211
  readonly internalType: "bool";
475
212
  readonly type: "bool";
476
- }, {
477
- readonly name: "underlyingFeeds";
478
- readonly internalType: "address[]";
479
- readonly type: "address[]";
480
- }, {
481
- readonly name: "underlyingStalenessPeriods";
482
- readonly internalType: "uint32[]";
483
- readonly type: "uint32[]";
484
- }, {
485
- readonly name: "answer";
486
- readonly internalType: "struct PriceFeedAnswer";
487
- readonly type: "tuple";
488
- readonly components: readonly [{
489
- readonly name: "price";
490
- readonly internalType: "int256";
491
- readonly type: "int256";
492
- }, {
493
- readonly name: "updatedAt";
494
- readonly internalType: "uint256";
495
- readonly type: "uint256";
496
- }, {
497
- readonly name: "success";
498
- readonly internalType: "bool";
499
- readonly type: "bool";
500
- }];
501
213
  }];
502
214
  }];
503
215
  }];
@@ -505,101 +217,34 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
505
217
  }, {
506
218
  readonly type: "function";
507
219
  readonly inputs: readonly [{
508
- readonly name: "priceFeeds";
509
- readonly internalType: "address[]";
510
- readonly type: "address[]";
220
+ readonly name: "priceOracle";
221
+ readonly internalType: "address";
222
+ readonly type: "address";
511
223
  }];
512
- readonly name: "getUpdatablePriceFeeds";
224
+ readonly name: "getPriceFeeds";
513
225
  readonly outputs: readonly [{
514
- readonly name: "";
515
- readonly internalType: "struct BaseParams[]";
226
+ readonly name: "priceFeedMap";
227
+ readonly internalType: "struct PriceFeedMapEntry[]";
516
228
  readonly type: "tuple[]";
517
229
  readonly components: readonly [{
518
- readonly name: "addr";
230
+ readonly name: "token";
519
231
  readonly internalType: "address";
520
232
  readonly type: "address";
521
233
  }, {
522
- readonly name: "version";
523
- readonly internalType: "uint256";
524
- readonly type: "uint256";
525
- }, {
526
- readonly name: "contractType";
527
- readonly internalType: "bytes32";
528
- readonly type: "bytes32";
529
- }, {
530
- readonly name: "serializedParams";
531
- readonly internalType: "bytes";
532
- readonly type: "bytes";
533
- }];
534
- }];
535
- readonly stateMutability: "view";
536
- }, {
537
- readonly type: "function";
538
- readonly inputs: readonly [{
539
- readonly name: "filter";
540
- readonly internalType: "struct MarketFilter";
541
- readonly type: "tuple";
542
- readonly components: readonly [{
543
- readonly name: "configurators";
544
- readonly internalType: "address[]";
545
- readonly type: "address[]";
546
- }, {
547
- readonly name: "pools";
548
- readonly internalType: "address[]";
549
- readonly type: "address[]";
234
+ readonly name: "reserve";
235
+ readonly internalType: "bool";
236
+ readonly type: "bool";
550
237
  }, {
551
- readonly name: "underlying";
238
+ readonly name: "priceFeed";
552
239
  readonly internalType: "address";
553
240
  readonly type: "address";
554
- }];
555
- }];
556
- readonly name: "getUpdatablePriceFeeds";
557
- readonly outputs: readonly [{
558
- readonly name: "";
559
- readonly internalType: "struct BaseParams[]";
560
- readonly type: "tuple[]";
561
- readonly components: readonly [{
562
- readonly name: "addr";
563
- readonly internalType: "address";
564
- readonly type: "address";
565
- }, {
566
- readonly name: "version";
567
- readonly internalType: "uint256";
568
- readonly type: "uint256";
569
- }, {
570
- readonly name: "contractType";
571
- readonly internalType: "bytes32";
572
- readonly type: "bytes32";
573
241
  }, {
574
- readonly name: "serializedParams";
575
- readonly internalType: "bytes";
576
- readonly type: "bytes";
242
+ readonly name: "stalenessPeriod";
243
+ readonly internalType: "uint32";
244
+ readonly type: "uint32";
577
245
  }];
578
- }];
579
- readonly stateMutability: "view";
580
- }, {
581
- readonly type: "function";
582
- readonly inputs: readonly [{
583
- readonly name: "filter";
584
- readonly internalType: "struct MarketFilter";
585
- readonly type: "tuple";
586
- readonly components: readonly [{
587
- readonly name: "configurators";
588
- readonly internalType: "address[]";
589
- readonly type: "address[]";
590
- }, {
591
- readonly name: "pools";
592
- readonly internalType: "address[]";
593
- readonly type: "address[]";
594
- }, {
595
- readonly name: "underlying";
596
- readonly internalType: "address";
597
- readonly type: "address";
598
- }];
599
- }];
600
- readonly name: "loadPriceFeedTree";
601
- readonly outputs: readonly [{
602
- readonly name: "";
246
+ }, {
247
+ readonly name: "priceFeedTree";
603
248
  readonly internalType: "struct PriceFeedTreeNode[]";
604
249
  readonly type: "tuple[]";
605
250
  readonly components: readonly [{
@@ -676,7 +321,7 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
676
321
  }];
677
322
  readonly name: "loadPriceFeedTree";
678
323
  readonly outputs: readonly [{
679
- readonly name: "";
324
+ readonly name: "priceFeedTree";
680
325
  readonly internalType: "struct PriceFeedTreeNode[]";
681
326
  readonly type: "tuple[]";
682
327
  readonly components: readonly [{
@@ -754,12 +399,27 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
754
399
  readonly type: "uint256";
755
400
  }];
756
401
  readonly stateMutability: "view";
402
+ }, {
403
+ readonly type: "event";
404
+ readonly anonymous: false;
405
+ readonly inputs: readonly [{
406
+ readonly name: "contractType";
407
+ readonly internalType: "bytes32";
408
+ readonly type: "bytes32";
409
+ readonly indexed: true;
410
+ }, {
411
+ readonly name: "serializer";
412
+ readonly internalType: "address";
413
+ readonly type: "address";
414
+ readonly indexed: true;
415
+ }];
416
+ readonly name: "SetSerializer";
757
417
  }];
758
418
  address: `0x${string}`;
759
419
  functionName: string;
760
420
  args: any[];
761
421
  };
762
- onResult: (resp: ContractFunctionReturnType<typeof iPriceFeedCompressorAbi, "view", "getPriceOracleState">) => void;
422
+ onResult: ([entries, tree]: [PriceFeedMapEntry[], PriceFeedTreeNode[]]) => void;
763
423
  };
764
424
  /**
765
425
  * 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;
@@ -185,6 +185,10 @@ export interface FindBestClosePathProps {
185
185
  * Balances {@link ClosePathBalances} to close account with, if not provided, all assets will be swapped according to inner logic.
186
186
  */
187
187
  balances?: ClosePathBalances;
188
+ /**
189
+ * TODO: legacy v3 option to pass to contract
190
+ */
191
+ force?: boolean;
188
192
  }
189
193
  export interface ClosePathBalances {
190
194
  /**
@@ -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 {