@gearbox-protocol/sdk 3.0.0-next.55 → 3.0.0-next.56

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 (158) hide show
  1. package/contracts/index.sol +5 -0
  2. package/lib/core/creditAccount.d.ts +1 -2
  3. package/lib/core/creditAccount.js +0 -7
  4. package/lib/core/creditManager.js +1 -1
  5. package/lib/core/trade.d.ts +9 -8
  6. package/lib/core/trade.js +25 -22
  7. package/lib/parsers/convexBaseRewardPoolAdapterParser.js +10 -8
  8. package/lib/parsers/convexBaseRewardPoolAdapterParser.spec.js +9 -6
  9. package/lib/parsers/convexBoosterAdapterParser.js +6 -6
  10. package/lib/parsers/convexBoosterAdapterParser.spec.js +4 -4
  11. package/lib/parsers/curveAdapterParser.js +10 -10
  12. package/lib/parsers/curveAdapterParser.spec.js +6 -2
  13. package/lib/parsers/lidoAdapterParser.js +3 -2
  14. package/lib/parsers/lidoAdapterParser.spec.js +2 -2
  15. package/lib/parsers/uniV2AdapterParser.js +4 -3
  16. package/lib/parsers/uniV2AdapterParser.spec.js +3 -2
  17. package/lib/parsers/uniV3AdapterParser.js +8 -6
  18. package/lib/parsers/uniV3AdapterParser.spec.js +3 -2
  19. package/lib/parsers/wstETHAdapterParser.js +6 -4
  20. package/lib/parsers/wstETHAdapterParser.spec.js +4 -4
  21. package/lib/parsers/yearnAdapterParser.spec.js +4 -4
  22. package/lib/parsers/yearnV2AdapterParser.js +13 -3
  23. package/lib/pathfinder/core.d.ts +8 -9
  24. package/lib/pathfinder/pathfinder.d.ts +37 -10
  25. package/lib/pathfinder/pathfinder.js +45 -33
  26. package/lib/pathfinder/pathfinder.spec.js +4 -2
  27. package/lib/payload/creditAccount.d.ts +1 -2
  28. package/lib/types/IAaveV2_LendingPoolAdapter.d.ts +171 -0
  29. package/lib/types/IAaveV2_WrappedATokenAdapter.d.ts +290 -0
  30. package/lib/types/IBalancerV2Vault.sol/IBalancerV2Vault.d.ts +308 -0
  31. package/lib/types/IBalancerV2Vault.sol/IBalancerV2VaultGetters.d.ts +112 -0
  32. package/lib/types/IBalancerV2Vault.sol/index.d.ts +2 -0
  33. package/lib/types/IBalancerV2Vault.sol/index.js +2 -0
  34. package/lib/types/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapter.d.ts +466 -0
  35. package/lib/types/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapter.js +2 -0
  36. package/lib/types/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterEvents.d.ts +43 -0
  37. package/lib/types/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterEvents.js +2 -0
  38. package/lib/types/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterExceptions.d.ts +27 -0
  39. package/lib/types/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterExceptions.js +2 -0
  40. package/lib/types/IBalancerV2VaultAdapter.sol/index.d.ts +3 -0
  41. package/lib/types/IBalancerV2VaultAdapter.sol/index.js +2 -0
  42. package/lib/types/ICompoundV2_CTokenAdapter.sol/ICompoundV2_CTokenAdapter.d.ts +216 -0
  43. package/lib/types/ICompoundV2_CTokenAdapter.sol/ICompoundV2_CTokenAdapter.js +2 -0
  44. package/lib/types/ICompoundV2_CTokenAdapter.sol/ICompoundV2_Exceptions.d.ts +27 -0
  45. package/lib/types/ICompoundV2_CTokenAdapter.sol/ICompoundV2_Exceptions.js +2 -0
  46. package/lib/types/ICompoundV2_CTokenAdapter.sol/index.d.ts +2 -0
  47. package/lib/types/ICompoundV2_CTokenAdapter.sol/index.js +2 -0
  48. package/lib/types/IConvexV1BaseRewardPoolAdapter.d.ts +30 -30
  49. package/lib/types/IConvexV1BoosterAdapter.sol/IConvexV1BoosterAdapter.d.ts +21 -17
  50. package/lib/types/ICreditFacadeV3.sol/ICreditFacadeV3.d.ts +45 -85
  51. package/lib/types/ICreditFacadeV3.sol/ICreditFacadeV3Events.d.ts +24 -26
  52. package/lib/types/ICreditFacadeV3Multicall.d.ts +32 -40
  53. package/lib/types/ICreditManagerV3.sol/ICreditManagerV3.d.ts +99 -71
  54. package/lib/types/ICurveV1Adapter.d.ts +41 -105
  55. package/lib/types/ICurveV1_2AssetsAdapter.d.ts +41 -105
  56. package/lib/types/ICurveV1_3AssetsAdapter.d.ts +41 -105
  57. package/lib/types/ICurveV1_4AssetsAdapter.d.ts +41 -105
  58. package/lib/types/IDataCompressorV2_10.d.ts +1 -27
  59. package/lib/types/IDataCompressorV3_00.d.ts +1 -27
  60. package/lib/types/IERC4626Adapter.d.ts +238 -0
  61. package/lib/types/IERC4626Adapter.js +2 -0
  62. package/lib/types/ILidoV1Adapter.d.ts +9 -9
  63. package/lib/types/IPriceOracleV3.sol/IPriceOracleV3.d.ts +39 -14
  64. package/lib/types/IPriceOracleV3.sol/IPriceOracleV3Events.d.ts +5 -3
  65. package/lib/types/IUniswapV2Adapter.sol/IUniswapV2Adapter.d.ts +10 -9
  66. package/lib/types/IUniswapV3Adapter.sol/IUniswapV3Adapter.d.ts +27 -21
  67. package/lib/types/IYearnV2Adapter.d.ts +22 -22
  68. package/lib/types/IwstETHV1Adapter.d.ts +17 -17
  69. package/lib/types/factories/IAaveV2_LendingPoolAdapter__factory.d.ts +158 -0
  70. package/lib/types/factories/IAaveV2_LendingPoolAdapter__factory.js +215 -0
  71. package/lib/types/factories/IAaveV2_WrappedATokenAdapter__factory.d.ts +252 -0
  72. package/lib/types/factories/IAaveV2_WrappedATokenAdapter__factory.js +341 -0
  73. package/lib/types/factories/IBalancerV2Vault.sol/IBalancerV2VaultGetters__factory.d.ts +78 -0
  74. package/lib/types/factories/IBalancerV2Vault.sol/IBalancerV2VaultGetters__factory.js +111 -0
  75. package/lib/types/factories/IBalancerV2Vault.sol/IBalancerV2Vault__factory.d.ts +360 -0
  76. package/lib/types/factories/IBalancerV2Vault.sol/IBalancerV2Vault__factory.js +475 -0
  77. package/lib/types/factories/IBalancerV2Vault.sol/index.d.ts +2 -0
  78. package/lib/types/factories/IBalancerV2Vault.sol/index.js +10 -0
  79. package/lib/types/factories/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterEvents__factory.d.ts +23 -0
  80. package/lib/types/factories/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterEvents__factory.js +38 -0
  81. package/lib/types/factories/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterExceptions__factory.d.ts +12 -0
  82. package/lib/types/factories/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterExceptions__factory.js +24 -0
  83. package/lib/types/factories/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapter__factory.d.ts +514 -0
  84. package/lib/types/factories/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapter__factory.js +675 -0
  85. package/lib/types/factories/IBalancerV2VaultAdapter.sol/index.d.ts +3 -0
  86. package/lib/types/factories/IBalancerV2VaultAdapter.sol/index.js +12 -0
  87. package/lib/types/factories/ICompoundV2_CTokenAdapter.sol/ICompoundV2_CTokenAdapter__factory.d.ts +196 -0
  88. package/lib/types/factories/ICompoundV2_CTokenAdapter.sol/ICompoundV2_CTokenAdapter__factory.js +267 -0
  89. package/lib/types/factories/ICompoundV2_CTokenAdapter.sol/ICompoundV2_Exceptions__factory.d.ts +16 -0
  90. package/lib/types/factories/ICompoundV2_CTokenAdapter.sol/ICompoundV2_Exceptions__factory.js +30 -0
  91. package/lib/types/factories/ICompoundV2_CTokenAdapter.sol/index.d.ts +2 -0
  92. package/lib/types/factories/ICompoundV2_CTokenAdapter.sol/index.js +10 -0
  93. package/lib/types/factories/IConvexV1BaseRewardPoolAdapter__factory.d.ts +18 -6
  94. package/lib/types/factories/IConvexV1BaseRewardPoolAdapter__factory.js +22 -6
  95. package/lib/types/factories/IConvexV1BoosterAdapter.sol/IConvexV1BoosterAdapter__factory.d.ts +10 -2
  96. package/lib/types/factories/IConvexV1BoosterAdapter.sol/IConvexV1BoosterAdapter__factory.js +12 -2
  97. package/lib/types/factories/ICreditFacadeV3.sol/ICreditFacadeV3Events__factory.d.ts +13 -18
  98. package/lib/types/factories/ICreditFacadeV3.sol/ICreditFacadeV3Events__factory.js +14 -20
  99. package/lib/types/factories/ICreditFacadeV3.sol/ICreditFacadeV3__factory.d.ts +13 -70
  100. package/lib/types/factories/ICreditFacadeV3.sol/ICreditFacadeV3__factory.js +14 -86
  101. package/lib/types/factories/ICreditFacadeV3Multicall__factory.d.ts +22 -24
  102. package/lib/types/factories/ICreditFacadeV3Multicall__factory.js +28 -31
  103. package/lib/types/factories/ICreditManagerV3.sol/ICreditManagerV3__factory.d.ts +153 -135
  104. package/lib/types/factories/ICreditManagerV3.sol/ICreditManagerV3__factory.js +191 -168
  105. package/lib/types/factories/ICurveV1Adapter__factory.d.ts +13 -71
  106. package/lib/types/factories/ICurveV1Adapter__factory.js +14 -91
  107. package/lib/types/factories/ICurveV1_2AssetsAdapter__factory.d.ts +13 -71
  108. package/lib/types/factories/ICurveV1_2AssetsAdapter__factory.js +14 -91
  109. package/lib/types/factories/ICurveV1_3AssetsAdapter__factory.d.ts +13 -71
  110. package/lib/types/factories/ICurveV1_3AssetsAdapter__factory.js +14 -91
  111. package/lib/types/factories/ICurveV1_4AssetsAdapter__factory.d.ts +13 -71
  112. package/lib/types/factories/ICurveV1_4AssetsAdapter__factory.js +14 -91
  113. package/lib/types/factories/IDataCompressorV2_10__factory.d.ts +0 -42
  114. package/lib/types/factories/IDataCompressorV2_10__factory.js +0 -54
  115. package/lib/types/factories/IDataCompressorV3_00__factory.d.ts +0 -84
  116. package/lib/types/factories/IDataCompressorV3_00__factory.js +0 -108
  117. package/lib/types/factories/IERC4626Adapter__factory.d.ts +220 -0
  118. package/lib/types/factories/IERC4626Adapter__factory.js +297 -0
  119. package/lib/types/factories/ILidoV1Adapter__factory.d.ts +6 -2
  120. package/lib/types/factories/ILidoV1Adapter__factory.js +8 -2
  121. package/lib/types/factories/IPriceOracleV3.sol/IPriceOracleV3Events__factory.d.ts +5 -0
  122. package/lib/types/factories/IPriceOracleV3.sol/IPriceOracleV3Events__factory.js +6 -0
  123. package/lib/types/factories/IPriceOracleV3.sol/IPriceOracleV3__factory.d.ts +45 -0
  124. package/lib/types/factories/IPriceOracleV3.sol/IPriceOracleV3__factory.js +59 -0
  125. package/lib/types/factories/IUniswapV2Adapter.sol/IUniswapV2Adapter__factory.d.ts +5 -1
  126. package/lib/types/factories/IUniswapV2Adapter.sol/IUniswapV2Adapter__factory.js +6 -1
  127. package/lib/types/factories/IUniswapV3Adapter.sol/IUniswapV3Adapter__factory.d.ts +12 -4
  128. package/lib/types/factories/IUniswapV3Adapter.sol/IUniswapV3Adapter__factory.js +14 -4
  129. package/lib/types/factories/IYearnV2Adapter__factory.d.ts +21 -13
  130. package/lib/types/factories/IYearnV2Adapter__factory.js +27 -15
  131. package/lib/types/factories/IwstETHV1Adapter__factory.d.ts +12 -4
  132. package/lib/types/factories/IwstETHV1Adapter__factory.js +16 -4
  133. package/lib/types/factories/index.d.ts +7 -2
  134. package/lib/types/factories/index.js +12 -5
  135. package/lib/types/factories/{IRouter__factory.d.ts → interfaces/IRouter__factory.d.ts} +61 -6
  136. package/lib/types/factories/{IRouter__factory.js → interfaces/IRouter__factory.js} +77 -6
  137. package/lib/types/factories/interfaces/index.d.ts +1 -0
  138. package/lib/types/factories/interfaces/index.js +8 -0
  139. package/lib/types/index.d.ts +39 -17
  140. package/lib/types/index.js +39 -23
  141. package/lib/types/{IRouter.d.ts → interfaces/IRouter.d.ts} +37 -34
  142. package/lib/types/interfaces/IRouter.js +2 -0
  143. package/lib/types/interfaces/index.d.ts +1 -0
  144. package/lib/types/interfaces/index.js +2 -0
  145. package/package.json +6 -6
  146. package/lib/types/IWithdrawalManagerV3.sol/IWithdrawalManagerV3.d.ts +0 -370
  147. package/lib/types/IWithdrawalManagerV3.sol/IWithdrawalManagerV3Events.d.ts +0 -133
  148. package/lib/types/IWithdrawalManagerV3.sol/index.d.ts +0 -2
  149. package/lib/types/factories/IWithdrawalManagerV3.sol/IWithdrawalManagerV3Events__factory.d.ts +0 -143
  150. package/lib/types/factories/IWithdrawalManagerV3.sol/IWithdrawalManagerV3Events__factory.js +0 -188
  151. package/lib/types/factories/IWithdrawalManagerV3.sol/IWithdrawalManagerV3__factory.d.ts +0 -366
  152. package/lib/types/factories/IWithdrawalManagerV3.sol/IWithdrawalManagerV3__factory.js +0 -479
  153. package/lib/types/factories/IWithdrawalManagerV3.sol/index.d.ts +0 -2
  154. package/lib/types/factories/IWithdrawalManagerV3.sol/index.js +0 -10
  155. /package/lib/types/{IRouter.js → IAaveV2_LendingPoolAdapter.js} +0 -0
  156. /package/lib/types/{IWithdrawalManagerV3.sol/IWithdrawalManagerV3.js → IAaveV2_WrappedATokenAdapter.js} +0 -0
  157. /package/lib/types/{IWithdrawalManagerV3.sol/IWithdrawalManagerV3Events.js → IBalancerV2Vault.sol/IBalancerV2Vault.js} +0 -0
  158. /package/lib/types/{IWithdrawalManagerV3.sol/index.js → IBalancerV2Vault.sol/IBalancerV2VaultGetters.js} +0 -0
