@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,383 @@
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 { IPYieldToken, IPYieldTokenInterface } from "../IPYieldToken";
8
+
9
+ const _abi = [
10
+ {
11
+ anonymous: false,
12
+ inputs: [
13
+ {
14
+ indexed: true,
15
+ internalType: "address",
16
+ name: "owner",
17
+ type: "address",
18
+ },
19
+ {
20
+ indexed: true,
21
+ internalType: "address",
22
+ name: "spender",
23
+ type: "address",
24
+ },
25
+ {
26
+ indexed: false,
27
+ internalType: "uint256",
28
+ name: "value",
29
+ type: "uint256",
30
+ },
31
+ ],
32
+ name: "Approval",
33
+ type: "event",
34
+ },
35
+ {
36
+ anonymous: false,
37
+ inputs: [
38
+ {
39
+ indexed: true,
40
+ internalType: "address",
41
+ name: "from",
42
+ type: "address",
43
+ },
44
+ {
45
+ indexed: true,
46
+ internalType: "address",
47
+ name: "to",
48
+ type: "address",
49
+ },
50
+ {
51
+ indexed: false,
52
+ internalType: "uint256",
53
+ name: "value",
54
+ type: "uint256",
55
+ },
56
+ ],
57
+ name: "Transfer",
58
+ type: "event",
59
+ },
60
+ {
61
+ inputs: [],
62
+ name: "OT",
63
+ outputs: [
64
+ {
65
+ internalType: "address",
66
+ name: "",
67
+ type: "address",
68
+ },
69
+ ],
70
+ stateMutability: "view",
71
+ type: "function",
72
+ },
73
+ {
74
+ inputs: [],
75
+ name: "SCY",
76
+ outputs: [
77
+ {
78
+ internalType: "address",
79
+ name: "",
80
+ type: "address",
81
+ },
82
+ ],
83
+ stateMutability: "view",
84
+ type: "function",
85
+ },
86
+ {
87
+ inputs: [
88
+ {
89
+ internalType: "address",
90
+ name: "owner",
91
+ type: "address",
92
+ },
93
+ {
94
+ internalType: "address",
95
+ name: "spender",
96
+ type: "address",
97
+ },
98
+ ],
99
+ name: "allowance",
100
+ outputs: [
101
+ {
102
+ internalType: "uint256",
103
+ name: "",
104
+ type: "uint256",
105
+ },
106
+ ],
107
+ stateMutability: "view",
108
+ type: "function",
109
+ },
110
+ {
111
+ inputs: [
112
+ {
113
+ internalType: "address",
114
+ name: "spender",
115
+ type: "address",
116
+ },
117
+ {
118
+ internalType: "uint256",
119
+ name: "amount",
120
+ type: "uint256",
121
+ },
122
+ ],
123
+ name: "approve",
124
+ outputs: [
125
+ {
126
+ internalType: "bool",
127
+ name: "",
128
+ type: "bool",
129
+ },
130
+ ],
131
+ stateMutability: "nonpayable",
132
+ type: "function",
133
+ },
134
+ {
135
+ inputs: [
136
+ {
137
+ internalType: "address",
138
+ name: "account",
139
+ type: "address",
140
+ },
141
+ ],
142
+ name: "balanceOf",
143
+ outputs: [
144
+ {
145
+ internalType: "uint256",
146
+ name: "",
147
+ type: "uint256",
148
+ },
149
+ ],
150
+ stateMutability: "view",
151
+ type: "function",
152
+ },
153
+ {
154
+ inputs: [],
155
+ name: "decimals",
156
+ outputs: [
157
+ {
158
+ internalType: "uint8",
159
+ name: "",
160
+ type: "uint8",
161
+ },
162
+ ],
163
+ stateMutability: "view",
164
+ type: "function",
165
+ },
166
+ {
167
+ inputs: [],
168
+ name: "expiry",
169
+ outputs: [
170
+ {
171
+ internalType: "uint256",
172
+ name: "",
173
+ type: "uint256",
174
+ },
175
+ ],
176
+ stateMutability: "view",
177
+ type: "function",
178
+ },
179
+ {
180
+ inputs: [],
181
+ name: "isExpired",
182
+ outputs: [
183
+ {
184
+ internalType: "bool",
185
+ name: "",
186
+ type: "bool",
187
+ },
188
+ ],
189
+ stateMutability: "view",
190
+ type: "function",
191
+ },
192
+ {
193
+ inputs: [
194
+ {
195
+ internalType: "address",
196
+ name: "receiverOT",
197
+ type: "address",
198
+ },
199
+ {
200
+ internalType: "address",
201
+ name: "receiverYT",
202
+ type: "address",
203
+ },
204
+ ],
205
+ name: "mintYO",
206
+ outputs: [
207
+ {
208
+ internalType: "uint256",
209
+ name: "amountYOOut",
210
+ type: "uint256",
211
+ },
212
+ ],
213
+ stateMutability: "nonpayable",
214
+ type: "function",
215
+ },
216
+ {
217
+ inputs: [],
218
+ name: "name",
219
+ outputs: [
220
+ {
221
+ internalType: "string",
222
+ name: "",
223
+ type: "string",
224
+ },
225
+ ],
226
+ stateMutability: "view",
227
+ type: "function",
228
+ },
229
+ {
230
+ inputs: [
231
+ {
232
+ internalType: "address",
233
+ name: "user",
234
+ type: "address",
235
+ },
236
+ ],
237
+ name: "redeemDueInterest",
238
+ outputs: [
239
+ {
240
+ internalType: "uint256",
241
+ name: "interestOut",
242
+ type: "uint256",
243
+ },
244
+ ],
245
+ stateMutability: "nonpayable",
246
+ type: "function",
247
+ },
248
+ {
249
+ inputs: [
250
+ {
251
+ internalType: "address",
252
+ name: "user",
253
+ type: "address",
254
+ },
255
+ {
256
+ internalType: "address",
257
+ name: "receiver",
258
+ type: "address",
259
+ },
260
+ ],
261
+ name: "redeemDueRewards",
262
+ outputs: [
263
+ {
264
+ internalType: "uint256[]",
265
+ name: "rewardsOut",
266
+ type: "uint256[]",
267
+ },
268
+ ],
269
+ stateMutability: "nonpayable",
270
+ type: "function",
271
+ },
272
+ {
273
+ inputs: [
274
+ {
275
+ internalType: "address",
276
+ name: "receiver",
277
+ type: "address",
278
+ },
279
+ ],
280
+ name: "redeemYO",
281
+ outputs: [
282
+ {
283
+ internalType: "uint256",
284
+ name: "amountScyOut",
285
+ type: "uint256",
286
+ },
287
+ ],
288
+ stateMutability: "nonpayable",
289
+ type: "function",
290
+ },
291
+ {
292
+ inputs: [],
293
+ name: "symbol",
294
+ outputs: [
295
+ {
296
+ internalType: "string",
297
+ name: "",
298
+ type: "string",
299
+ },
300
+ ],
301
+ stateMutability: "view",
302
+ type: "function",
303
+ },
304
+ {
305
+ inputs: [],
306
+ name: "totalSupply",
307
+ outputs: [
308
+ {
309
+ internalType: "uint256",
310
+ name: "",
311
+ type: "uint256",
312
+ },
313
+ ],
314
+ stateMutability: "view",
315
+ type: "function",
316
+ },
317
+ {
318
+ inputs: [
319
+ {
320
+ internalType: "address",
321
+ name: "to",
322
+ type: "address",
323
+ },
324
+ {
325
+ internalType: "uint256",
326
+ name: "amount",
327
+ type: "uint256",
328
+ },
329
+ ],
330
+ name: "transfer",
331
+ outputs: [
332
+ {
333
+ internalType: "bool",
334
+ name: "",
335
+ type: "bool",
336
+ },
337
+ ],
338
+ stateMutability: "nonpayable",
339
+ type: "function",
340
+ },
341
+ {
342
+ inputs: [
343
+ {
344
+ internalType: "address",
345
+ name: "from",
346
+ type: "address",
347
+ },
348
+ {
349
+ internalType: "address",
350
+ name: "to",
351
+ type: "address",
352
+ },
353
+ {
354
+ internalType: "uint256",
355
+ name: "amount",
356
+ type: "uint256",
357
+ },
358
+ ],
359
+ name: "transferFrom",
360
+ outputs: [
361
+ {
362
+ internalType: "bool",
363
+ name: "",
364
+ type: "bool",
365
+ },
366
+ ],
367
+ stateMutability: "nonpayable",
368
+ type: "function",
369
+ },
370
+ ];
371
+
372
+ export class IPYieldToken__factory {
373
+ static readonly abi = _abi;
374
+ static createInterface(): IPYieldTokenInterface {
375
+ return new utils.Interface(_abi) as IPYieldTokenInterface;
376
+ }
377
+ static connect(
378
+ address: string,
379
+ signerOrProvider: Signer | Provider
380
+ ): IPYieldToken {
381
+ return new Contract(address, _abi, signerOrProvider) as IPYieldToken;
382
+ }
383
+ }
@@ -0,0 +1,39 @@
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 {
8
+ IPermissionsV2,
9
+ IPermissionsV2Interface,
10
+ } from "../IPermissionsV2";
11
+
12
+ const _abi = [
13
+ {
14
+ inputs: [],
15
+ name: "governanceManager",
16
+ outputs: [
17
+ {
18
+ internalType: "address",
19
+ name: "",
20
+ type: "address",
21
+ },
22
+ ],
23
+ stateMutability: "view",
24
+ type: "function",
25
+ },
26
+ ];
27
+
28
+ export class IPermissionsV2__factory {
29
+ static readonly abi = _abi;
30
+ static createInterface(): IPermissionsV2Interface {
31
+ return new utils.Interface(_abi) as IPermissionsV2Interface;
32
+ }
33
+ static connect(
34
+ address: string,
35
+ signerOrProvider: Signer | Provider
36
+ ): IPermissionsV2 {
37
+ return new Contract(address, _abi, signerOrProvider) as IPermissionsV2;
38
+ }
39
+ }
@@ -0,0 +1,270 @@
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 { IQiErc20, IQiErc20Interface } from "../IQiErc20";
8
+
9
+ const _abi = [
10
+ {
11
+ anonymous: false,
12
+ inputs: [
13
+ {
14
+ indexed: true,
15
+ internalType: "address",
16
+ name: "owner",
17
+ type: "address",
18
+ },
19
+ {
20
+ indexed: true,
21
+ internalType: "address",
22
+ name: "spender",
23
+ type: "address",
24
+ },
25
+ {
26
+ indexed: false,
27
+ internalType: "uint256",
28
+ name: "value",
29
+ type: "uint256",
30
+ },
31
+ ],
32
+ name: "Approval",
33
+ type: "event",
34
+ },
35
+ {
36
+ anonymous: false,
37
+ inputs: [
38
+ {
39
+ indexed: true,
40
+ internalType: "address",
41
+ name: "from",
42
+ type: "address",
43
+ },
44
+ {
45
+ indexed: true,
46
+ internalType: "address",
47
+ name: "to",
48
+ type: "address",
49
+ },
50
+ {
51
+ indexed: false,
52
+ internalType: "uint256",
53
+ name: "value",
54
+ type: "uint256",
55
+ },
56
+ ],
57
+ name: "Transfer",
58
+ type: "event",
59
+ },
60
+ {
61
+ inputs: [
62
+ {
63
+ internalType: "address",
64
+ name: "owner",
65
+ type: "address",
66
+ },
67
+ {
68
+ internalType: "address",
69
+ name: "spender",
70
+ type: "address",
71
+ },
72
+ ],
73
+ name: "allowance",
74
+ outputs: [
75
+ {
76
+ internalType: "uint256",
77
+ name: "",
78
+ type: "uint256",
79
+ },
80
+ ],
81
+ stateMutability: "view",
82
+ type: "function",
83
+ },
84
+ {
85
+ inputs: [
86
+ {
87
+ internalType: "address",
88
+ name: "spender",
89
+ type: "address",
90
+ },
91
+ {
92
+ internalType: "uint256",
93
+ name: "amount",
94
+ type: "uint256",
95
+ },
96
+ ],
97
+ name: "approve",
98
+ outputs: [
99
+ {
100
+ internalType: "bool",
101
+ name: "",
102
+ type: "bool",
103
+ },
104
+ ],
105
+ stateMutability: "nonpayable",
106
+ type: "function",
107
+ },
108
+ {
109
+ inputs: [
110
+ {
111
+ internalType: "address",
112
+ name: "owner",
113
+ type: "address",
114
+ },
115
+ ],
116
+ name: "balanceOf",
117
+ outputs: [
118
+ {
119
+ internalType: "uint256",
120
+ name: "",
121
+ type: "uint256",
122
+ },
123
+ ],
124
+ stateMutability: "view",
125
+ type: "function",
126
+ },
127
+ {
128
+ inputs: [],
129
+ name: "exchangeRateCurrent",
130
+ outputs: [
131
+ {
132
+ internalType: "uint256",
133
+ name: "",
134
+ type: "uint256",
135
+ },
136
+ ],
137
+ stateMutability: "nonpayable",
138
+ type: "function",
139
+ },
140
+ {
141
+ inputs: [
142
+ {
143
+ internalType: "uint256",
144
+ name: "mintAmount",
145
+ type: "uint256",
146
+ },
147
+ ],
148
+ name: "mint",
149
+ outputs: [
150
+ {
151
+ internalType: "uint256",
152
+ name: "",
153
+ type: "uint256",
154
+ },
155
+ ],
156
+ stateMutability: "nonpayable",
157
+ type: "function",
158
+ },
159
+ {
160
+ inputs: [
161
+ {
162
+ internalType: "uint256",
163
+ name: "redeemTokens",
164
+ type: "uint256",
165
+ },
166
+ ],
167
+ name: "redeem",
168
+ outputs: [
169
+ {
170
+ internalType: "uint256",
171
+ name: "",
172
+ type: "uint256",
173
+ },
174
+ ],
175
+ stateMutability: "nonpayable",
176
+ type: "function",
177
+ },
178
+ {
179
+ inputs: [],
180
+ name: "totalSupply",
181
+ outputs: [
182
+ {
183
+ internalType: "uint256",
184
+ name: "",
185
+ type: "uint256",
186
+ },
187
+ ],
188
+ stateMutability: "view",
189
+ type: "function",
190
+ },
191
+ {
192
+ inputs: [
193
+ {
194
+ internalType: "address",
195
+ name: "to",
196
+ type: "address",
197
+ },
198
+ {
199
+ internalType: "uint256",
200
+ name: "amount",
201
+ type: "uint256",
202
+ },
203
+ ],
204
+ name: "transfer",
205
+ outputs: [
206
+ {
207
+ internalType: "bool",
208
+ name: "",
209
+ type: "bool",
210
+ },
211
+ ],
212
+ stateMutability: "nonpayable",
213
+ type: "function",
214
+ },
215
+ {
216
+ inputs: [
217
+ {
218
+ internalType: "address",
219
+ name: "from",
220
+ type: "address",
221
+ },
222
+ {
223
+ internalType: "address",
224
+ name: "to",
225
+ type: "address",
226
+ },
227
+ {
228
+ internalType: "uint256",
229
+ name: "amount",
230
+ type: "uint256",
231
+ },
232
+ ],
233
+ name: "transferFrom",
234
+ outputs: [
235
+ {
236
+ internalType: "bool",
237
+ name: "",
238
+ type: "bool",
239
+ },
240
+ ],
241
+ stateMutability: "nonpayable",
242
+ type: "function",
243
+ },
244
+ {
245
+ inputs: [],
246
+ name: "underlying",
247
+ outputs: [
248
+ {
249
+ internalType: "address",
250
+ name: "",
251
+ type: "address",
252
+ },
253
+ ],
254
+ stateMutability: "view",
255
+ type: "function",
256
+ },
257
+ ];
258
+
259
+ export class IQiErc20__factory {
260
+ static readonly abi = _abi;
261
+ static createInterface(): IQiErc20Interface {
262
+ return new utils.Interface(_abi) as IQiErc20Interface;
263
+ }
264
+ static connect(
265
+ address: string,
266
+ signerOrProvider: Signer | Provider
267
+ ): IQiErc20 {
268
+ return new Contract(address, _abi, signerOrProvider) as IQiErc20;
269
+ }
270
+ }