@gearbox-protocol/sdk 1.3.3 → 1.5.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 (153) hide show
  1. package/lib/apy/index.d.ts +1 -0
  2. package/lib/core/adapter.d.ts +34 -0
  3. package/lib/core/adapter.js +76 -0
  4. package/lib/core/assets.d.ts +34 -0
  5. package/lib/core/assets.js +98 -0
  6. package/lib/core/constants.d.ts +1 -0
  7. package/lib/core/constants.js +3 -1
  8. package/lib/core/creditAccount.d.ts +14 -5
  9. package/lib/core/creditAccount.js +35 -3
  10. package/lib/core/creditManager.d.ts +12 -3
  11. package/lib/core/creditManager.js +34 -36
  12. package/lib/core/strategy.d.ts +15 -5
  13. package/lib/core/strategy.js +42 -7
  14. package/lib/core/trade.d.ts +49 -0
  15. package/lib/core/trade.js +70 -0
  16. package/lib/core/wcOperation.d.ts +54 -0
  17. package/lib/core/wcOperation.js +76 -0
  18. package/lib/index.d.ts +6 -0
  19. package/lib/index.js +6 -0
  20. package/lib/parsers/abstractParser.d.ts +18 -0
  21. package/lib/parsers/abstractParser.js +32 -0
  22. package/lib/parsers/convexBaseRewardPoolAdapterParser.d.ts +9 -0
  23. package/lib/parsers/convexBaseRewardPoolAdapterParser.js +60 -0
  24. package/lib/parsers/convexBaseRewardPoolAdapterParser.spec.d.ts +1 -0
  25. package/lib/parsers/convexBaseRewardPoolAdapterParser.spec.js +24 -0
  26. package/lib/parsers/convexBoosterAdapterParser.d.ts +10 -0
  27. package/lib/parsers/convexBoosterAdapterParser.js +62 -0
  28. package/lib/parsers/convexBoosterAdapterParser.spec.d.ts +1 -0
  29. package/lib/parsers/convexBoosterAdapterParser.spec.js +20 -0
  30. package/lib/parsers/creditFacadeParser.d.ts +9 -0
  31. package/lib/parsers/creditFacadeParser.js +66 -0
  32. package/lib/parsers/creditFacadeParser.spec.d.ts +1 -0
  33. package/lib/parsers/creditFacadeParser.spec.js +27 -0
  34. package/lib/parsers/curveAdapterParser.d.ts +12 -0
  35. package/lib/parsers/curveAdapterParser.js +106 -0
  36. package/lib/parsers/curveAdapterParser.spec.d.ts +1 -0
  37. package/lib/parsers/curveAdapterParser.spec.js +49 -0
  38. package/lib/parsers/iParser.d.ts +3 -0
  39. package/lib/{types/contracts/test/suites/mainnet/IPriceFeedsRegistry.js → parsers/iParser.js} +0 -0
  40. package/lib/parsers/lidoAdapterParser.d.ts +7 -0
  41. package/lib/parsers/lidoAdapterParser.js +46 -0
  42. package/lib/parsers/lidoAdapterParser.spec.d.ts +1 -0
  43. package/lib/parsers/lidoAdapterParser.spec.js +17 -0
  44. package/lib/parsers/txParser.d.ts +18 -0
  45. package/lib/parsers/txParser.js +122 -0
  46. package/lib/parsers/uniV2AdapterParser.d.ts +8 -0
  47. package/lib/parsers/uniV2AdapterParser.js +73 -0
  48. package/lib/parsers/uniV2AdapterParser.spec.d.ts +1 -0
  49. package/lib/parsers/uniV2AdapterParser.spec.js +48 -0
  50. package/lib/parsers/uniV3AdapterParser.d.ts +9 -0
  51. package/lib/parsers/uniV3AdapterParser.js +99 -0
  52. package/lib/parsers/uniV3AdapterParser.spec.d.ts +1 -0
  53. package/lib/parsers/uniV3AdapterParser.spec.js +82 -0
  54. package/lib/parsers/yearnAdapterParser.spec.d.ts +1 -0
  55. package/lib/parsers/yearnAdapterParser.spec.js +36 -0
  56. package/lib/parsers/yearnV2AdapterParser.d.ts +7 -0
  57. package/lib/parsers/yearnV2AdapterParser.js +54 -0
  58. package/lib/tokens/convex.d.ts +4 -2
  59. package/lib/tokens/convex.js +10 -1
  60. package/lib/tokens/decimals.d.ts +2 -0
  61. package/lib/tokens/decimals.js +62 -0
  62. package/lib/tokens/tokenType.d.ts +10 -9
  63. package/lib/tokens/tokenType.js +10 -9
  64. package/lib/types/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended.d.ts +66 -2
  65. package/lib/types/contracts/interfaces/adapters/curve/ICurveV1_2AssetsAdapter.d.ts +620 -0
  66. package/lib/types/contracts/interfaces/adapters/curve/ICurveV1_2AssetsAdapter.js +2 -0
  67. package/lib/types/contracts/interfaces/adapters/curve/ICurveV1_3AssetsAdapter.d.ts +622 -0
  68. package/lib/types/contracts/interfaces/adapters/curve/ICurveV1_3AssetsAdapter.js +2 -0
  69. package/lib/types/contracts/interfaces/adapters/curve/ICurveV1_4AssetsAdapter.d.ts +648 -0
  70. package/lib/types/contracts/interfaces/adapters/curve/ICurveV1_4AssetsAdapter.js +2 -0
  71. package/lib/types/contracts/interfaces/adapters/curve/index.d.ts +3 -0
  72. package/lib/types/contracts/interfaces/adapters/index.d.ts +2 -0
  73. package/lib/types/contracts/interfaces/adapters/yearn/IYearnV2Adapter.d.ts +330 -0
  74. package/lib/types/contracts/interfaces/adapters/yearn/IYearnV2Adapter.js +2 -0
  75. package/lib/types/contracts/interfaces/adapters/yearn/index.d.ts +1 -0
  76. package/lib/types/contracts/interfaces/adapters/yearn/index.js +2 -0
  77. package/lib/types/contracts/pathfinder/interfaces/IClosePathResolver.d.ts +28 -7
  78. package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/IDepositor.d.ts +30 -9
  79. package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions.d.ts +31 -10
  80. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker.d.ts +28 -7
  81. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions.d.ts +28 -7
  82. package/lib/types/contracts/pathfinder/interfaces/IPathFinder.d.ts +24 -0
  83. package/lib/types/contracts/pathfinder/interfaces/IPathFinderComponent.d.ts +50 -0
  84. package/lib/types/contracts/pathfinder/interfaces/IPathFinderComponent.js +2 -0
  85. package/lib/types/contracts/pathfinder/interfaces/IPathResolver.d.ts +29 -8
  86. package/lib/types/contracts/pathfinder/interfaces/ISwapAggregator.d.ts +99 -15
  87. package/lib/types/contracts/pathfinder/interfaces/ISwapper.d.ts +17 -1
  88. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer.d.ts +53 -9
  89. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions.d.ts +53 -9
  90. package/lib/types/contracts/pathfinder/interfaces/index.d.ts +1 -0
  91. package/lib/types/contracts/test/suites/mainnet/ITokenTestSuite.d.ts +110 -18
  92. package/lib/types/contracts/test/suites/mainnet/SupportedContracts.sol/ISupportedContracts.d.ts +50 -0
  93. package/lib/types/contracts/test/suites/mainnet/SupportedContracts.sol/ISupportedContracts.js +2 -0
  94. package/lib/types/contracts/test/suites/mainnet/SupportedContracts.sol/index.d.ts +1 -0
  95. package/lib/types/contracts/test/suites/mainnet/SupportedContracts.sol/index.js +2 -0
  96. package/lib/types/contracts/test/suites/mainnet/Tokens.sol/IToken.d.ts +60 -0
  97. package/lib/types/contracts/test/suites/mainnet/Tokens.sol/IToken.js +2 -0
  98. package/lib/types/contracts/test/suites/mainnet/Tokens.sol/index.d.ts +1 -0
  99. package/lib/types/contracts/test/suites/mainnet/Tokens.sol/index.js +2 -0
  100. package/lib/types/contracts/test/suites/mainnet/index.d.ts +4 -1
  101. package/lib/types/factories/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended__factory.js +62 -0
  102. package/lib/types/factories/contracts/{test/suites/mainnet/IPriceFeedsRegistry__factory.d.ts → interfaces/adapters/curve/ICurveV1_2AssetsAdapter__factory.d.ts} +4 -4
  103. package/lib/types/factories/contracts/interfaces/adapters/curve/ICurveV1_2AssetsAdapter__factory.js +1066 -0
  104. package/lib/types/factories/contracts/interfaces/adapters/curve/ICurveV1_3AssetsAdapter__factory.d.ts +32 -0
  105. package/lib/types/factories/contracts/interfaces/adapters/curve/ICurveV1_3AssetsAdapter__factory.js +1066 -0
  106. package/lib/types/factories/contracts/interfaces/adapters/curve/ICurveV1_4AssetsAdapter__factory.d.ts +32 -0
  107. package/lib/types/factories/contracts/interfaces/adapters/curve/ICurveV1_4AssetsAdapter__factory.js +1066 -0
  108. package/lib/types/factories/contracts/interfaces/adapters/curve/index.d.ts +3 -0
  109. package/lib/types/factories/contracts/interfaces/adapters/curve/index.js +7 -1
  110. package/lib/types/factories/contracts/interfaces/adapters/index.d.ts +1 -0
  111. package/lib/types/factories/contracts/interfaces/adapters/index.js +2 -1
  112. package/lib/types/factories/contracts/interfaces/adapters/yearn/IYearnV2Adapter__factory.d.ts +46 -0
  113. package/lib/types/factories/contracts/interfaces/adapters/yearn/IYearnV2Adapter__factory.js +487 -0
  114. package/lib/types/factories/contracts/interfaces/adapters/yearn/index.d.ts +1 -0
  115. package/lib/types/factories/contracts/interfaces/adapters/yearn/index.js +8 -0
  116. package/lib/types/factories/contracts/pathfinder/interfaces/IClosePathResolver__factory.d.ts +12 -2
  117. package/lib/types/factories/contracts/pathfinder/interfaces/IClosePathResolver__factory.js +54 -8
  118. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions__factory.js +138 -32
  119. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositor__factory.js +110 -24
  120. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions__factory.js +54 -8
  121. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker__factory.js +54 -8
  122. package/lib/types/factories/contracts/pathfinder/interfaces/IPathFinderComponent__factory.d.ts +18 -0
  123. package/lib/types/factories/contracts/pathfinder/interfaces/IPathFinderComponent__factory.js +48 -0
  124. package/lib/types/factories/contracts/pathfinder/interfaces/IPathFinder__factory.js +32 -0
  125. package/lib/types/factories/contracts/pathfinder/interfaces/IPathResolver__factory.d.ts +12 -2
  126. package/lib/types/factories/contracts/pathfinder/interfaces/IPathResolver__factory.js +82 -16
  127. package/lib/types/factories/contracts/pathfinder/interfaces/ISwapAggregator__factory.js +877 -56
  128. package/lib/types/factories/contracts/pathfinder/interfaces/ISwapper__factory.d.ts +12 -2
  129. package/lib/types/factories/contracts/pathfinder/interfaces/ISwapper__factory.js +26 -0
  130. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions__factory.js +365 -24
  131. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer__factory.js +355 -24
  132. package/lib/types/factories/contracts/pathfinder/interfaces/index.d.ts +1 -0
  133. package/lib/types/factories/contracts/pathfinder/interfaces/index.js +3 -1
  134. package/lib/types/factories/contracts/support/MultiCall.sol/Multicall2__factory.d.ts +1 -1
  135. package/lib/types/factories/contracts/support/MultiCall.sol/Multicall2__factory.js +1 -1
  136. package/lib/types/factories/contracts/test/suites/mainnet/ITokenTestSuite__factory.d.ts +2 -12
  137. package/lib/types/factories/contracts/test/suites/mainnet/ITokenTestSuite__factory.js +140 -12
  138. package/lib/types/factories/contracts/test/suites/mainnet/SupportedContracts.sol/ISupportedContracts__factory.d.ts +22 -0
  139. package/lib/types/factories/contracts/test/suites/mainnet/{IPriceFeedsRegistry__factory.js → SupportedContracts.sol/ISupportedContracts__factory.js} +25 -17
  140. package/lib/types/factories/contracts/test/suites/mainnet/SupportedContracts.sol/index.d.ts +1 -0
  141. package/lib/types/factories/contracts/test/suites/mainnet/SupportedContracts.sol/index.js +8 -0
  142. package/lib/types/factories/contracts/test/suites/mainnet/Tokens.sol/IToken__factory.d.ts +22 -0
  143. package/lib/types/factories/contracts/test/suites/mainnet/Tokens.sol/IToken__factory.js +79 -0
  144. package/lib/types/factories/contracts/test/suites/mainnet/Tokens.sol/index.d.ts +1 -0
  145. package/lib/types/factories/contracts/test/suites/mainnet/Tokens.sol/index.js +8 -0
  146. package/lib/types/factories/contracts/test/suites/mainnet/index.d.ts +2 -1
  147. package/lib/types/factories/contracts/test/suites/mainnet/index.js +26 -3
  148. package/lib/types/index.d.ts +14 -2
  149. package/lib/types/index.js +17 -5
  150. package/lib/utils/math.d.ts +1 -0
  151. package/lib/utils/math.js +5 -1
  152. package/package.json +6 -2
  153. package/lib/types/contracts/test/suites/mainnet/IPriceFeedsRegistry.d.ts +0 -42
