@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,36 @@
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 { PermissionsV2, PermissionsV2Interface } from "../PermissionsV2";
8
+
9
+ const _abi = [
10
+ {
11
+ inputs: [],
12
+ name: "governanceManager",
13
+ outputs: [
14
+ {
15
+ internalType: "address",
16
+ name: "",
17
+ type: "address",
18
+ },
19
+ ],
20
+ stateMutability: "view",
21
+ type: "function",
22
+ },
23
+ ];
24
+
25
+ export class PermissionsV2__factory {
26
+ static readonly abi = _abi;
27
+ static createInterface(): PermissionsV2Interface {
28
+ return new utils.Interface(_abi) as PermissionsV2Interface;
29
+ }
30
+ static connect(
31
+ address: string,
32
+ signerOrProvider: Signer | Provider
33
+ ): PermissionsV2 {
34
+ return new Contract(address, _abi, signerOrProvider) as PermissionsV2;
35
+ }
36
+ }
@@ -0,0 +1,28 @@
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 { Proxy, ProxyInterface } from "../Proxy";
8
+
9
+ const _abi = [
10
+ {
11
+ stateMutability: "payable",
12
+ type: "fallback",
13
+ },
14
+ {
15
+ stateMutability: "payable",
16
+ type: "receive",
17
+ },
18
+ ];
19
+
20
+ export class Proxy__factory {
21
+ static readonly abi = _abi;
22
+ static createInterface(): ProxyInterface {
23
+ return new utils.Interface(_abi) as ProxyInterface;
24
+ }
25
+ static connect(address: string, signerOrProvider: Signer | Provider): Proxy {
26
+ return new Contract(address, _abi, signerOrProvider) as Proxy;
27
+ }
28
+ }
@@ -0,0 +1,89 @@
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 { RewardManager, RewardManagerInterface } from "../RewardManager";
8
+
9
+ const _abi = [
10
+ {
11
+ inputs: [],
12
+ name: "getRewardTokens",
13
+ outputs: [
14
+ {
15
+ internalType: "address[]",
16
+ name: "",
17
+ type: "address[]",
18
+ },
19
+ ],
20
+ stateMutability: "view",
21
+ type: "function",
22
+ },
23
+ {
24
+ inputs: [
25
+ {
26
+ internalType: "address",
27
+ name: "",
28
+ type: "address",
29
+ },
30
+ ],
31
+ name: "globalReward",
32
+ outputs: [
33
+ {
34
+ internalType: "uint256",
35
+ name: "index",
36
+ type: "uint256",
37
+ },
38
+ {
39
+ internalType: "uint256",
40
+ name: "lastBalance",
41
+ type: "uint256",
42
+ },
43
+ ],
44
+ stateMutability: "view",
45
+ type: "function",
46
+ },
47
+ {
48
+ inputs: [
49
+ {
50
+ internalType: "address",
51
+ name: "",
52
+ type: "address",
53
+ },
54
+ {
55
+ internalType: "address",
56
+ name: "",
57
+ type: "address",
58
+ },
59
+ ],
60
+ name: "userReward",
61
+ outputs: [
62
+ {
63
+ internalType: "uint256",
64
+ name: "lastIndex",
65
+ type: "uint256",
66
+ },
67
+ {
68
+ internalType: "uint256",
69
+ name: "accruedReward",
70
+ type: "uint256",
71
+ },
72
+ ],
73
+ stateMutability: "view",
74
+ type: "function",
75
+ },
76
+ ];
77
+
78
+ export class RewardManager__factory {
79
+ static readonly abi = _abi;
80
+ static createInterface(): RewardManagerInterface {
81
+ return new utils.Interface(_abi) as RewardManagerInterface;
82
+ }
83
+ static connect(
84
+ address: string,
85
+ signerOrProvider: Signer | Provider
86
+ ): RewardManager {
87
+ return new Contract(address, _abi, signerOrProvider) as RewardManager;
88
+ }
89
+ }
@@ -0,0 +1,535 @@
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
+ SCYBaseWithRewards,
9
+ SCYBaseWithRewardsInterface,
10
+ } from "../SCYBaseWithRewards";
11
+
12
+ const _abi = [
13
+ {
14
+ anonymous: false,
15
+ inputs: [
16
+ {
17
+ indexed: true,
18
+ internalType: "address",
19
+ name: "owner",
20
+ type: "address",
21
+ },
22
+ {
23
+ indexed: true,
24
+ internalType: "address",
25
+ name: "spender",
26
+ type: "address",
27
+ },
28
+ {
29
+ indexed: false,
30
+ internalType: "uint256",
31
+ name: "value",
32
+ type: "uint256",
33
+ },
34
+ ],
35
+ name: "Approval",
36
+ type: "event",
37
+ },
38
+ {
39
+ anonymous: false,
40
+ inputs: [
41
+ {
42
+ indexed: true,
43
+ internalType: "address",
44
+ name: "from",
45
+ type: "address",
46
+ },
47
+ {
48
+ indexed: true,
49
+ internalType: "address",
50
+ name: "to",
51
+ type: "address",
52
+ },
53
+ {
54
+ indexed: false,
55
+ internalType: "uint256",
56
+ name: "value",
57
+ type: "uint256",
58
+ },
59
+ ],
60
+ name: "Transfer",
61
+ type: "event",
62
+ },
63
+ {
64
+ inputs: [
65
+ {
66
+ internalType: "address",
67
+ name: "owner",
68
+ type: "address",
69
+ },
70
+ {
71
+ internalType: "address",
72
+ name: "spender",
73
+ type: "address",
74
+ },
75
+ ],
76
+ name: "allowance",
77
+ outputs: [
78
+ {
79
+ internalType: "uint256",
80
+ name: "",
81
+ type: "uint256",
82
+ },
83
+ ],
84
+ stateMutability: "view",
85
+ type: "function",
86
+ },
87
+ {
88
+ inputs: [
89
+ {
90
+ internalType: "address",
91
+ name: "spender",
92
+ type: "address",
93
+ },
94
+ {
95
+ internalType: "uint256",
96
+ name: "amount",
97
+ type: "uint256",
98
+ },
99
+ ],
100
+ name: "approve",
101
+ outputs: [
102
+ {
103
+ internalType: "bool",
104
+ name: "",
105
+ type: "bool",
106
+ },
107
+ ],
108
+ stateMutability: "nonpayable",
109
+ type: "function",
110
+ },
111
+ {
112
+ inputs: [],
113
+ name: "assetDecimals",
114
+ outputs: [
115
+ {
116
+ internalType: "uint8",
117
+ name: "",
118
+ type: "uint8",
119
+ },
120
+ ],
121
+ stateMutability: "view",
122
+ type: "function",
123
+ },
124
+ {
125
+ inputs: [
126
+ {
127
+ internalType: "address",
128
+ name: "account",
129
+ type: "address",
130
+ },
131
+ ],
132
+ name: "balanceOf",
133
+ outputs: [
134
+ {
135
+ internalType: "uint256",
136
+ name: "",
137
+ type: "uint256",
138
+ },
139
+ ],
140
+ stateMutability: "view",
141
+ type: "function",
142
+ },
143
+ {
144
+ inputs: [],
145
+ name: "decimals",
146
+ outputs: [
147
+ {
148
+ internalType: "uint8",
149
+ name: "",
150
+ type: "uint8",
151
+ },
152
+ ],
153
+ stateMutability: "view",
154
+ type: "function",
155
+ },
156
+ {
157
+ inputs: [
158
+ {
159
+ internalType: "address",
160
+ name: "spender",
161
+ type: "address",
162
+ },
163
+ {
164
+ internalType: "uint256",
165
+ name: "subtractedValue",
166
+ type: "uint256",
167
+ },
168
+ ],
169
+ name: "decreaseAllowance",
170
+ outputs: [
171
+ {
172
+ internalType: "bool",
173
+ name: "",
174
+ type: "bool",
175
+ },
176
+ ],
177
+ stateMutability: "nonpayable",
178
+ type: "function",
179
+ },
180
+ {
181
+ inputs: [],
182
+ name: "getBaseTokens",
183
+ outputs: [
184
+ {
185
+ internalType: "address[]",
186
+ name: "res",
187
+ type: "address[]",
188
+ },
189
+ ],
190
+ stateMutability: "view",
191
+ type: "function",
192
+ },
193
+ {
194
+ inputs: [],
195
+ name: "getRewardTokens",
196
+ outputs: [
197
+ {
198
+ internalType: "address[]",
199
+ name: "",
200
+ type: "address[]",
201
+ },
202
+ ],
203
+ stateMutability: "view",
204
+ type: "function",
205
+ },
206
+ {
207
+ inputs: [
208
+ {
209
+ internalType: "address",
210
+ name: "",
211
+ type: "address",
212
+ },
213
+ ],
214
+ name: "globalReward",
215
+ outputs: [
216
+ {
217
+ internalType: "uint256",
218
+ name: "index",
219
+ type: "uint256",
220
+ },
221
+ {
222
+ internalType: "uint256",
223
+ name: "lastBalance",
224
+ type: "uint256",
225
+ },
226
+ ],
227
+ stateMutability: "view",
228
+ type: "function",
229
+ },
230
+ {
231
+ inputs: [
232
+ {
233
+ internalType: "address",
234
+ name: "spender",
235
+ type: "address",
236
+ },
237
+ {
238
+ internalType: "uint256",
239
+ name: "addedValue",
240
+ type: "uint256",
241
+ },
242
+ ],
243
+ name: "increaseAllowance",
244
+ outputs: [
245
+ {
246
+ internalType: "bool",
247
+ name: "",
248
+ type: "bool",
249
+ },
250
+ ],
251
+ stateMutability: "nonpayable",
252
+ type: "function",
253
+ },
254
+ {
255
+ inputs: [
256
+ {
257
+ internalType: "address",
258
+ name: "token",
259
+ type: "address",
260
+ },
261
+ ],
262
+ name: "isValidBaseToken",
263
+ outputs: [
264
+ {
265
+ internalType: "bool",
266
+ name: "",
267
+ type: "bool",
268
+ },
269
+ ],
270
+ stateMutability: "view",
271
+ type: "function",
272
+ },
273
+ {
274
+ inputs: [
275
+ {
276
+ internalType: "address",
277
+ name: "receiver",
278
+ type: "address",
279
+ },
280
+ {
281
+ internalType: "address",
282
+ name: "baseTokenIn",
283
+ type: "address",
284
+ },
285
+ {
286
+ internalType: "uint256",
287
+ name: "minAmountScyOut",
288
+ type: "uint256",
289
+ },
290
+ ],
291
+ name: "mint",
292
+ outputs: [
293
+ {
294
+ internalType: "uint256",
295
+ name: "amountScyOut",
296
+ type: "uint256",
297
+ },
298
+ ],
299
+ stateMutability: "nonpayable",
300
+ type: "function",
301
+ },
302
+ {
303
+ inputs: [],
304
+ name: "name",
305
+ outputs: [
306
+ {
307
+ internalType: "string",
308
+ name: "",
309
+ type: "string",
310
+ },
311
+ ],
312
+ stateMutability: "view",
313
+ type: "function",
314
+ },
315
+ {
316
+ inputs: [
317
+ {
318
+ internalType: "address",
319
+ name: "receiver",
320
+ type: "address",
321
+ },
322
+ {
323
+ internalType: "address",
324
+ name: "baseTokenOut",
325
+ type: "address",
326
+ },
327
+ {
328
+ internalType: "uint256",
329
+ name: "minAmountBaseOut",
330
+ type: "uint256",
331
+ },
332
+ ],
333
+ name: "redeem",
334
+ outputs: [
335
+ {
336
+ internalType: "uint256",
337
+ name: "amountBaseOut",
338
+ type: "uint256",
339
+ },
340
+ ],
341
+ stateMutability: "nonpayable",
342
+ type: "function",
343
+ },
344
+ {
345
+ inputs: [
346
+ {
347
+ internalType: "address",
348
+ name: "user",
349
+ type: "address",
350
+ },
351
+ {
352
+ internalType: "address",
353
+ name: "receiver",
354
+ type: "address",
355
+ },
356
+ ],
357
+ name: "redeemReward",
358
+ outputs: [
359
+ {
360
+ internalType: "uint256[]",
361
+ name: "outAmounts",
362
+ type: "uint256[]",
363
+ },
364
+ ],
365
+ stateMutability: "nonpayable",
366
+ type: "function",
367
+ },
368
+ {
369
+ inputs: [],
370
+ name: "scyIndexCurrent",
371
+ outputs: [
372
+ {
373
+ internalType: "uint256",
374
+ name: "res",
375
+ type: "uint256",
376
+ },
377
+ ],
378
+ stateMutability: "nonpayable",
379
+ type: "function",
380
+ },
381
+ {
382
+ inputs: [],
383
+ name: "scyIndexStored",
384
+ outputs: [
385
+ {
386
+ internalType: "uint256",
387
+ name: "res",
388
+ type: "uint256",
389
+ },
390
+ ],
391
+ stateMutability: "view",
392
+ type: "function",
393
+ },
394
+ {
395
+ inputs: [],
396
+ name: "symbol",
397
+ outputs: [
398
+ {
399
+ internalType: "string",
400
+ name: "",
401
+ type: "string",
402
+ },
403
+ ],
404
+ stateMutability: "view",
405
+ type: "function",
406
+ },
407
+ {
408
+ inputs: [],
409
+ name: "totalSupply",
410
+ outputs: [
411
+ {
412
+ internalType: "uint256",
413
+ name: "",
414
+ type: "uint256",
415
+ },
416
+ ],
417
+ stateMutability: "view",
418
+ type: "function",
419
+ },
420
+ {
421
+ inputs: [
422
+ {
423
+ internalType: "address",
424
+ name: "to",
425
+ type: "address",
426
+ },
427
+ {
428
+ internalType: "uint256",
429
+ name: "amount",
430
+ type: "uint256",
431
+ },
432
+ ],
433
+ name: "transfer",
434
+ outputs: [
435
+ {
436
+ internalType: "bool",
437
+ name: "",
438
+ type: "bool",
439
+ },
440
+ ],
441
+ stateMutability: "nonpayable",
442
+ type: "function",
443
+ },
444
+ {
445
+ inputs: [
446
+ {
447
+ internalType: "address",
448
+ name: "from",
449
+ type: "address",
450
+ },
451
+ {
452
+ internalType: "address",
453
+ name: "to",
454
+ type: "address",
455
+ },
456
+ {
457
+ internalType: "uint256",
458
+ name: "amount",
459
+ type: "uint256",
460
+ },
461
+ ],
462
+ name: "transferFrom",
463
+ outputs: [
464
+ {
465
+ internalType: "bool",
466
+ name: "",
467
+ type: "bool",
468
+ },
469
+ ],
470
+ stateMutability: "nonpayable",
471
+ type: "function",
472
+ },
473
+ {
474
+ inputs: [],
475
+ name: "updateGlobalReward",
476
+ outputs: [],
477
+ stateMutability: "nonpayable",
478
+ type: "function",
479
+ },
480
+ {
481
+ inputs: [
482
+ {
483
+ internalType: "address",
484
+ name: "user",
485
+ type: "address",
486
+ },
487
+ ],
488
+ name: "updateUserReward",
489
+ outputs: [],
490
+ stateMutability: "nonpayable",
491
+ type: "function",
492
+ },
493
+ {
494
+ inputs: [
495
+ {
496
+ internalType: "address",
497
+ name: "",
498
+ type: "address",
499
+ },
500
+ {
501
+ internalType: "address",
502
+ name: "",
503
+ type: "address",
504
+ },
505
+ ],
506
+ name: "userReward",
507
+ outputs: [
508
+ {
509
+ internalType: "uint256",
510
+ name: "lastIndex",
511
+ type: "uint256",
512
+ },
513
+ {
514
+ internalType: "uint256",
515
+ name: "accruedReward",
516
+ type: "uint256",
517
+ },
518
+ ],
519
+ stateMutability: "view",
520
+ type: "function",
521
+ },
522
+ ];
523
+
524
+ export class SCYBaseWithRewards__factory {
525
+ static readonly abi = _abi;
526
+ static createInterface(): SCYBaseWithRewardsInterface {
527
+ return new utils.Interface(_abi) as SCYBaseWithRewardsInterface;
528
+ }
529
+ static connect(
530
+ address: string,
531
+ signerOrProvider: Signer | Provider
532
+ ): SCYBaseWithRewards {
533
+ return new Contract(address, _abi, signerOrProvider) as SCYBaseWithRewards;
534
+ }
535
+ }