@@ -78,7 +78,7 @@ const _abi = [
78
78
  outputs: [
79
79
  {
80
80
  internalType: "uint256",
81
- name: "tokenMask",
81
+ name: "tokensToEnable",
82
82
  type: "uint256",
83
83
  },
84
84
  ],
@@ -136,121 +136,24 @@ const _abi = [
136
136
  name: "creditAccount",
137
137
  type: "address",
138
138
  },
139
- {
140
- internalType: "enum CollateralCalcTask",
141
- name: "task",
142
- type: "uint8",
143
- },
144
- ],
145
- name: "calcDebtAndCollateral",
146
- outputs: [
147
- {
148
- components: [
149
- {
150
- internalType: "uint256",
151
- name: "debt",
152
- type: "uint256",
153
- },
154
- {
155
- internalType: "uint256",
156
- name: "cumulativeIndexNow",
157
- type: "uint256",
158
- },
159
- {
160
- internalType: "uint256",
161
- name: "cumulativeIndexLastUpdate",
162
- type: "uint256",
163
- },
164
- {
165
- internalType: "uint128",
166
- name: "cumulativeQuotaInterest",
167
- type: "uint128",
168
- },
169
- {
170
- internalType: "uint256",
171
- name: "accruedInterest",
172
- type: "uint256",
173
- },
174
- {
175
- internalType: "uint256",
176
- name: "accruedFees",
177
- type: "uint256",
178
- },
179
- {
180
- internalType: "uint256",
181
- name: "totalDebtUSD",
182
- type: "uint256",
183
- },
184
- {
185
- internalType: "uint256",
186
- name: "totalValue",
187
- type: "uint256",
188
- },
189
- {
190
- internalType: "uint256",
191
- name: "totalValueUSD",
192
- type: "uint256",
193
- },
194
- {
195
- internalType: "uint256",
196
- name: "twvUSD",
197
- type: "uint256",
198
- },
199
- {
200
- internalType: "uint256",
201
- name: "enabledTokensMask",
202
- type: "uint256",
203
- },
204
- {
205
- internalType: "uint256",
206
- name: "quotedTokensMask",
207
- type: "uint256",
208
- },
209
- {
210
- internalType: "address[]",
211
- name: "quotedTokens",
212
- type: "address[]",
213
- },
214
- {
215
- internalType: "address",
216
- name: "_poolQuotaKeeper",
217
- type: "address",
218
- },
219
- ],
220
- internalType: "struct CollateralDebtData",
221
- name: "cdd",
222
- type: "tuple",
223
- },
224
- ],
225
- stateMutability: "view",
226
- type: "function",
227
- },
228
- {
229
- inputs: [
230
139
  {
231
140
  internalType: "address",
232
- name: "creditAccount",
141
+ name: "token",
233
142
  type: "address",
234
143
  },
235
144
  {
236
145
  internalType: "address",
237
- name: "to",
146
+ name: "spender",
238
147
  type: "address",
239
148
  },
240
- {
241
- internalType: "enum ClaimAction",
242
- name: "action",
243
- type: "uint8",
244
- },
245
- ],
246
- name: "claimWithdrawals",
247
- outputs: [
248
149
  {
249
150
  internalType: "uint256",
250
- name: "tokensToEnable",
151
+ name: "amount",
251
152
  type: "uint256",
252
153
  },
253
154
  ],
155
+ name: "approveToken",
156
+ outputs: [],
254
157
  stateMutability: "nonpayable",
255
158
  type: "function",
256
159
  },