@@ -0,0 +1,1066 @@
1
+ "use strict";
2
+ /* Autogenerated file. Do not edit manually. */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ICurveV1_2AssetsAdapter__factory = void 0;
7
+ var ethers_1 = require("ethers");
8
+ var _abi = [
9
+ {
10
+ inputs: [],
11
+ name: "IncorrectIndexException",
12
+ type: "error",
13
+ },
14
+ {
15
+ inputs: [
16
+ {
17
+ internalType: "address",
18
+ name: "",
19
+ type: "address",
20
+ },
21
+ ],
22
+ name: "TokenIsNotInAllowedList",
23
+ type: "error",
24
+ },
25
+ {
26
+ inputs: [],
27
+ name: "A",
28
+ outputs: [
29
+ {
30
+ internalType: "uint256",
31
+ name: "",
32
+ type: "uint256",
33
+ },
34
+ ],
35
+ stateMutability: "view",
36
+ type: "function",
37
+ },
38
+ {
39
+ inputs: [],
40
+ name: "A_precise",
41
+ outputs: [
42
+ {
43
+ internalType: "uint256",
44
+ name: "",
45
+ type: "uint256",
46
+ },
47
+ ],
48
+ stateMutability: "view",
49
+ type: "function",
50
+ },
51
+ {
52
+ inputs: [],
53
+ name: "_gearboxAdapterType",
54
+ outputs: [
55
+ {
56
+ internalType: "enum AdapterType",
57
+ name: "",
58
+ type: "uint8",
59
+ },
60
+ ],
61
+ stateMutability: "pure",
62
+ type: "function",
63
+ },
64
+ {
65
+ inputs: [],
66
+ name: "_gearboxAdapterVersion",
67
+ outputs: [
68
+ {
69
+ internalType: "uint16",
70
+ name: "",
71
+ type: "uint16",
72
+ },
73
+ ],
74
+ stateMutability: "pure",
75
+ type: "function",
76
+ },
77
+ {
78
+ inputs: [
79
+ {
80
+ internalType: "int128",
81
+ name: "i",
82
+ type: "int128",
83
+ },
84
+ {
85
+ internalType: "uint256",
86
+ name: "rateMinRAY",
87
+ type: "uint256",
88
+ },
89
+ ],
90
+ name: "add_all_liquidity_one_coin",
91
+ outputs: [],
92
+ stateMutability: "nonpayable",
93
+ type: "function",
94
+ },
95
+ {
96
+ inputs: [
97
+ {
98
+ internalType: "uint256[2]",
99
+ name: "amounts",
100
+ type: "uint256[2]",
101
+ },
102
+ {
103
+ internalType: "uint256",
104
+ name: "min_mint_amount",
105
+ type: "uint256",
106
+ },
107
+ ],
108
+ name: "add_liquidity",
109
+ outputs: [],
110
+ stateMutability: "nonpayable",
111
+ type: "function",
112
+ },
113
+ {
114
+ inputs: [
115
+ {
116
+ internalType: "uint256",
117
+ name: "amount",
118
+ type: "uint256",
119
+ },
120
+ {
121
+ internalType: "int128",
122
+ name: "i",
123
+ type: "int128",
124
+ },
125
+ {
126
+ internalType: "uint256",
127
+ name: "minAmount",
128
+ type: "uint256",
129
+ },
130
+ ],
131
+ name: "add_liquidity_one_coin",
132
+ outputs: [],
133
+ stateMutability: "nonpayable",
134
+ type: "function",
135
+ },
136
+ {
137
+ inputs: [],
138
+ name: "admin",
139
+ outputs: [
140
+ {
141
+ internalType: "address",
142
+ name: "",
143
+ type: "address",
144
+ },
145
+ ],
146
+ stateMutability: "view",
147
+ type: "function",
148
+ },
149
+ {
150
+ inputs: [
151
+ {
152
+ internalType: "uint256",
153
+ name: "i",
154
+ type: "uint256",
155
+ },
156
+ ],
157
+ name: "admin_balances",
158
+ outputs: [
159
+ {
160
+ internalType: "uint256",
161
+ name: "",
162
+ type: "uint256",
163
+ },
164
+ ],
165
+ stateMutability: "view",
166
+ type: "function",
167
+ },
168
+ {
169
+ inputs: [],
170
+ name: "admin_fee",
171
+ outputs: [
172
+ {
173
+ internalType: "uint256",
174
+ name: "",
175
+ type: "uint256",
176
+ },
177
+ ],
178
+ stateMutability: "view",
179
+ type: "function",
180
+ },
181
+ {
182
+ inputs: [
183
+ {
184
+ internalType: "address",
185
+ name: "",
186
+ type: "address",
187
+ },
188
+ {
189
+ internalType: "address",
190
+ name: "",
191
+ type: "address",
192
+ },
193
+ ],
194
+ name: "allowance",
195
+ outputs: [
196
+ {
197
+ internalType: "uint256",
198
+ name: "",
199
+ type: "uint256",
200
+ },
201
+ ],
202
+ stateMutability: "view",
203
+ type: "function",
204
+ },
205
+ {
206
+ inputs: [
207
+ {
208
+ internalType: "address",
209
+ name: "",
210
+ type: "address",
211
+ },
212
+ ],
213
+ name: "balanceOf",
214
+ outputs: [
215
+ {
216
+ internalType: "uint256",
217
+ name: "",
218
+ type: "uint256",
219
+ },
220
+ ],
221
+ stateMutability: "view",
222
+ type: "function",
223
+ },
224
+ {
225
+ inputs: [
226
+ {
227
+ internalType: "int128",
228
+ name: "",
229
+ type: "int128",
230
+ },
231
+ ],
232
+ name: "balances",
233
+ outputs: [
234
+ {
235
+ internalType: "uint256",
236
+ name: "",
237
+ type: "uint256",
238
+ },
239
+ ],
240
+ stateMutability: "view",
241
+ type: "function",
242
+ },
243
+ {
244
+ inputs: [
245
+ {
246
+ internalType: "uint256",
247
+ name: "i",
248
+ type: "uint256",
249
+ },
250
+ ],
251
+ name: "balances",
252
+ outputs: [
253
+ {
254
+ internalType: "uint256",
255
+ name: "",
256
+ type: "uint256",
257
+ },
258
+ ],
259
+ stateMutability: "view",
260
+ type: "function",
261
+ },
262
+ {
263
+ inputs: [],
264
+ name: "block_timestamp_last",
265
+ outputs: [
266
+ {
267
+ internalType: "uint256",
268
+ name: "",
269
+ type: "uint256",
270
+ },
271
+ ],
272
+ stateMutability: "view",
273
+ type: "function",
274
+ },
275
+ {
276
+ inputs: [
277
+ {
278
+ internalType: "uint256",
279
+ name: "amount",
280
+ type: "uint256",
281
+ },
282
+ {
283
+ internalType: "int128",
284
+ name: "i",
285
+ type: "int128",
286
+ },
287
+ ],
288
+ name: "calc_add_one_coin",
289
+ outputs: [
290
+ {
291
+ internalType: "uint256",
292
+ name: "",
293
+ type: "uint256",
294
+ },
295
+ ],
296
+ stateMutability: "view",
297
+ type: "function",
298
+ },
299
+ {
300
+ inputs: [
301
+ {
302
+ internalType: "uint256[2]",
303
+ name: "_amounts",
304
+ type: "uint256[2]",
305
+ },
306
+ {
307
+ internalType: "bool",
308
+ name: "_is_deposit",
309
+ type: "bool",
310
+ },
311
+ ],
312
+ name: "calc_token_amount",
313
+ outputs: [
314
+ {
315
+ internalType: "uint256",
316
+ name: "",
317
+ type: "uint256",
318
+ },
319
+ ],
320
+ stateMutability: "view",
321
+ type: "function",
322
+ },
323
+ {
324
+ inputs: [
325
+ {
326
+ internalType: "uint256",
327
+ name: "_burn_amount",
328
+ type: "uint256",
329
+ },
330
+ {
331
+ internalType: "int128",
332
+ name: "i",
333
+ type: "int128",
334
+ },
335
+ ],
336
+ name: "calc_withdraw_one_coin",
337
+ outputs: [
338
+ {
339
+ internalType: "uint256",
340
+ name: "",
341
+ type: "uint256",
342
+ },
343
+ ],
344
+ stateMutability: "view",
345
+ type: "function",
346
+ },
347
+ {
348
+ inputs: [
349
+ {
350
+ internalType: "int128",
351
+ name: "",
352
+ type: "int128",
353
+ },
354
+ ],
355
+ name: "coins",
356
+ outputs: [
357
+ {
358
+ internalType: "address",
359
+ name: "",
360
+ type: "address",
361
+ },
362
+ ],
363
+ stateMutability: "view",
364
+ type: "function",
365
+ },
366
+ {
367
+ inputs: [
368
+ {
369
+ internalType: "uint256",
370
+ name: "i",
371
+ type: "uint256",
372
+ },
373
+ ],
374
+ name: "coins",
375
+ outputs: [
376
+ {
377
+ internalType: "address",
378
+ name: "",
379
+ type: "address",
380
+ },
381
+ ],
382
+ stateMutability: "view",
383
+ type: "function",
384
+ },
385
+ {
386
+ inputs: [],
387
+ name: "creditFacade",
388
+ outputs: [
389
+ {
390
+ internalType: "address",
391
+ name: "",
392
+ type: "address",
393
+ },
394
+ ],
395
+ stateMutability: "view",
396
+ type: "function",
397
+ },
398
+ {
399
+ inputs: [],
400
+ name: "creditManager",
401
+ outputs: [
402
+ {
403
+ internalType: "contract ICreditManagerV2",
404
+ name: "",
405
+ type: "address",
406
+ },
407
+ ],
408
+ stateMutability: "view",
409
+ type: "function",
410
+ },
411
+ {
412
+ inputs: [],
413
+ name: "decimals",
414
+ outputs: [
415
+ {
416
+ internalType: "uint256",
417
+ name: "",
418
+ type: "uint256",
419
+ },
420
+ ],
421
+ stateMutability: "view",
422
+ type: "function",
423
+ },
424
+ {
425
+ inputs: [
426
+ {
427
+ internalType: "int128",
428
+ name: "i",
429
+ type: "int128",
430
+ },
431
+ {
432
+ internalType: "int128",
433
+ name: "j",
434
+ type: "int128",
435
+ },
436
+ {
437
+ internalType: "uint256",
438
+ name: "dx",
439
+ type: "uint256",
440
+ },
441
+ {
442
+ internalType: "uint256",
443
+ name: "min_dy",
444
+ type: "uint256",
445
+ },
446
+ ],
447
+ name: "exchange",
448
+ outputs: [],
449
+ stateMutability: "nonpayable",
450
+ type: "function",
451
+ },
452
+ {
453
+ inputs: [
454
+ {
455
+ internalType: "int128",
456
+ name: "i",
457
+ type: "int128",
458
+ },
459
+ {
460
+ internalType: "int128",
461
+ name: "j",
462
+ type: "int128",
463
+ },
464
+ {
465
+ internalType: "uint256",
466
+ name: "rateMinRAY",
467
+ type: "uint256",
468
+ },
469
+ ],
470
+ name: "exchange_all",
471
+ outputs: [],
472
+ stateMutability: "nonpayable",
473
+ type: "function",
474
+ },
475
+ {
476
+ inputs: [
477
+ {
478
+ internalType: "int128",
479
+ name: "i",
480
+ type: "int128",
481
+ },
482
+ {
483
+ internalType: "int128",
484
+ name: "j",
485
+ type: "int128",
486
+ },
487
+ {
488
+ internalType: "uint256",
489
+ name: "rateMinRAY",
490
+ type: "uint256",
491
+ },
492
+ ],
493
+ name: "exchange_all_underlying",
494
+ outputs: [],
495
+ stateMutability: "nonpayable",
496
+ type: "function",
497
+ },
498
+ {
499
+ inputs: [
500
+ {
501
+ internalType: "int128",
502
+ name: "i",
503
+ type: "int128",
504
+ },
505
+ {
506
+ internalType: "int128",
507
+ name: "j",
508
+ type: "int128",
509
+ },
510
+ {
511
+ internalType: "uint256",
512
+ name: "dx",
513
+ type: "uint256",
514
+ },
515
+ {
516
+ internalType: "uint256",
517
+ name: "min_dy",
518
+ type: "uint256",
519
+ },
520
+ ],
521
+ name: "exchange_underlying",
522
+ outputs: [],
523
+ stateMutability: "nonpayable",
524
+ type: "function",
525
+ },
526
+ {
527
+ inputs: [],
528
+ name: "fee",
529
+ outputs: [
530
+ {
531
+ internalType: "uint256",
532
+ name: "",
533
+ type: "uint256",
534
+ },
535
+ ],
536
+ stateMutability: "view",
537
+ type: "function",
538
+ },
539
+ {
540
+ inputs: [],
541
+ name: "future_A",
542
+ outputs: [
543
+ {
544
+ internalType: "uint256",
545
+ name: "",
546
+ type: "uint256",
547
+ },
548
+ ],
549
+ stateMutability: "view",
550
+ type: "function",
551
+ },
552
+ {
553
+ inputs: [],
554
+ name: "future_A_time",
555
+ outputs: [
556
+ {
557
+ internalType: "uint256",
558
+ name: "",
559
+ type: "uint256",
560
+ },
561
+ ],
562
+ stateMutability: "view",
563
+ type: "function",
564
+ },
565
+ {
566
+ inputs: [],
567
+ name: "get_balances",
568
+ outputs: [
569
+ {
570
+ internalType: "uint256[2]",
571
+ name: "",
572
+ type: "uint256[2]",
573
+ },
574
+ ],
575
+ stateMutability: "view",
576
+ type: "function",
577
+ },
578
+ {
579
+ inputs: [
580
+ {
581
+ internalType: "int128",
582
+ name: "i",
583
+ type: "int128",
584
+ },
585
+ {
586
+ internalType: "int128",
587
+ name: "j",
588
+ type: "int128",
589
+ },
590
+ {
591
+ internalType: "uint256",
592
+ name: "dx",
593
+ type: "uint256",
594
+ },
595
+ ],
596
+ name: "get_dy",
597
+ outputs: [
598
+ {
599
+ internalType: "uint256",
600
+ name: "",
601
+ type: "uint256",
602
+ },
603
+ ],
604
+ stateMutability: "view",
605
+ type: "function",
606
+ },
607
+ {
608
+ inputs: [
609
+ {
610
+ internalType: "int128",
611
+ name: "i",
612
+ type: "int128",
613
+ },
614
+ {
615
+ internalType: "int128",
616
+ name: "j",
617
+ type: "int128",
618
+ },
619
+ {
620
+ internalType: "uint256",
621
+ name: "dx",
622
+ type: "uint256",
623
+ },
624
+ ],
625
+ name: "get_dy_underlying",
626
+ outputs: [
627
+ {
628
+ internalType: "uint256",
629
+ name: "",
630
+ type: "uint256",
631
+ },
632
+ ],
633
+ stateMutability: "view",
634
+ type: "function",
635
+ },
636
+ {
637
+ inputs: [],
638
+ name: "get_previous_balances",
639
+ outputs: [
640
+ {
641
+ internalType: "uint256[2]",
642
+ name: "",
643
+ type: "uint256[2]",
644
+ },
645
+ ],
646
+ stateMutability: "view",
647
+ type: "function",
648
+ },
649
+ {
650
+ inputs: [],
651
+ name: "get_price_cumulative_last",
652
+ outputs: [
653
+ {
654
+ internalType: "uint256[2]",
655
+ name: "",
656
+ type: "uint256[2]",
657
+ },
658
+ ],
659
+ stateMutability: "view",
660
+ type: "function",
661
+ },
662
+ {
663
+ inputs: [
664
+ {
665
+ internalType: "uint256[2]",
666
+ name: "_first_balances",
667
+ type: "uint256[2]",
668
+ },
669
+ {
670
+ internalType: "uint256[2]",
671
+ name: "_last_balances",
672
+ type: "uint256[2]",
673
+ },
674
+ {
675
+ internalType: "uint256",
676
+ name: "_time_elapsed",
677
+ type: "uint256",
678
+ },
679
+ ],
680
+ name: "get_twap_balances",
681
+ outputs: [
682
+ {
683
+ internalType: "uint256[2]",
684
+ name: "",
685
+ type: "uint256[2]",
686
+ },
687
+ ],
688
+ stateMutability: "view",
689
+ type: "function",
690
+ },
691
+ {
692
+ inputs: [],
693
+ name: "get_virtual_price",
694
+ outputs: [
695
+ {
696
+ internalType: "uint256",
697
+ name: "",
698
+ type: "uint256",
699
+ },
700
+ ],
701
+ stateMutability: "view",
702
+ type: "function",
703
+ },
704
+ {
705
+ inputs: [],
706
+ name: "initial_A",
707
+ outputs: [
708
+ {
709
+ internalType: "uint256",
710
+ name: "",
711
+ type: "uint256",
712
+ },
713
+ ],
714
+ stateMutability: "view",
715
+ type: "function",
716
+ },
717
+ {
718
+ inputs: [],
719
+ name: "initial_A_time",
720
+ outputs: [
721
+ {
722
+ internalType: "uint256",
723
+ name: "",
724
+ type: "uint256",
725
+ },
726
+ ],
727
+ stateMutability: "view",
728
+ type: "function",
729
+ },
730
+ {
731
+ inputs: [],
732
+ name: "lp_token",
733
+ outputs: [
734
+ {
735
+ internalType: "address",
736
+ name: "",
737
+ type: "address",
738
+ },
739
+ ],
740
+ stateMutability: "view",
741
+ type: "function",
742
+ },
743
+ {
744
+ inputs: [],
745
+ name: "metapoolBase",
746
+ outputs: [
747
+ {
748
+ internalType: "address",
749
+ name: "",
750
+ type: "address",
751
+ },
752
+ ],
753
+ stateMutability: "view",
754
+ type: "function",
755
+ },
756
+ {
757
+ inputs: [],
758
+ name: "nCoins",
759
+ outputs: [
760
+ {
761
+ internalType: "uint256",
762
+ name: "",
763
+ type: "uint256",
764
+ },
765
+ ],
766
+ stateMutability: "view",
767
+ type: "function",
768
+ },
769
+ {
770
+ inputs: [],
771
+ name: "name",
772
+ outputs: [
773
+ {
774
+ internalType: "string",
775
+ name: "",
776
+ type: "string",
777
+ },
778
+ ],
779
+ stateMutability: "view",
780
+ type: "function",
781
+ },
782
+ {
783
+ inputs: [
784
+ {
785
+ internalType: "int128",
786
+ name: "i",
787
+ type: "int128",
788
+ },
789
+ {
790
+ internalType: "uint256",
791
+ name: "minRateRAY",
792
+ type: "uint256",
793
+ },
794
+ ],
795
+ name: "remove_all_liquidity_one_coin",
796
+ outputs: [],
797
+ stateMutability: "nonpayable",
798
+ type: "function",
799
+ },
800
+ {
801
+ inputs: [
802
+ {
803
+ internalType: "uint256",
804
+ name: "_amount",
805
+ type: "uint256",
806
+ },
807
+ {
808
+ internalType: "uint256[2]",
809
+ name: "min_amounts",
810
+ type: "uint256[2]",
811
+ },
812
+ ],
813
+ name: "remove_liquidity",
814
+ outputs: [],
815
+ stateMutability: "nonpayable",
816
+ type: "function",
817
+ },
818
+ {
819
+ inputs: [
820
+ {
821
+ internalType: "uint256[2]",
822
+ name: "amounts",
823
+ type: "uint256[2]",
824
+ },
825
+ {
826
+ internalType: "uint256",
827
+ name: "max_burn_amount",
828
+ type: "uint256",
829
+ },
830
+ ],
831
+ name: "remove_liquidity_imbalance",
832
+ outputs: [],
833
+ stateMutability: "nonpayable",
834
+ type: "function",
835
+ },
836
+ {
837
+ inputs: [
838
+ {
839
+ internalType: "uint256",
840
+ name: "_token_amount",
841
+ type: "uint256",
842
+ },
843
+ {
844
+ internalType: "int128",
845
+ name: "i",
846
+ type: "int128",
847
+ },
848
+ {
849
+ internalType: "uint256",
850
+ name: "min_amount",
851
+ type: "uint256",
852
+ },
853
+ ],
854
+ name: "remove_liquidity_one_coin",
855
+ outputs: [],
856
+ stateMutability: "nonpayable",
857
+ type: "function",
858
+ },
859
+ {
860
+ inputs: [],
861
+ name: "symbol",
862
+ outputs: [
863
+ {
864
+ internalType: "string",
865
+ name: "",
866
+ type: "string",
867
+ },
868
+ ],
869
+ stateMutability: "view",
870
+ type: "function",
871
+ },
872
+ {
873
+ inputs: [],
874
+ name: "targetContract",
875
+ outputs: [
876
+ {
877
+ internalType: "address",
878
+ name: "",
879
+ type: "address",
880
+ },
881
+ ],
882
+ stateMutability: "view",
883
+ type: "function",
884
+ },
885
+ {
886
+ inputs: [],
887
+ name: "token",
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: "token0",
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: "token1",
914
+ outputs: [
915
+ {
916
+ internalType: "address",
917
+ name: "",
918
+ type: "address",
919
+ },
920
+ ],
921
+ stateMutability: "view",
922
+ type: "function",
923
+ },
924
+ {
925
+ inputs: [],
926
+ name: "token2",
927
+ outputs: [
928
+ {
929
+ internalType: "address",
930
+ name: "",
931
+ type: "address",
932
+ },
933
+ ],
934
+ stateMutability: "view",
935
+ type: "function",
936
+ },
937
+ {
938
+ inputs: [],
939
+ name: "token3",
940
+ outputs: [
941
+ {
942
+ internalType: "address",
943
+ name: "",
944
+ type: "address",
945
+ },
946
+ ],
947
+ stateMutability: "view",
948
+ type: "function",
949
+ },
950
+ {
951
+ inputs: [],
952
+ name: "totalSupply",
953
+ outputs: [
954
+ {
955
+ internalType: "uint256",
956
+ name: "",
957
+ type: "uint256",
958
+ },
959
+ ],
960
+ stateMutability: "view",
961
+ type: "function",
962
+ },
963
+ {
964
+ inputs: [],
965
+ name: "underlying0",
966
+ outputs: [
967
+ {
968
+ internalType: "address",
969
+ name: "",
970
+ type: "address",
971
+ },
972
+ ],
973
+ stateMutability: "view",
974
+ type: "function",
975
+ },
976
+ {
977
+ inputs: [],
978
+ name: "underlying1",
979
+ outputs: [
980
+ {
981
+ internalType: "address",
982
+ name: "",
983
+ type: "address",
984
+ },
985
+ ],
986
+ stateMutability: "view",
987
+ type: "function",
988
+ },
989
+ {
990
+ inputs: [],
991
+ name: "underlying2",
992
+ outputs: [
993
+ {
994
+ internalType: "address",
995
+ name: "",
996
+ type: "address",
997
+ },
998
+ ],
999
+ stateMutability: "view",
1000
+ type: "function",
1001
+ },
1002
+ {
1003
+ inputs: [],
1004
+ name: "underlying3",
1005
+ outputs: [
1006
+ {
1007
+ internalType: "address",
1008
+ name: "",
1009
+ type: "address",
1010
+ },
1011
+ ],
1012
+ stateMutability: "view",
1013
+ type: "function",
1014
+ },
1015
+ {
1016
+ inputs: [
1017
+ {
1018
+ internalType: "int128",
1019
+ name: "",
1020
+ type: "int128",
1021
+ },
1022
+ ],
1023
+ name: "underlying_coins",
1024
+ outputs: [
1025
+ {
1026
+ internalType: "address",
1027
+ name: "",
1028
+ type: "address",
1029
+ },
1030
+ ],
1031
+ stateMutability: "view",
1032
+ type: "function",
1033
+ },
1034
+ {
1035
+ inputs: [
1036
+ {
1037
+ internalType: "uint256",
1038
+ name: "i",
1039
+ type: "uint256",
1040
+ },
1041
+ ],
1042
+ name: "underlying_coins",
1043
+ outputs: [
1044
+ {
1045
+ internalType: "address",
1046
+ name: "",
1047
+ type: "address",
1048
+ },
1049
+ ],
1050
+ stateMutability: "view",
1051
+ type: "function",
1052
+ },
1053
+ ];
1054
+ var ICurveV1_2AssetsAdapter__factory = /** @class */ (function () {
1055
+ function ICurveV1_2AssetsAdapter__factory() {
1056
+ }
1057
+ ICurveV1_2AssetsAdapter__factory.createInterface = function () {
1058
+ return new ethers_1.utils.Interface(_abi);
1059
+ };
1060
+ ICurveV1_2AssetsAdapter__factory.connect = function (address, signerOrProvider) {
1061
+ return new ethers_1.Contract(address, _abi, signerOrProvider);
1062
+ };
1063
+ ICurveV1_2AssetsAdapter__factory.abi = _abi;
1064
+ return ICurveV1_2AssetsAdapter__factory;
1065
+ }());
1066
+ exports.ICurveV1_2AssetsAdapter__factory = ICurveV1_2AssetsAdapter__factory;