@pendle/core-v2 0.1.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 (182) hide show
  1. package/LICENSE +100 -0
  2. package/contracts/SuperComposableYield/ISuperComposableYield.sol +68 -0
  3. package/contracts/SuperComposableYield/SCYUtils.sol +14 -0
  4. package/contracts/SuperComposableYield/implementations/RewardManager.sol +117 -0
  5. package/contracts/SuperComposableYield/implementations/SCYBase.sol +126 -0
  6. package/contracts/SuperComposableYield/implementations/SCYBaseWithRewards.sol +79 -0
  7. package/contracts/core/PendleBaseToken.sol +39 -0
  8. package/contracts/core/PendleMarket.sol +248 -0
  9. package/contracts/core/PendleMarketFactory.sol +60 -0
  10. package/contracts/core/PendleOwnershipToken.sol +44 -0
  11. package/contracts/core/PendleSCYImpl/AaveV3/PendleAaveV3SCY.sol +139 -0
  12. package/contracts/core/PendleSCYImpl/AaveV3/WadRayMath.sol +126 -0
  13. package/contracts/core/PendleSCYImpl/PendleBenQiErc20SCY.sol +127 -0
  14. package/contracts/core/PendleSCYImpl/PendleBtrflySCY.sol +125 -0
  15. package/contracts/core/PendleSCYImpl/PendleYearnVaultSCY.sol +115 -0
  16. package/contracts/core/PendleYieldContractFactory.sol +109 -0
  17. package/contracts/core/PendleYieldToken.sol +240 -0
  18. package/contracts/core/misc/BoringOwnable.sol +62 -0
  19. package/contracts/core/misc/BoringOwnableUpg.sol +64 -0
  20. package/contracts/core/misc/PendleJoeSwapHelperUpg.sol +82 -0
  21. package/contracts/core/router/PendleRouterCoreUpg.sol +219 -0
  22. package/contracts/core/router/PendleRouterProxy.sol +64 -0
  23. package/contracts/core/router/PendleRouterYTUpg.sol +134 -0
  24. package/contracts/core/router/base/PendleRouterOTBaseUpg.sol +218 -0
  25. package/contracts/core/router/base/PendleRouterSCYAndForgeBaseUpg.sol +141 -0
  26. package/contracts/core/router/base/PendleRouterYTBaseUpg.sol +212 -0
  27. package/contracts/interfaces/IAToken.sol +34 -0
  28. package/contracts/interfaces/IAavePool.sol +41 -0
  29. package/contracts/interfaces/IAaveRewardsController.sol +32 -0
  30. package/contracts/interfaces/IBenQiComptroller.sol +33 -0
  31. package/contracts/interfaces/IJoePair.sol +98 -0
  32. package/contracts/interfaces/IJoeRouter01.sol +162 -0
  33. package/contracts/interfaces/IPBaseToken.sol +9 -0
  34. package/contracts/interfaces/IPFlashCallBack.sol +10 -0
  35. package/contracts/interfaces/IPGovernanceManager.sol +28 -0
  36. package/contracts/interfaces/IPMarket.sol +57 -0
  37. package/contracts/interfaces/IPMarketAddRemoveCallback.sol +18 -0
  38. package/contracts/interfaces/IPMarketFactory.sol +8 -0
  39. package/contracts/interfaces/IPMarketSwapCallback.sol +10 -0
  40. package/contracts/interfaces/IPOwnershipToken.sol +15 -0
  41. package/contracts/interfaces/IPPermissionsV2.sol +28 -0
  42. package/contracts/interfaces/IPRouterCore.sol +108 -0
  43. package/contracts/interfaces/IPRouterYT.sol +47 -0
  44. package/contracts/interfaces/IPYieldContractFactory.sol +36 -0
  45. package/contracts/interfaces/IPYieldToken.sol +19 -0
  46. package/contracts/interfaces/IQiErc20.sol +35 -0
  47. package/contracts/interfaces/IQiToken.sol +29 -0
  48. package/contracts/interfaces/IREDACTEDStaking.sol +35 -0
  49. package/contracts/interfaces/IWETH.sol +34 -0
  50. package/contracts/interfaces/IWXBTRFLY.sol +37 -0
  51. package/contracts/interfaces/IYearnVault.sol +32 -0
  52. package/contracts/libraries/JoeLibrary.sol +121 -0
  53. package/contracts/libraries/SCYIndex.sol +55 -0
  54. package/contracts/libraries/helpers/ExpiryUtilsLib.sol +166 -0
  55. package/contracts/libraries/math/FixedPoint.sol +208 -0
  56. package/contracts/libraries/math/LogExpMath.sol +515 -0
  57. package/contracts/libraries/math/MarketApproxLib.sol +140 -0
  58. package/contracts/libraries/math/MarketMathLib.sol +606 -0
  59. package/contracts/periphery/PendleGovernanceManager.sol +36 -0
  60. package/contracts/periphery/PermissionsV2.sol +23 -0
  61. package/package.json +76 -0
  62. package/typechain-types/BoringOwnable.ts +194 -0
  63. package/typechain-types/BoringOwnableData.ts +100 -0
  64. package/typechain-types/BoringOwnableUpg.ts +194 -0
  65. package/typechain-types/BoringOwnableUpgData.ts +100 -0
  66. package/typechain-types/ERC1967UpgradeUpgradeable.ts +97 -0
  67. package/typechain-types/ERC20.ts +417 -0
  68. package/typechain-types/IAToken.ts +331 -0
  69. package/typechain-types/IAavePool.ts +192 -0
  70. package/typechain-types/IAaveRewardsController.ts +148 -0
  71. package/typechain-types/IBeaconUpgradeable.ts +87 -0
  72. package/typechain-types/IBenQiComptroller.ts +125 -0
  73. package/typechain-types/IERC1822ProxiableUpgradeable.ts +87 -0
  74. package/typechain-types/IERC20.ts +300 -0
  75. package/typechain-types/IERC20Metadata.ts +339 -0
  76. package/typechain-types/IJoePair.ts +888 -0
  77. package/typechain-types/IJoeRouter01.ts +1107 -0
  78. package/typechain-types/IPBaseToken.ts +365 -0
  79. package/typechain-types/IPFlashCallback.ts +115 -0
  80. package/typechain-types/IPGovernanceManager.ts +84 -0
  81. package/typechain-types/IPMarket.ts +701 -0
  82. package/typechain-types/IPMarketAddRemoveCallback.ts +169 -0
  83. package/typechain-types/IPMarketFactory.ts +109 -0
  84. package/typechain-types/IPMarketSwapCallback.ts +115 -0
  85. package/typechain-types/IPOwnershipToken.ts +488 -0
  86. package/typechain-types/IPRouterCore.ts +759 -0
  87. package/typechain-types/IPRouterYT.ts +405 -0
  88. package/typechain-types/IPYieldContractFactory.ts +192 -0
  89. package/typechain-types/IPYieldToken.ts +525 -0
  90. package/typechain-types/IPermissionsV2.ts +87 -0
  91. package/typechain-types/IQiErc20.ts +402 -0
  92. package/typechain-types/IQiToken.ts +327 -0
  93. package/typechain-types/IREDACTEDStaking.ts +216 -0
  94. package/typechain-types/ISuperComposableYield.ts +652 -0
  95. package/typechain-types/IWETH.ts +380 -0
  96. package/typechain-types/IWXBTRFLY.ts +254 -0
  97. package/typechain-types/IYearnVault.ts +152 -0
  98. package/typechain-types/PendleAaveV3SCY.ts +901 -0
  99. package/typechain-types/PendleBaseToken.ts +505 -0
  100. package/typechain-types/PendleBenQiErc20SCY.ts +914 -0
  101. package/typechain-types/PendleBtrflyScy.ts +794 -0
  102. package/typechain-types/PendleGovernanceManager.ts +187 -0
  103. package/typechain-types/PendleJoeSwapHelperUpg.ts +97 -0
  104. package/typechain-types/PendleMarket.ts +1008 -0
  105. package/typechain-types/PendleMarketFactory.ts +246 -0
  106. package/typechain-types/PendleOwnershipToken.ts +628 -0
  107. package/typechain-types/PendleRouterCoreUpg.ts +780 -0
  108. package/typechain-types/PendleRouterProxy.ts +417 -0
  109. package/typechain-types/PendleRouterSCYAndForgeBaseUpg.ts +98 -0
  110. package/typechain-types/PendleRouterYTBaseUpg.ts +134 -0
  111. package/typechain-types/PendleRouterYTUpg.ts +453 -0
  112. package/typechain-types/PendleYearnVaultScy.ts +784 -0
  113. package/typechain-types/PendleYieldContractFactory.ts +479 -0
  114. package/typechain-types/PendleYieldToken.ts +1030 -0
  115. package/typechain-types/PermissionsV2.ts +87 -0
  116. package/typechain-types/Proxy.ts +57 -0
  117. package/typechain-types/RewardManager.ts +172 -0
  118. package/typechain-types/SCYBase.ts +734 -0
  119. package/typechain-types/SCYBaseWithRewards.ts +819 -0
  120. package/typechain-types/UUPSUpgradeable.ts +197 -0
  121. package/typechain-types/common.ts +44 -0
  122. package/typechain-types/factories/BoringOwnableData__factory.ts +90 -0
  123. package/typechain-types/factories/BoringOwnableUpgData__factory.ts +94 -0
  124. package/typechain-types/factories/BoringOwnableUpg__factory.ts +139 -0
  125. package/typechain-types/factories/BoringOwnable__factory.ts +149 -0
  126. package/typechain-types/factories/ERC1967UpgradeUpgradeable__factory.ts +75 -0
  127. package/typechain-types/factories/ERC20__factory.ts +348 -0
  128. package/typechain-types/factories/IAToken__factory.ts +225 -0
  129. package/typechain-types/factories/IAavePool__factory.ts +99 -0
  130. package/typechain-types/factories/IAaveRewardsController__factory.ts +78 -0
  131. package/typechain-types/factories/IBeaconUpgradeable__factory.ts +39 -0
  132. package/typechain-types/factories/IBenQiComptroller__factory.ts +59 -0
  133. package/typechain-types/factories/IERC1822ProxiableUpgradeable__factory.ts +43 -0
  134. package/typechain-types/factories/IERC20Metadata__factory.ts +248 -0
  135. package/typechain-types/factories/IERC20__factory.ts +203 -0
  136. package/typechain-types/factories/IJoePair__factory.ts +674 -0
  137. package/typechain-types/factories/IJoeRouter01__factory.ts +772 -0
  138. package/typechain-types/factories/IPBaseToken__factory.ts +271 -0
  139. package/typechain-types/factories/IPFlashCallback__factory.ts +49 -0
  140. package/typechain-types/factories/IPGovernanceManager__factory.ts +39 -0
  141. package/typechain-types/factories/IPMarketAddRemoveCallback__factory.ts +86 -0
  142. package/typechain-types/factories/IPMarketFactory__factory.ts +58 -0
  143. package/typechain-types/factories/IPMarketSwapCallback__factory.ts +53 -0
  144. package/typechain-types/factories/IPMarket__factory.ts +559 -0
  145. package/typechain-types/factories/IPOwnershipToken__factory.ts +349 -0
  146. package/typechain-types/factories/IPRouterCore__factory.ts +516 -0
  147. package/typechain-types/factories/IPRouterYT__factory.ts +246 -0
  148. package/typechain-types/factories/IPYieldContractFactory__factory.ts +117 -0
  149. package/typechain-types/factories/IPYieldToken__factory.ts +383 -0
  150. package/typechain-types/factories/IPermissionsV2__factory.ts +39 -0
  151. package/typechain-types/factories/IQiErc20__factory.ts +270 -0
  152. package/typechain-types/factories/IQiToken__factory.ts +219 -0
  153. package/typechain-types/factories/IREDACTEDStaking__factory.ts +107 -0
  154. package/typechain-types/factories/ISuperComposableYield__factory.ts +438 -0
  155. package/typechain-types/factories/IWETH__factory.ts +261 -0
  156. package/typechain-types/factories/IWXBTRFLY__factory.ts +131 -0
  157. package/typechain-types/factories/IYearnVault__factory.ts +74 -0
  158. package/typechain-types/factories/PendleAaveV3SCY__factory.ts +727 -0
  159. package/typechain-types/factories/PendleBaseToken__factory.ts +386 -0
  160. package/typechain-types/factories/PendleBenQiErc20SCY__factory.ts +753 -0
  161. package/typechain-types/factories/PendleBtrflyScy__factory.ts +652 -0
  162. package/typechain-types/factories/PendleGovernanceManager__factory.ts +149 -0
  163. package/typechain-types/factories/PendleJoeSwapHelperUpg__factory.ts +56 -0
  164. package/typechain-types/factories/PendleMarketFactory__factory.ts +207 -0
  165. package/typechain-types/factories/PendleMarket__factory.ts +891 -0
  166. package/typechain-types/factories/PendleOwnershipToken__factory.ts +565 -0
  167. package/typechain-types/factories/PendleRouterCoreUpg__factory.ts +620 -0
  168. package/typechain-types/factories/PendleRouterProxy__factory.ts +316 -0
  169. package/typechain-types/factories/PendleRouterSCYAndForgeBaseUpg__factory.ts +56 -0
  170. package/typechain-types/factories/PendleRouterYTBaseUpg__factory.ts +66 -0
  171. package/typechain-types/factories/PendleRouterYTUpg__factory.ts +363 -0
  172. package/typechain-types/factories/PendleYearnVaultScy__factory.ts +630 -0
  173. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +368 -0
  174. package/typechain-types/factories/PendleYieldToken__factory.ts +814 -0
  175. package/typechain-types/factories/PermissionsV2__factory.ts +36 -0
  176. package/typechain-types/factories/Proxy__factory.ts +28 -0
  177. package/typechain-types/factories/RewardManager__factory.ts +89 -0
  178. package/typechain-types/factories/SCYBaseWithRewards__factory.ts +535 -0
  179. package/typechain-types/factories/SCYBase__factory.ts +479 -0
  180. package/typechain-types/factories/UUPSUpgradeable__factory.ts +115 -0
  181. package/typechain-types/hardhat.d.ts +564 -0
  182. package/typechain-types/index.ts +122 -0