@@ -262,10 +165,13 @@ const _abi = [
262
165
  type: "address",
263
166
  },
264
167
  {
265
- internalType: "enum ClosureAction",
266
- name: "closureAction",
168
+ internalType: "enum CollateralCalcTask",
169
+ name: "task",
267
170
  type: "uint8",
268
171
  },
172
+ ],
173
+ name: "calcDebtAndCollateral",
174
+ outputs: [
269
175
  {
270
176
  components: [
271
177
  {
@@ -340,43 +246,23 @@ const _abi = [
340
246
  },
341
247
  ],
342
248
  internalType: "struct CollateralDebtData",
343
- name: "collateralDebtData",
249
+ name: "cdd",
344
250
  type: "tuple",
345
251
  },
252
+ ],
253
+ stateMutability: "view",
254
+ type: "function",
255
+ },
256
+ {
257
+ inputs: [
346
258
  {
347
259
  internalType: "address",
348
- name: "payer",
349
- type: "address",
350
- },
351
- {
352
- internalType: "address",
353
- name: "to",
260
+ name: "creditAccount",
354
261
  type: "address",
355
262
  },
356
- {
357
- internalType: "uint256",
358
- name: "skipTokensMask",
359
- type: "uint256",
360
- },
361
- {
362
- internalType: "bool",
363
- name: "convertToETH",
364
- type: "bool",
365
- },
366
263
  ],
367
264
  name: "closeCreditAccount",
368
- outputs: [
369
- {
370
- internalType: "uint256",
371
- name: "remainingFunds",
372
- type: "uint256",
373
- },
374
- {
375
- internalType: "uint256",
376
- name: "loss",
377
- type: "uint256",
378
- },
379
- ],
265
+ outputs: [],
380
266
  stateMutability: "nonpayable",
381
267
  type: "function",
382
268
  },
@@ -604,6 +490,35 @@ const _abi = [
604
490
  stateMutability: "nonpayable",
605
491
  type: "function",
606
492
  },
493
+ {
494
+ inputs: [
495
+ {
496
+ internalType: "address",
497
+ name: "creditAccount",
498
+ type: "address",
499
+ },
500
+ {
501
+ internalType: "address",
502
+ name: "target",
503
+ type: "address",
504
+ },
505
+ {
506
+ internalType: "bytes",
507
+ name: "callData",
508
+ type: "bytes",
509
+ },
510
+ ],
511
+ name: "externalCall",
512
+ outputs: [
513
+ {
514
+ internalType: "bytes",
515
+ name: "result",
516
+ type: "bytes",
517
+ },
518
+ ],
519
+ stateMutability: "nonpayable",
520
+ type: "function",
521
+ },
607
522
  {
608
523
  inputs: [],
609
524
  name: "fees",
@@ -678,6 +593,11 @@ const _abi = [
678
593
  name: "minHealthFactor",
679
594
  type: "uint16",
680
595
  },
596
+ {
597
+ internalType: "bool",
598
+ name: "useSafePrices",
599
+ type: "bool",
600
+ },
681
601
  ],
682
602
  name: "fullCollateralCheck",
683
603
  outputs: [
@@ -784,6 +704,117 @@ const _abi = [
784
704
  stateMutability: "view",
785
705
  type: "function",
786
706
  },
707
+ {
708
+ inputs: [
709
+ {
710
+ internalType: "address",
711
+ name: "creditAccount",
712
+ type: "address",
713
+ },
714
+ {
715
+ components: [
716
+ {
717
+ internalType: "uint256",
718
+ name: "debt",
719
+ type: "uint256",
720
+ },
721
+ {
722
+ internalType: "uint256",
723
+ name: "cumulativeIndexNow",
724
+ type: "uint256",
725
+ },
726
+ {
727
+ internalType: "uint256",
728
+ name: "cumulativeIndexLastUpdate",
729
+ type: "uint256",
730
+ },
731
+ {
732
+ internalType: "uint128",
733
+ name: "cumulativeQuotaInterest",
734
+ type: "uint128",
735
+ },
736
+ {
737
+ internalType: "uint256",
738
+ name: "accruedInterest",
739
+ type: "uint256",
740
+ },
741
+ {
742
+ internalType: "uint256",
743
+ name: "accruedFees",
744
+ type: "uint256",
745
+ },
746
+ {
747
+ internalType: "uint256",
748
+ name: "totalDebtUSD",
749
+ type: "uint256",
750
+ },
751
+ {
752
+ internalType: "uint256",
753
+ name: "totalValue",
754
+ type: "uint256",
755
+ },
756
+ {
757
+ internalType: "uint256",
758
+ name: "totalValueUSD",
759
+ type: "uint256",
760
+ },
761
+ {
762
+ internalType: "uint256",
763
+ name: "twvUSD",
764
+ type: "uint256",
765
+ },
766
+ {
767
+ internalType: "uint256",
768
+ name: "enabledTokensMask",
769
+ type: "uint256",
770
+ },
771
+ {
772
+ internalType: "uint256",
773
+ name: "quotedTokensMask",
774
+ type: "uint256",
775
+ },
776
+ {
777
+ internalType: "address[]",
778
+ name: "quotedTokens",
779
+ type: "address[]",
780
+ },
781
+ {
782
+ internalType: "address",
783
+ name: "_poolQuotaKeeper",
784
+ type: "address",
785
+ },
786
+ ],
787
+ internalType: "struct CollateralDebtData",
788
+ name: "collateralDebtData",
789
+ type: "tuple",
790
+ },
791
+ {
792
+ internalType: "address",
793
+ name: "to",
794
+ type: "address",
795
+ },
796
+ {
797
+ internalType: "bool",
798
+ name: "isExpired",
799
+ type: "bool",
800
+ },
801
+ ],
802
+ name: "liquidateCreditAccount",
803
+ outputs: [
804
+ {
805
+ internalType: "uint256",
806
+ name: "remainingFunds",
807
+ type: "uint256",
808
+ },
809
+ {
810
+ internalType: "uint256",
811
+ name: "loss",
812
+ type: "uint256",
813
+ },
814
+ ],
815
+ stateMutability: "nonpayable",
816
+ type: "function",
817
+ },
787
818
  {
788
819
  inputs: [
789
820
  {
@@ -1008,35 +1039,6 @@ const _abi = [
1008
1039
  stateMutability: "nonpayable",
1009
1040
  type: "function",
1010
1041
  },
1011
- {
1012
- inputs: [
1013
- {
1014
- internalType: "address",
1015
- name: "creditAccount",
1016
- type: "address",
1017
- },
1018
- {
1019
- internalType: "address",
1020
- name: "token",
1021
- type: "address",
1022
- },
1023
- {
1024
- internalType: "uint256",
1025
- name: "amount",
1026
- type: "uint256",
1027
- },
1028
- ],
1029
- name: "scheduleWithdrawal",
1030
- outputs: [
1031
- {
1032
- internalType: "uint256",
1033
- name: "tokensToDisable",
1034
- type: "uint256",
1035
- },
1036
- ],
1037
- stateMutability: "nonpayable",
1038
- type: "function",
1039
- },
1040
1042
  {
1041
1043
  inputs: [
1042
1044
  {
@@ -1306,16 +1308,37 @@ const _abi = [
1306
1308
  type: "function",
1307
1309
  },
1308
1310
  {
1309
- inputs: [],
1310
- name: "withdrawalManager",
1311
- outputs: [
1311
+ inputs: [
1312
1312
  {
1313
1313
  internalType: "address",
1314
- name: "",
1314
+ name: "creditAccount",
1315
+ type: "address",
1316
+ },
1317
+ {
1318
+ internalType: "address",
1319
+ name: "token",
1320
+ type: "address",
1321
+ },
1322
+ {
1323
+ internalType: "uint256",
1324
+ name: "amount",
1325
+ type: "uint256",
1326
+ },
1327
+ {
1328
+ internalType: "address",
1329
+ name: "to",
1315
1330
  type: "address",
1316
1331
  },
1317
1332
  ],
1318
- stateMutability: "view",
1333
+ name: "withdrawCollateral",
1334
+ outputs: [
1335
+ {
1336
+ internalType: "uint256",
1337
+ name: "tokensToDisable",
1338
+ type: "uint256",
1339
+ },
1340
+ ],
1341
+ stateMutability: "nonpayable",
1319
1342
  type: "function",
1320
1343
  },
1321
1344
  ];
@@ -24,6 +24,10 @@ export declare class ICurveV1Adapter__factory {
24
24
  readonly type: "function";
25
25
  }, {
26
26
  readonly inputs: readonly [{
27
+ readonly internalType: "uint256";
28
+ readonly name: "leftoverAmount";
29
+ readonly type: "uint256";
30
+ }, {
27
31
  readonly internalType: "uint256";
28
32
  readonly name: "i";
29
33
  readonly type: "uint256";
@@ -32,7 +36,7 @@ export declare class ICurveV1Adapter__factory {
32
36
  readonly name: "rateMinRAY";
33
37
  readonly type: "uint256";
34
38
  }];
35
- readonly name: "add_all_liquidity_one_coin";
39
+ readonly name: "add_diff_liquidity_one_coin";
36
40
  readonly outputs: readonly [{
37
41
  readonly internalType: "uint256";
38
42
  readonly name: "tokensToEnable";
@@ -179,36 +183,14 @@ export declare class ICurveV1Adapter__factory {
179
183
  readonly type: "uint256";
180
184
  }, {
181
185
  readonly internalType: "uint256";
182
- readonly name: "rateMinRAY";
183
- readonly type: "uint256";
184
- }];
185
- readonly name: "exchange_all";
186
- readonly outputs: readonly [{
187
- readonly internalType: "uint256";
188
- readonly name: "tokensToEnable";
186
+ readonly name: "leftoverAmount";
189
187
  readonly type: "uint256";
190
- }, {
191
- readonly internalType: "uint256";
192
- readonly name: "tokensToDisable";
193
- readonly type: "uint256";
194
- }];
195
- readonly stateMutability: "nonpayable";
196
- readonly type: "function";
197
- }, {
198
- readonly inputs: readonly [{
199
- readonly internalType: "int128";
200
- readonly name: "i";
201
- readonly type: "int128";
202
- }, {
203
- readonly internalType: "int128";
204
- readonly name: "j";
205
- readonly type: "int128";
206
188
  }, {
207
189
  readonly internalType: "uint256";
208
190
  readonly name: "rateMinRAY";
209
191
  readonly type: "uint256";
210
192
  }];
211
- readonly name: "exchange_all";
193
+ readonly name: "exchange_diff";
212
194
  readonly outputs: readonly [{
213
195
  readonly internalType: "uint256";
214
196
  readonly name: "tokensToEnable";
@@ -222,45 +204,23 @@ export declare class ICurveV1Adapter__factory {
222
204
  readonly type: "function";
223
205
  }, {
224
206
  readonly inputs: readonly [{
225
- readonly internalType: "int128";
226
- readonly name: "i";
227
- readonly type: "int128";
228
- }, {
229
- readonly internalType: "int128";
230
- readonly name: "j";
231
- readonly type: "int128";
232
- }, {
233
207
  readonly internalType: "uint256";
234
- readonly name: "rateMinRAY";
235
- readonly type: "uint256";
236
- }];
237
- readonly name: "exchange_all_underlying";
238
- readonly outputs: readonly [{
239
- readonly internalType: "uint256";
240
- readonly name: "tokensToEnable";
208
+ readonly name: "i";
241
209
  readonly type: "uint256";
242
210
  }, {
243
211
  readonly internalType: "uint256";
244
- readonly name: "tokensToDisable";
245
- readonly type: "uint256";
246
- }];
247
- readonly stateMutability: "nonpayable";
248
- readonly type: "function";
249
- }, {
250
- readonly inputs: readonly [{
251
- readonly internalType: "uint256";
252
- readonly name: "i";
212
+ readonly name: "j";
253
213
  readonly type: "uint256";
254
214
  }, {
255
215
  readonly internalType: "uint256";
256
- readonly name: "j";
216
+ readonly name: "leftoverAmount";
257
217
  readonly type: "uint256";
258
218
  }, {
259
219
  readonly internalType: "uint256";
260
220
  readonly name: "rateMinRAY";
261
221
  readonly type: "uint256";
262
222
  }];
263
- readonly name: "exchange_all_underlying";
223
+ readonly name: "exchange_diff_underlying";
264
224
  readonly outputs: readonly [{
265
225
  readonly internalType: "uint256";
266
226
  readonly name: "tokensToEnable";
@@ -374,28 +334,10 @@ export declare class ICurveV1Adapter__factory {
374
334
  readonly type: "function";
375
335
  }, {
376
336
  readonly inputs: readonly [{
377
- readonly internalType: "int128";
378
- readonly name: "i";
379
- readonly type: "int128";
380
- }, {
381
337
  readonly internalType: "uint256";
382
- readonly name: "rateMinRAY";
383
- readonly type: "uint256";
384
- }];
385
- readonly name: "remove_all_liquidity_one_coin";
386
- readonly outputs: readonly [{
387
- readonly internalType: "uint256";
388
- readonly name: "tokensToEnable";
338
+ readonly name: "leftoverAmount";
389
339
  readonly type: "uint256";
390
340
  }, {
391
- readonly internalType: "uint256";
392
- readonly name: "tokensToDisable";
393
- readonly type: "uint256";
394
- }];
395
- readonly stateMutability: "nonpayable";
396
- readonly type: "function";
397
- }, {
398
- readonly inputs: readonly [{
399
341
  readonly internalType: "uint256";
400
342
  readonly name: "i";
401
343
  readonly type: "uint256";
@@ -404,7 +346,7 @@ export declare class ICurveV1Adapter__factory {
404
346
  readonly name: "rateMinRAY";
405
347
  readonly type: "uint256";
406
348
  }];
407
- readonly name: "remove_all_liquidity_one_coin";
349
+ readonly name: "remove_diff_liquidity_one_coin";
408
350
  readonly outputs: readonly [{
409
351
  readonly internalType: "uint256";
410
352
  readonly name: "tokensToEnable";