@@ -0,0 +1,772 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import { Contract, Signer, utils } from "ethers";
6
+ import { Provider } from "@ethersproject/providers";
7
+ import type { IJoeRouter01, IJoeRouter01Interface } from "../IJoeRouter01";
8
+
9
+ const _abi = [
10
+ {
11
+ inputs: [],
12
+ name: "WAVAX",
13
+ outputs: [
14
+ {
15
+ internalType: "address",
16
+ name: "",
17
+ type: "address",
18
+ },
19
+ ],
20
+ stateMutability: "pure",
21
+ type: "function",
22
+ },
23
+ {
24
+ inputs: [
25
+ {
26
+ internalType: "address",
27
+ name: "tokenA",
28
+ type: "address",
29
+ },
30
+ {
31
+ internalType: "address",
32
+ name: "tokenB",
33
+ type: "address",
34
+ },
35
+ {
36
+ internalType: "uint256",
37
+ name: "amountADesired",
38
+ type: "uint256",
39
+ },
40
+ {
41
+ internalType: "uint256",
42
+ name: "amountBDesired",
43
+ type: "uint256",
44
+ },
45
+ {
46
+ internalType: "uint256",
47
+ name: "amountAMin",
48
+ type: "uint256",
49
+ },
50
+ {
51
+ internalType: "uint256",
52
+ name: "amountBMin",
53
+ type: "uint256",
54
+ },
55
+ {
56
+ internalType: "address",
57
+ name: "to",
58
+ type: "address",
59
+ },
60
+ {
61
+ internalType: "uint256",
62
+ name: "deadline",
63
+ type: "uint256",
64
+ },
65
+ ],
66
+ name: "addLiquidity",
67
+ outputs: [
68
+ {
69
+ internalType: "uint256",
70
+ name: "amountA",
71
+ type: "uint256",
72
+ },
73
+ {
74
+ internalType: "uint256",
75
+ name: "amountB",
76
+ type: "uint256",
77
+ },
78
+ {
79
+ internalType: "uint256",
80
+ name: "liquidity",
81
+ type: "uint256",
82
+ },
83
+ ],
84
+ stateMutability: "nonpayable",
85
+ type: "function",
86
+ },
87
+ {
88
+ inputs: [
89
+ {
90
+ internalType: "address",
91
+ name: "token",
92
+ type: "address",
93
+ },
94
+ {
95
+ internalType: "uint256",
96
+ name: "amountTokenDesired",
97
+ type: "uint256",
98
+ },
99
+ {
100
+ internalType: "uint256",
101
+ name: "amountTokenMin",
102
+ type: "uint256",
103
+ },
104
+ {
105
+ internalType: "uint256",
106
+ name: "amountAVAXMin",
107
+ type: "uint256",
108
+ },
109
+ {
110
+ internalType: "address",
111
+ name: "to",
112
+ type: "address",
113
+ },
114
+ {
115
+ internalType: "uint256",
116
+ name: "deadline",
117
+ type: "uint256",
118
+ },
119
+ ],
120
+ name: "addLiquidityAVAX",
121
+ outputs: [
122
+ {
123
+ internalType: "uint256",
124
+ name: "amountToken",
125
+ type: "uint256",
126
+ },
127
+ {
128
+ internalType: "uint256",
129
+ name: "amountAVAX",
130
+ type: "uint256",
131
+ },
132
+ {
133
+ internalType: "uint256",
134
+ name: "liquidity",
135
+ type: "uint256",
136
+ },
137
+ ],
138
+ stateMutability: "payable",
139
+ type: "function",
140
+ },
141
+ {
142
+ inputs: [],
143
+ name: "factory",
144
+ outputs: [
145
+ {
146
+ internalType: "address",
147
+ name: "",
148
+ type: "address",
149
+ },
150
+ ],
151
+ stateMutability: "pure",
152
+ type: "function",
153
+ },
154
+ {
155
+ inputs: [
156
+ {
157
+ internalType: "uint256",
158
+ name: "amountOut",
159
+ type: "uint256",
160
+ },
161
+ {
162
+ internalType: "uint256",
163
+ name: "reserveIn",
164
+ type: "uint256",
165
+ },
166
+ {
167
+ internalType: "uint256",
168
+ name: "reserveOut",
169
+ type: "uint256",
170
+ },
171
+ ],
172
+ name: "getAmountIn",
173
+ outputs: [
174
+ {
175
+ internalType: "uint256",
176
+ name: "amountIn",
177
+ type: "uint256",
178
+ },
179
+ ],
180
+ stateMutability: "pure",
181
+ type: "function",
182
+ },
183
+ {
184
+ inputs: [
185
+ {
186
+ internalType: "uint256",
187
+ name: "amountIn",
188
+ type: "uint256",
189
+ },
190
+ {
191
+ internalType: "uint256",
192
+ name: "reserveIn",
193
+ type: "uint256",
194
+ },
195
+ {
196
+ internalType: "uint256",
197
+ name: "reserveOut",
198
+ type: "uint256",
199
+ },
200
+ ],
201
+ name: "getAmountOut",
202
+ outputs: [
203
+ {
204
+ internalType: "uint256",
205
+ name: "amountOut",
206
+ type: "uint256",
207
+ },
208
+ ],
209
+ stateMutability: "pure",
210
+ type: "function",
211
+ },
212
+ {
213
+ inputs: [
214
+ {
215
+ internalType: "uint256",
216
+ name: "amountOut",
217
+ type: "uint256",
218
+ },
219
+ {
220
+ internalType: "address[]",
221
+ name: "path",
222
+ type: "address[]",
223
+ },
224
+ ],
225
+ name: "getAmountsIn",
226
+ outputs: [
227
+ {
228
+ internalType: "uint256[]",
229
+ name: "amounts",
230
+ type: "uint256[]",
231
+ },
232
+ ],
233
+ stateMutability: "view",
234
+ type: "function",
235
+ },
236
+ {
237
+ inputs: [
238
+ {
239
+ internalType: "uint256",
240
+ name: "amountIn",
241
+ type: "uint256",
242
+ },
243
+ {
244
+ internalType: "address[]",
245
+ name: "path",
246
+ type: "address[]",
247
+ },
248
+ ],
249
+ name: "getAmountsOut",
250
+ outputs: [
251
+ {
252
+ internalType: "uint256[]",
253
+ name: "amounts",
254
+ type: "uint256[]",
255
+ },
256
+ ],
257
+ stateMutability: "view",
258
+ type: "function",
259
+ },
260
+ {
261
+ inputs: [
262
+ {
263
+ internalType: "uint256",
264
+ name: "amountA",
265
+ type: "uint256",
266
+ },
267
+ {
268
+ internalType: "uint256",
269
+ name: "reserveA",
270
+ type: "uint256",
271
+ },
272
+ {
273
+ internalType: "uint256",
274
+ name: "reserveB",
275
+ type: "uint256",
276
+ },
277
+ ],
278
+ name: "quote",
279
+ outputs: [
280
+ {
281
+ internalType: "uint256",
282
+ name: "amountB",
283
+ type: "uint256",
284
+ },
285
+ ],
286
+ stateMutability: "pure",
287
+ type: "function",
288
+ },
289
+ {
290
+ inputs: [
291
+ {
292
+ internalType: "address",
293
+ name: "tokenA",
294
+ type: "address",
295
+ },
296
+ {
297
+ internalType: "address",
298
+ name: "tokenB",
299
+ type: "address",
300
+ },
301
+ {
302
+ internalType: "uint256",
303
+ name: "liquidity",
304
+ type: "uint256",
305
+ },
306
+ {
307
+ internalType: "uint256",
308
+ name: "amountAMin",
309
+ type: "uint256",
310
+ },
311
+ {
312
+ internalType: "uint256",
313
+ name: "amountBMin",
314
+ type: "uint256",
315
+ },
316
+ {
317
+ internalType: "address",
318
+ name: "to",
319
+ type: "address",
320
+ },
321
+ {
322
+ internalType: "uint256",
323
+ name: "deadline",
324
+ type: "uint256",
325
+ },
326
+ ],
327
+ name: "removeLiquidity",
328
+ outputs: [
329
+ {
330
+ internalType: "uint256",
331
+ name: "amountA",
332
+ type: "uint256",
333
+ },
334
+ {
335
+ internalType: "uint256",
336
+ name: "amountB",
337
+ type: "uint256",
338
+ },
339
+ ],
340
+ stateMutability: "nonpayable",
341
+ type: "function",
342
+ },
343
+ {
344
+ inputs: [
345
+ {
346
+ internalType: "address",
347
+ name: "token",
348
+ type: "address",
349
+ },
350
+ {
351
+ internalType: "uint256",
352
+ name: "liquidity",
353
+ type: "uint256",
354
+ },
355
+ {
356
+ internalType: "uint256",
357
+ name: "amountTokenMin",
358
+ type: "uint256",
359
+ },
360
+ {
361
+ internalType: "uint256",
362
+ name: "amountAVAXMin",
363
+ type: "uint256",
364
+ },
365
+ {
366
+ internalType: "address",
367
+ name: "to",
368
+ type: "address",
369
+ },
370
+ {
371
+ internalType: "uint256",
372
+ name: "deadline",
373
+ type: "uint256",
374
+ },
375
+ ],
376
+ name: "removeLiquidityAVAX",
377
+ outputs: [
378
+ {
379
+ internalType: "uint256",
380
+ name: "amountToken",
381
+ type: "uint256",
382
+ },
383
+ {
384
+ internalType: "uint256",
385
+ name: "amountAVAX",
386
+ type: "uint256",
387
+ },
388
+ ],
389
+ stateMutability: "nonpayable",
390
+ type: "function",
391
+ },
392
+ {
393
+ inputs: [
394
+ {
395
+ internalType: "address",
396
+ name: "token",
397
+ type: "address",
398
+ },
399
+ {
400
+ internalType: "uint256",
401
+ name: "liquidity",
402
+ type: "uint256",
403
+ },
404
+ {
405
+ internalType: "uint256",
406
+ name: "amountTokenMin",
407
+ type: "uint256",
408
+ },
409
+ {
410
+ internalType: "uint256",
411
+ name: "amountAVAXMin",
412
+ type: "uint256",
413
+ },
414
+ {
415
+ internalType: "address",
416
+ name: "to",
417
+ type: "address",
418
+ },
419
+ {
420
+ internalType: "uint256",
421
+ name: "deadline",
422
+ type: "uint256",
423
+ },
424
+ {
425
+ internalType: "bool",
426
+ name: "approveMax",
427
+ type: "bool",
428
+ },
429
+ {
430
+ internalType: "uint8",
431
+ name: "v",
432
+ type: "uint8",
433
+ },
434
+ {
435
+ internalType: "bytes32",
436
+ name: "r",
437
+ type: "bytes32",
438
+ },
439
+ {
440
+ internalType: "bytes32",
441
+ name: "s",
442
+ type: "bytes32",
443
+ },
444
+ ],
445
+ name: "removeLiquidityAVAXWithPermit",
446
+ outputs: [
447
+ {
448
+ internalType: "uint256",
449
+ name: "amountToken",
450
+ type: "uint256",
451
+ },
452
+ {
453
+ internalType: "uint256",
454
+ name: "amountAVAX",
455
+ type: "uint256",
456
+ },
457
+ ],
458
+ stateMutability: "nonpayable",
459
+ type: "function",
460
+ },
461
+ {
462
+ inputs: [
463
+ {
464
+ internalType: "address",
465
+ name: "tokenA",
466
+ type: "address",
467
+ },
468
+ {
469
+ internalType: "address",
470
+ name: "tokenB",
471
+ type: "address",
472
+ },
473
+ {
474
+ internalType: "uint256",
475
+ name: "liquidity",
476
+ type: "uint256",
477
+ },
478
+ {
479
+ internalType: "uint256",
480
+ name: "amountAMin",
481
+ type: "uint256",
482
+ },
483
+ {
484
+ internalType: "uint256",
485
+ name: "amountBMin",
486
+ type: "uint256",
487
+ },
488
+ {
489
+ internalType: "address",
490
+ name: "to",
491
+ type: "address",
492
+ },
493
+ {
494
+ internalType: "uint256",
495
+ name: "deadline",
496
+ type: "uint256",
497
+ },
498
+ {
499
+ internalType: "bool",
500
+ name: "approveMax",
501
+ type: "bool",
502
+ },
503
+ {
504
+ internalType: "uint8",
505
+ name: "v",
506
+ type: "uint8",
507
+ },
508
+ {
509
+ internalType: "bytes32",
510
+ name: "r",
511
+ type: "bytes32",
512
+ },
513
+ {
514
+ internalType: "bytes32",
515
+ name: "s",
516
+ type: "bytes32",
517
+ },
518
+ ],
519
+ name: "removeLiquidityWithPermit",
520
+ outputs: [
521
+ {
522
+ internalType: "uint256",
523
+ name: "amountA",
524
+ type: "uint256",
525
+ },
526
+ {
527
+ internalType: "uint256",
528
+ name: "amountB",
529
+ type: "uint256",
530
+ },
531
+ ],
532
+ stateMutability: "nonpayable",
533
+ type: "function",
534
+ },
535
+ {
536
+ inputs: [
537
+ {
538
+ internalType: "uint256",
539
+ name: "amountOut",
540
+ type: "uint256",
541
+ },
542
+ {
543
+ internalType: "address[]",
544
+ name: "path",
545
+ type: "address[]",
546
+ },
547
+ {
548
+ internalType: "address",
549
+ name: "to",
550
+ type: "address",
551
+ },
552
+ {
553
+ internalType: "uint256",
554
+ name: "deadline",
555
+ type: "uint256",
556
+ },
557
+ ],
558
+ name: "swapAVAXForExactTokens",
559
+ outputs: [
560
+ {
561
+ internalType: "uint256[]",
562
+ name: "amounts",
563
+ type: "uint256[]",
564
+ },
565
+ ],
566
+ stateMutability: "payable",
567
+ type: "function",
568
+ },
569
+ {
570
+ inputs: [
571
+ {
572
+ internalType: "uint256",
573
+ name: "amountOutMin",
574
+ type: "uint256",
575
+ },
576
+ {
577
+ internalType: "address[]",
578
+ name: "path",
579
+ type: "address[]",
580
+ },
581
+ {
582
+ internalType: "address",
583
+ name: "to",
584
+ type: "address",
585
+ },
586
+ {
587
+ internalType: "uint256",
588
+ name: "deadline",
589
+ type: "uint256",
590
+ },
591
+ ],
592
+ name: "swapExactAVAXForTokens",
593
+ outputs: [
594
+ {
595
+ internalType: "uint256[]",
596
+ name: "amounts",
597
+ type: "uint256[]",
598
+ },
599
+ ],
600
+ stateMutability: "payable",
601
+ type: "function",
602
+ },
603
+ {
604
+ inputs: [
605
+ {
606
+ internalType: "uint256",
607
+ name: "amountIn",
608
+ type: "uint256",
609
+ },
610
+ {
611
+ internalType: "uint256",
612
+ name: "amountOutMin",
613
+ type: "uint256",
614
+ },
615
+ {
616
+ internalType: "address[]",
617
+ name: "path",
618
+ type: "address[]",
619
+ },
620
+ {
621
+ internalType: "address",
622
+ name: "to",
623
+ type: "address",
624
+ },
625
+ {
626
+ internalType: "uint256",
627
+ name: "deadline",
628
+ type: "uint256",
629
+ },
630
+ ],
631
+ name: "swapExactTokensForAVAX",
632
+ outputs: [
633
+ {
634
+ internalType: "uint256[]",
635
+ name: "amounts",
636
+ type: "uint256[]",
637
+ },
638
+ ],
639
+ stateMutability: "nonpayable",
640
+ type: "function",
641
+ },
642
+ {
643
+ inputs: [
644
+ {
645
+ internalType: "uint256",
646
+ name: "amountIn",
647
+ type: "uint256",
648
+ },
649
+ {
650
+ internalType: "uint256",
651
+ name: "amountOutMin",
652
+ type: "uint256",
653
+ },
654
+ {
655
+ internalType: "address[]",
656
+ name: "path",
657
+ type: "address[]",
658
+ },
659
+ {
660
+ internalType: "address",
661
+ name: "to",
662
+ type: "address",
663
+ },
664
+ {
665
+ internalType: "uint256",
666
+ name: "deadline",
667
+ type: "uint256",
668
+ },
669
+ ],
670
+ name: "swapExactTokensForTokens",
671
+ outputs: [
672
+ {
673
+ internalType: "uint256[]",
674
+ name: "amounts",
675
+ type: "uint256[]",
676
+ },
677
+ ],
678
+ stateMutability: "nonpayable",
679
+ type: "function",
680
+ },
681
+ {
682
+ inputs: [
683
+ {
684
+ internalType: "uint256",
685
+ name: "amountOut",
686
+ type: "uint256",
687
+ },
688
+ {
689
+ internalType: "uint256",
690
+ name: "amountInMax",
691
+ type: "uint256",
692
+ },
693
+ {
694
+ internalType: "address[]",
695
+ name: "path",
696
+ type: "address[]",
697
+ },
698
+ {
699
+ internalType: "address",
700
+ name: "to",
701
+ type: "address",
702
+ },
703
+ {
704
+ internalType: "uint256",
705
+ name: "deadline",
706
+ type: "uint256",
707
+ },
708
+ ],
709
+ name: "swapTokensForExactAVAX",
710
+ outputs: [
711
+ {
712
+ internalType: "uint256[]",
713
+ name: "amounts",
714
+ type: "uint256[]",
715
+ },
716
+ ],
717
+ stateMutability: "nonpayable",
718
+ type: "function",
719
+ },
720
+ {
721
+ inputs: [
722
+ {
723
+ internalType: "uint256",
724
+ name: "amountOut",
725
+ type: "uint256",
726
+ },
727
+ {
728
+ internalType: "uint256",
729
+ name: "amountInMax",
730
+ type: "uint256",
731
+ },
732
+ {
733
+ internalType: "address[]",
734
+ name: "path",
735
+ type: "address[]",
736
+ },
737
+ {
738
+ internalType: "address",
739
+ name: "to",
740
+ type: "address",
741
+ },
742
+ {
743
+ internalType: "uint256",
744
+ name: "deadline",
745
+ type: "uint256",
746
+ },
747
+ ],
748
+ name: "swapTokensForExactTokens",
749
+ outputs: [
750
+ {
751
+ internalType: "uint256[]",
752
+ name: "amounts",
753
+ type: "uint256[]",
754
+ },
755
+ ],
756
+ stateMutability: "nonpayable",
757
+ type: "function",
758
+ },
759
+ ];
760
+
761
+ export class IJoeRouter01__factory {
762
+ static readonly abi = _abi;
763
+ static createInterface(): IJoeRouter01Interface {
764
+ return new utils.Interface(_abi) as IJoeRouter01Interface;
765
+ }
766
+ static connect(
767
+ address: string,
768
+ signerOrProvider: Signer | Provider
769
+ ): IJoeRouter01 {
770
+ return new Contract(address, _abi, signerOrProvider) as IJoeRouter01;
771
+ }
772
+ }