@kasufinance/kasu-sdk 1.0.1

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 (219) hide show
  1. package/.eslintignore +3 -0
  2. package/.eslintrc.json +90 -0
  3. package/.github/workflows/ci.yml +0 -0
  4. package/.github/workflows/main.yml +43 -0
  5. package/.prettierignore +3 -0
  6. package/.prettierrc +28 -0
  7. package/abis/IClearingCoordinator.abi.json +410 -0
  8. package/abis/IERC20Metadata.abi.json +224 -0
  9. package/abis/IFeeManager.abi.json +66 -0
  10. package/abis/IKSULocking.abi.json +754 -0
  11. package/abis/IKasuAllowList.abi.json +455 -0
  12. package/abis/IKasuController.abi.json +423 -0
  13. package/abis/IKasuNFTs.abi.json +1523 -0
  14. package/abis/IKsuPrice.abi.json +15 -0
  15. package/abis/ILendingPool.abi.json +1431 -0
  16. package/abis/ILendingPoolFactory.abi.json +97 -0
  17. package/abis/ILendingPoolManager.abi.json +1347 -0
  18. package/abis/ILendingPoolTranche.abi.json +1317 -0
  19. package/abis/IPriceFeed.abi.json +1 -0
  20. package/abis/ISystemVariables.abi.json +431 -0
  21. package/abis/IUserLoyaltyRewards.abi.json +288 -0
  22. package/abis/IUserManager.abi.json +321 -0
  23. package/abis/KSULockBonus.abi.json +91 -0
  24. package/abis/KasuPoolExternalTVL.abi.json +812 -0
  25. package/abis/Swapper.abi.json +146 -0
  26. package/copy-abi.ps1 +15 -0
  27. package/dist/bundle.cjs.js +21646 -0
  28. package/dist/bundle.esm.js +21644 -0
  29. package/dist/contracts/IClearingCoordinatorAbi.d.ts +169 -0
  30. package/dist/contracts/IClearingCoordinatorAbi.js +1 -0
  31. package/dist/contracts/IERC20MetadataAbi.d.ts +162 -0
  32. package/dist/contracts/IERC20MetadataAbi.js +1 -0
  33. package/dist/contracts/IFeeManagerAbi.d.ts +96 -0
  34. package/dist/contracts/IFeeManagerAbi.js +1 -0
  35. package/dist/contracts/IKSULockingAbi.d.ts +466 -0
  36. package/dist/contracts/IKSULockingAbi.js +1 -0
  37. package/dist/contracts/IKasuAllowListAbi.d.ts +304 -0
  38. package/dist/contracts/IKasuAllowListAbi.js +1 -0
  39. package/dist/contracts/IKasuControllerAbi.d.ts +309 -0
  40. package/dist/contracts/IKasuControllerAbi.js +1 -0
  41. package/dist/contracts/IKasuNFTsAbi.d.ts +1121 -0
  42. package/dist/contracts/IKasuNFTsAbi.js +1 -0
  43. package/dist/contracts/IKsuPriceAbi.d.ts +42 -0
  44. package/dist/contracts/IKsuPriceAbi.js +1 -0
  45. package/dist/contracts/ILendingPoolAbi.d.ts +968 -0
  46. package/dist/contracts/ILendingPoolAbi.js +1 -0
  47. package/dist/contracts/ILendingPoolFactoryAbi.d.ts +103 -0
  48. package/dist/contracts/ILendingPoolFactoryAbi.js +1 -0
  49. package/dist/contracts/ILendingPoolManagerAbi.d.ts +779 -0
  50. package/dist/contracts/ILendingPoolManagerAbi.js +1 -0
  51. package/dist/contracts/ILendingPoolTrancheAbi.d.ts +752 -0
  52. package/dist/contracts/ILendingPoolTrancheAbi.js +1 -0
  53. package/dist/contracts/ISystemVariablesAbi.d.ts +378 -0
  54. package/dist/contracts/ISystemVariablesAbi.js +1 -0
  55. package/dist/contracts/IUserLoyaltyRewardsAbi.d.ts +248 -0
  56. package/dist/contracts/IUserLoyaltyRewardsAbi.js +1 -0
  57. package/dist/contracts/IUserManagerAbi.d.ts +270 -0
  58. package/dist/contracts/IUserManagerAbi.js +1 -0
  59. package/dist/contracts/KSULockBonusAbi.d.ts +61 -0
  60. package/dist/contracts/KSULockBonusAbi.js +1 -0
  61. package/dist/contracts/KasuPoolExternalTVLAbi.d.ts +411 -0
  62. package/dist/contracts/KasuPoolExternalTVLAbi.js +1 -0
  63. package/dist/contracts/SwapperAbi.d.ts +120 -0
  64. package/dist/contracts/SwapperAbi.js +1 -0
  65. package/dist/contracts/common.d.ts +21 -0
  66. package/dist/contracts/common.js +1 -0
  67. package/dist/contracts/factories/IClearingCoordinatorAbi__factory.d.ts +320 -0
  68. package/dist/contracts/factories/IClearingCoordinatorAbi__factory.js +423 -0
  69. package/dist/contracts/factories/IERC20MetadataAbi__factory.d.ts +178 -0
  70. package/dist/contracts/factories/IERC20MetadataAbi__factory.js +237 -0
  71. package/dist/contracts/factories/IFeeManagerAbi__factory.d.ts +59 -0
  72. package/dist/contracts/factories/IFeeManagerAbi__factory.js +79 -0
  73. package/dist/contracts/factories/IKSULockingAbi__factory.d.ts +588 -0
  74. package/dist/contracts/factories/IKSULockingAbi__factory.js +767 -0
  75. package/dist/contracts/factories/IKasuAllowListAbi__factory.d.ts +354 -0
  76. package/dist/contracts/factories/IKasuAllowListAbi__factory.js +468 -0
  77. package/dist/contracts/factories/IKasuControllerAbi__factory.d.ts +339 -0
  78. package/dist/contracts/factories/IKasuControllerAbi__factory.js +436 -0
  79. package/dist/contracts/factories/IKasuNFTsAbi__factory.d.ts +1629 -0
  80. package/dist/contracts/factories/IKasuNFTsAbi__factory.js +2108 -0
  81. package/dist/contracts/factories/IKsuPriceAbi__factory.d.ts +18 -0
  82. package/dist/contracts/factories/IKsuPriceAbi__factory.js +28 -0
  83. package/dist/contracts/factories/ILendingPoolAbi__factory.d.ts +1109 -0
  84. package/dist/contracts/factories/ILendingPoolAbi__factory.js +1444 -0
  85. package/dist/contracts/factories/ILendingPoolFactoryAbi__factory.d.ts +81 -0
  86. package/dist/contracts/factories/ILendingPoolFactoryAbi__factory.js +110 -0
  87. package/dist/contracts/factories/ILendingPoolManagerAbi__factory.d.ts +1045 -0
  88. package/dist/contracts/factories/ILendingPoolManagerAbi__factory.js +1360 -0
  89. package/dist/contracts/factories/ILendingPoolTrancheAbi__factory.d.ts +1015 -0
  90. package/dist/contracts/factories/ILendingPoolTrancheAbi__factory.js +1330 -0
  91. package/dist/contracts/factories/ISystemVariablesAbi__factory.d.ts +338 -0
  92. package/dist/contracts/factories/ISystemVariablesAbi__factory.js +444 -0
  93. package/dist/contracts/factories/IUserLoyaltyRewardsAbi__factory.d.ts +230 -0
  94. package/dist/contracts/factories/IUserLoyaltyRewardsAbi__factory.js +301 -0
  95. package/dist/contracts/factories/IUserManagerAbi__factory.d.ts +250 -0
  96. package/dist/contracts/factories/IUserManagerAbi__factory.js +334 -0
  97. package/dist/contracts/factories/KSULockBonusAbi__factory.d.ts +76 -0
  98. package/dist/contracts/factories/KSULockBonusAbi__factory.js +104 -0
  99. package/dist/contracts/factories/KasuPoolExternalTVLAbi__factory.d.ts +631 -0
  100. package/dist/contracts/factories/KasuPoolExternalTVLAbi__factory.js +825 -0
  101. package/dist/contracts/factories/SwapperAbi__factory.d.ts +120 -0
  102. package/dist/contracts/factories/SwapperAbi__factory.js +159 -0
  103. package/dist/contracts/factories/index.d.ts +18 -0
  104. package/dist/contracts/factories/index.js +21 -0
  105. package/dist/contracts/index.d.ts +37 -0
  106. package/dist/contracts/index.js +19 -0
  107. package/dist/index.d.ts +17 -0
  108. package/dist/index.js +16 -0
  109. package/dist/sdk-config.d.ts +22 -0
  110. package/dist/sdk-config.js +9 -0
  111. package/dist/services/DataService/data-service.d.ts +37 -0
  112. package/dist/services/DataService/data-service.js +586 -0
  113. package/dist/services/DataService/directus-types.d.ts +187 -0
  114. package/dist/services/DataService/directus-types.js +1 -0
  115. package/dist/services/DataService/queries.d.ts +7 -0
  116. package/dist/services/DataService/queries.js +158 -0
  117. package/dist/services/DataService/subgraph-types.d.ts +95 -0
  118. package/dist/services/DataService/subgraph-types.js +1 -0
  119. package/dist/services/DataService/types.d.ts +169 -0
  120. package/dist/services/DataService/types.js +1 -0
  121. package/dist/services/Locking/locking.d.ts +61 -0
  122. package/dist/services/Locking/locking.js +344 -0
  123. package/dist/services/Locking/queries.d.ts +10 -0
  124. package/dist/services/Locking/queries.js +108 -0
  125. package/dist/services/Locking/types.d.ts +117 -0
  126. package/dist/services/Locking/types.js +1 -0
  127. package/dist/services/Portfolio/portfolio.d.ts +22 -0
  128. package/dist/services/Portfolio/portfolio.js +325 -0
  129. package/dist/services/Portfolio/queries.d.ts +2 -0
  130. package/dist/services/Portfolio/queries.js +164 -0
  131. package/dist/services/Portfolio/types.d.ts +206 -0
  132. package/dist/services/Portfolio/types.js +1 -0
  133. package/dist/services/Swapper/swapper.d.ts +11 -0
  134. package/dist/services/Swapper/swapper.js +97 -0
  135. package/dist/services/Swapper/types.d.ts +51 -0
  136. package/dist/services/Swapper/types.js +1 -0
  137. package/dist/services/UserLending/helper.d.ts +2 -0
  138. package/dist/services/UserLending/helper.js +16 -0
  139. package/dist/services/UserLending/queries.d.ts +8 -0
  140. package/dist/services/UserLending/queries.js +188 -0
  141. package/dist/services/UserLending/subgraph-types.d.ts +147 -0
  142. package/dist/services/UserLending/subgraph-types.js +6 -0
  143. package/dist/services/UserLending/types.d.ts +102 -0
  144. package/dist/services/UserLending/types.js +13 -0
  145. package/dist/services/UserLending/user-lending.d.ts +55 -0
  146. package/dist/services/UserLending/user-lending.js +490 -0
  147. package/dist/services/shared.d.ts +1 -0
  148. package/dist/services/shared.js +11 -0
  149. package/dist/tests/sample.test.d.ts +1 -0
  150. package/dist/tests/sample.test.js +32 -0
  151. package/index.ts +2 -0
  152. package/jest-config.ts +9 -0
  153. package/jest.config.js +8 -0
  154. package/package.json +49 -0
  155. package/rollup.config.js +45 -0
  156. package/src/contracts/IClearingCoordinatorAbi.ts +406 -0
  157. package/src/contracts/IERC20MetadataAbi.ts +364 -0
  158. package/src/contracts/IFeeManagerAbi.ts +182 -0
  159. package/src/contracts/IKSULockingAbi.ts +965 -0
  160. package/src/contracts/IKasuAllowListAbi.ts +605 -0
  161. package/src/contracts/IKasuControllerAbi.ts +703 -0
  162. package/src/contracts/IKasuNFTsAbi.ts +2744 -0
  163. package/src/contracts/IKsuPriceAbi.ts +87 -0
  164. package/src/contracts/ILendingPoolAbi.ts +2081 -0
  165. package/src/contracts/ILendingPoolFactoryAbi.ts +161 -0
  166. package/src/contracts/ILendingPoolManagerAbi.ts +1917 -0
  167. package/src/contracts/ILendingPoolTrancheAbi.ts +1911 -0
  168. package/src/contracts/ISystemVariablesAbi.ts +908 -0
  169. package/src/contracts/IUserLoyaltyRewardsAbi.ts +544 -0
  170. package/src/contracts/IUserManagerAbi.ts +612 -0
  171. package/src/contracts/KSULockBonusAbi.ts +124 -0
  172. package/src/contracts/KasuPoolExternalTVLAbi.ts +1071 -0
  173. package/src/contracts/SwapperAbi.ts +266 -0
  174. package/src/contracts/common.ts +44 -0
  175. package/src/contracts/factories/IClearingCoordinatorAbi__factory.ts +438 -0
  176. package/src/contracts/factories/IERC20MetadataAbi__factory.ts +248 -0
  177. package/src/contracts/factories/IFeeManagerAbi__factory.ts +90 -0
  178. package/src/contracts/factories/IKSULockingAbi__factory.ts +778 -0
  179. package/src/contracts/factories/IKasuAllowListAbi__factory.ts +479 -0
  180. package/src/contracts/factories/IKasuControllerAbi__factory.ts +447 -0
  181. package/src/contracts/factories/IKasuNFTsAbi__factory.ts +2116 -0
  182. package/src/contracts/factories/IKsuPriceAbi__factory.ts +36 -0
  183. package/src/contracts/factories/ILendingPoolAbi__factory.ts +1455 -0
  184. package/src/contracts/factories/ILendingPoolFactoryAbi__factory.ts +125 -0
  185. package/src/contracts/factories/ILendingPoolManagerAbi__factory.ts +1375 -0
  186. package/src/contracts/factories/ILendingPoolTrancheAbi__factory.ts +1345 -0
  187. package/src/contracts/factories/ISystemVariablesAbi__factory.ts +455 -0
  188. package/src/contracts/factories/IUserLoyaltyRewardsAbi__factory.ts +316 -0
  189. package/src/contracts/factories/IUserManagerAbi__factory.ts +345 -0
  190. package/src/contracts/factories/KSULockBonusAbi__factory.ts +115 -0
  191. package/src/contracts/factories/KasuPoolExternalTVLAbi__factory.ts +840 -0
  192. package/src/contracts/factories/SwapperAbi__factory.ts +167 -0
  193. package/src/contracts/factories/index.ts +21 -0
  194. package/src/contracts/index.ts +40 -0
  195. package/src/index.ts +27 -0
  196. package/src/sdk-config.ts +35 -0
  197. package/src/services/DataService/data-service.ts +1017 -0
  198. package/src/services/DataService/directus-types.ts +199 -0
  199. package/src/services/DataService/queries.ts +165 -0
  200. package/src/services/DataService/subgraph-types.ts +104 -0
  201. package/src/services/DataService/types.ts +184 -0
  202. package/src/services/Locking/locking.ts +541 -0
  203. package/src/services/Locking/queries.ts +118 -0
  204. package/src/services/Locking/types.ts +141 -0
  205. package/src/services/Portfolio/portfolio.ts +593 -0
  206. package/src/services/Portfolio/queries.ts +166 -0
  207. package/src/services/Portfolio/types.ts +220 -0
  208. package/src/services/Swapper/swapper.ts +158 -0
  209. package/src/services/Swapper/types.ts +54 -0
  210. package/src/services/UserLending/helper.ts +28 -0
  211. package/src/services/UserLending/queries.ts +196 -0
  212. package/src/services/UserLending/subgraph-types.ts +173 -0
  213. package/src/services/UserLending/types.ts +123 -0
  214. package/src/services/UserLending/user-lending.ts +933 -0
  215. package/src/services/shared.ts +11 -0
  216. package/src/tests/sample.test.ts +44 -0
  217. package/tsconfig.json +27 -0
  218. package/tsconfig.tsbuildinfo +1 -0
  219. package/versioner.sh +6 -0
@@ -0,0 +1,767 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import { Contract, utils } from "ethers";
5
+ const _abi = [
6
+ {
7
+ inputs: [
8
+ {
9
+ internalType: "uint256",
10
+ name: "lockPeriod",
11
+ type: "uint256",
12
+ },
13
+ ],
14
+ name: "DepositLocked",
15
+ type: "error",
16
+ },
17
+ {
18
+ inputs: [
19
+ {
20
+ internalType: "uint256",
21
+ name: "userLockId",
22
+ type: "uint256",
23
+ },
24
+ ],
25
+ name: "InvalidUserDeposit",
26
+ type: "error",
27
+ },
28
+ {
29
+ inputs: [],
30
+ name: "LockAmountShouldBeMoreThanZero",
31
+ type: "error",
32
+ },
33
+ {
34
+ inputs: [
35
+ {
36
+ internalType: "uint256",
37
+ name: "lockPeriod",
38
+ type: "uint256",
39
+ },
40
+ ],
41
+ name: "LockPeriodAlreadyExists",
42
+ type: "error",
43
+ },
44
+ {
45
+ inputs: [
46
+ {
47
+ internalType: "uint256",
48
+ name: "lockPeriod",
49
+ type: "uint256",
50
+ },
51
+ ],
52
+ name: "LockPeriodNotSupported",
53
+ type: "error",
54
+ },
55
+ {
56
+ inputs: [],
57
+ name: "UnlockAmountShouldBeMoreThanZero",
58
+ type: "error",
59
+ },
60
+ {
61
+ inputs: [
62
+ {
63
+ internalType: "uint256",
64
+ name: "userLockId",
65
+ type: "uint256",
66
+ },
67
+ {
68
+ internalType: "uint256",
69
+ name: "lockAmount",
70
+ type: "uint256",
71
+ },
72
+ {
73
+ internalType: "uint256",
74
+ name: "requestedUnlockAmount",
75
+ type: "uint256",
76
+ },
77
+ ],
78
+ name: "UserUnlockAmountTooHigh",
79
+ type: "error",
80
+ },
81
+ {
82
+ anonymous: false,
83
+ inputs: [
84
+ {
85
+ indexed: true,
86
+ internalType: "address",
87
+ name: "owner",
88
+ type: "address",
89
+ },
90
+ {
91
+ indexed: true,
92
+ internalType: "address",
93
+ name: "spender",
94
+ type: "address",
95
+ },
96
+ {
97
+ indexed: false,
98
+ internalType: "uint256",
99
+ name: "value",
100
+ type: "uint256",
101
+ },
102
+ ],
103
+ name: "Approval",
104
+ type: "event",
105
+ },
106
+ {
107
+ anonymous: false,
108
+ inputs: [
109
+ {
110
+ indexed: true,
111
+ internalType: "address",
112
+ name: "user",
113
+ type: "address",
114
+ },
115
+ {
116
+ indexed: true,
117
+ internalType: "uint256",
118
+ name: "lockId",
119
+ type: "uint256",
120
+ },
121
+ {
122
+ indexed: false,
123
+ internalType: "uint256",
124
+ name: "ksuAmount",
125
+ type: "uint256",
126
+ },
127
+ {
128
+ indexed: false,
129
+ internalType: "uint256",
130
+ name: "rKSUBurned",
131
+ type: "uint256",
132
+ },
133
+ {
134
+ indexed: false,
135
+ internalType: "address",
136
+ name: "receiver",
137
+ type: "address",
138
+ },
139
+ ],
140
+ name: "EmergencyWithdraw",
141
+ type: "event",
142
+ },
143
+ {
144
+ anonymous: false,
145
+ inputs: [
146
+ {
147
+ indexed: true,
148
+ internalType: "address",
149
+ name: "user",
150
+ type: "address",
151
+ },
152
+ {
153
+ indexed: false,
154
+ internalType: "uint256",
155
+ name: "amount",
156
+ type: "uint256",
157
+ },
158
+ ],
159
+ name: "FeesClaimed",
160
+ type: "event",
161
+ },
162
+ {
163
+ anonymous: false,
164
+ inputs: [
165
+ {
166
+ indexed: true,
167
+ internalType: "address",
168
+ name: "user",
169
+ type: "address",
170
+ },
171
+ {
172
+ indexed: false,
173
+ internalType: "uint256",
174
+ name: "amount",
175
+ type: "uint256",
176
+ },
177
+ ],
178
+ name: "FeesEmitted",
179
+ type: "event",
180
+ },
181
+ {
182
+ anonymous: false,
183
+ inputs: [
184
+ {
185
+ indexed: true,
186
+ internalType: "uint256",
187
+ name: "lockPeriod",
188
+ type: "uint256",
189
+ },
190
+ {
191
+ indexed: false,
192
+ internalType: "uint256",
193
+ name: "rKSUMultiplier",
194
+ type: "uint256",
195
+ },
196
+ {
197
+ indexed: false,
198
+ internalType: "uint256",
199
+ name: "ksuBonusMultiplier",
200
+ type: "uint256",
201
+ },
202
+ ],
203
+ name: "LockPeriodAdded",
204
+ type: "event",
205
+ },
206
+ {
207
+ anonymous: false,
208
+ inputs: [
209
+ {
210
+ indexed: true,
211
+ internalType: "address",
212
+ name: "from",
213
+ type: "address",
214
+ },
215
+ {
216
+ indexed: true,
217
+ internalType: "address",
218
+ name: "to",
219
+ type: "address",
220
+ },
221
+ {
222
+ indexed: false,
223
+ internalType: "uint256",
224
+ name: "value",
225
+ type: "uint256",
226
+ },
227
+ ],
228
+ name: "Transfer",
229
+ type: "event",
230
+ },
231
+ {
232
+ anonymous: false,
233
+ inputs: [
234
+ {
235
+ indexed: true,
236
+ internalType: "address",
237
+ name: "user",
238
+ type: "address",
239
+ },
240
+ {
241
+ indexed: true,
242
+ internalType: "uint256",
243
+ name: "lockId",
244
+ type: "uint256",
245
+ },
246
+ {
247
+ indexed: true,
248
+ internalType: "uint256",
249
+ name: "lockPeriod",
250
+ type: "uint256",
251
+ },
252
+ {
253
+ indexed: false,
254
+ internalType: "uint256",
255
+ name: "ksuAmount",
256
+ type: "uint256",
257
+ },
258
+ {
259
+ indexed: false,
260
+ internalType: "uint256",
261
+ name: "ksuBonusAmount",
262
+ type: "uint256",
263
+ },
264
+ {
265
+ indexed: false,
266
+ internalType: "uint256",
267
+ name: "rKSUMinted",
268
+ type: "uint256",
269
+ },
270
+ ],
271
+ name: "UserLocked",
272
+ type: "event",
273
+ },
274
+ {
275
+ anonymous: false,
276
+ inputs: [
277
+ {
278
+ indexed: true,
279
+ internalType: "address",
280
+ name: "user",
281
+ type: "address",
282
+ },
283
+ {
284
+ indexed: true,
285
+ internalType: "uint256",
286
+ name: "lockId",
287
+ type: "uint256",
288
+ },
289
+ {
290
+ indexed: false,
291
+ internalType: "uint256",
292
+ name: "ksuAmount",
293
+ type: "uint256",
294
+ },
295
+ {
296
+ indexed: false,
297
+ internalType: "uint256",
298
+ name: "rKSUBurned",
299
+ type: "uint256",
300
+ },
301
+ ],
302
+ name: "UserUnlocked",
303
+ type: "event",
304
+ },
305
+ {
306
+ inputs: [
307
+ {
308
+ internalType: "uint256",
309
+ name: "lockPeriod",
310
+ type: "uint256",
311
+ },
312
+ {
313
+ internalType: "uint256",
314
+ name: "rKSUMultiplier",
315
+ type: "uint256",
316
+ },
317
+ {
318
+ internalType: "uint256",
319
+ name: "ksuBonusMultiplier",
320
+ type: "uint256",
321
+ },
322
+ ],
323
+ name: "addLockPeriod",
324
+ outputs: [],
325
+ stateMutability: "nonpayable",
326
+ type: "function",
327
+ },
328
+ {
329
+ inputs: [
330
+ {
331
+ internalType: "address",
332
+ name: "owner",
333
+ type: "address",
334
+ },
335
+ {
336
+ internalType: "address",
337
+ name: "spender",
338
+ type: "address",
339
+ },
340
+ ],
341
+ name: "allowance",
342
+ outputs: [
343
+ {
344
+ internalType: "uint256",
345
+ name: "",
346
+ type: "uint256",
347
+ },
348
+ ],
349
+ stateMutability: "view",
350
+ type: "function",
351
+ },
352
+ {
353
+ inputs: [
354
+ {
355
+ internalType: "address",
356
+ name: "spender",
357
+ type: "address",
358
+ },
359
+ {
360
+ internalType: "uint256",
361
+ name: "value",
362
+ type: "uint256",
363
+ },
364
+ ],
365
+ name: "approve",
366
+ outputs: [
367
+ {
368
+ internalType: "bool",
369
+ name: "",
370
+ type: "bool",
371
+ },
372
+ ],
373
+ stateMutability: "nonpayable",
374
+ type: "function",
375
+ },
376
+ {
377
+ inputs: [
378
+ {
379
+ internalType: "address",
380
+ name: "account",
381
+ type: "address",
382
+ },
383
+ ],
384
+ name: "balanceOf",
385
+ outputs: [
386
+ {
387
+ internalType: "uint256",
388
+ name: "",
389
+ type: "uint256",
390
+ },
391
+ ],
392
+ stateMutability: "view",
393
+ type: "function",
394
+ },
395
+ {
396
+ inputs: [],
397
+ name: "claimFees",
398
+ outputs: [
399
+ {
400
+ internalType: "uint256",
401
+ name: "earned",
402
+ type: "uint256",
403
+ },
404
+ ],
405
+ stateMutability: "nonpayable",
406
+ type: "function",
407
+ },
408
+ {
409
+ inputs: [
410
+ {
411
+ components: [
412
+ {
413
+ internalType: "address",
414
+ name: "user",
415
+ type: "address",
416
+ },
417
+ {
418
+ internalType: "uint256",
419
+ name: "lockId",
420
+ type: "uint256",
421
+ },
422
+ {
423
+ internalType: "uint256",
424
+ name: "withdrawAmount",
425
+ type: "uint256",
426
+ },
427
+ ],
428
+ internalType: "struct EmergencyWithdrawInput[]",
429
+ name: "emergencyWithdrawInput",
430
+ type: "tuple[]",
431
+ },
432
+ {
433
+ internalType: "address",
434
+ name: "receiver",
435
+ type: "address",
436
+ },
437
+ ],
438
+ name: "emergencyWithdraw",
439
+ outputs: [],
440
+ stateMutability: "nonpayable",
441
+ type: "function",
442
+ },
443
+ {
444
+ inputs: [
445
+ {
446
+ internalType: "uint256",
447
+ name: "amount",
448
+ type: "uint256",
449
+ },
450
+ ],
451
+ name: "emitFees",
452
+ outputs: [],
453
+ stateMutability: "nonpayable",
454
+ type: "function",
455
+ },
456
+ {
457
+ inputs: [
458
+ {
459
+ internalType: "uint256",
460
+ name: "amount",
461
+ type: "uint256",
462
+ },
463
+ {
464
+ internalType: "uint256",
465
+ name: "lockPeriod",
466
+ type: "uint256",
467
+ },
468
+ ],
469
+ name: "lock",
470
+ outputs: [
471
+ {
472
+ internalType: "uint256",
473
+ name: "userLockId",
474
+ type: "uint256",
475
+ },
476
+ ],
477
+ stateMutability: "nonpayable",
478
+ type: "function",
479
+ },
480
+ {
481
+ inputs: [
482
+ {
483
+ internalType: "uint256",
484
+ name: "lockPeriod",
485
+ type: "uint256",
486
+ },
487
+ ],
488
+ name: "lockDetails",
489
+ outputs: [
490
+ {
491
+ components: [
492
+ {
493
+ internalType: "uint256",
494
+ name: "rKSUMultiplier",
495
+ type: "uint256",
496
+ },
497
+ {
498
+ internalType: "uint256",
499
+ name: "ksuBonusMultiplier",
500
+ type: "uint256",
501
+ },
502
+ {
503
+ internalType: "bool",
504
+ name: "isActive",
505
+ type: "bool",
506
+ },
507
+ ],
508
+ internalType: "struct IKSULocking.LockPeriodDetails",
509
+ name: "",
510
+ type: "tuple",
511
+ },
512
+ ],
513
+ stateMutability: "view",
514
+ type: "function",
515
+ },
516
+ {
517
+ inputs: [
518
+ {
519
+ internalType: "uint256",
520
+ name: "amount",
521
+ type: "uint256",
522
+ },
523
+ {
524
+ internalType: "uint256",
525
+ name: "lockPeriod",
526
+ type: "uint256",
527
+ },
528
+ {
529
+ components: [
530
+ {
531
+ internalType: "uint256",
532
+ name: "value",
533
+ type: "uint256",
534
+ },
535
+ {
536
+ internalType: "uint256",
537
+ name: "deadline",
538
+ type: "uint256",
539
+ },
540
+ {
541
+ internalType: "uint8",
542
+ name: "v",
543
+ type: "uint8",
544
+ },
545
+ {
546
+ internalType: "bytes32",
547
+ name: "r",
548
+ type: "bytes32",
549
+ },
550
+ {
551
+ internalType: "bytes32",
552
+ name: "s",
553
+ type: "bytes32",
554
+ },
555
+ ],
556
+ internalType: "struct IKSULocking.ERC20PermitPayload",
557
+ name: "ksuPermit",
558
+ type: "tuple",
559
+ },
560
+ ],
561
+ name: "lockWithPermit",
562
+ outputs: [
563
+ {
564
+ internalType: "uint256",
565
+ name: "userLockId",
566
+ type: "uint256",
567
+ },
568
+ ],
569
+ stateMutability: "nonpayable",
570
+ type: "function",
571
+ },
572
+ {
573
+ inputs: [
574
+ {
575
+ internalType: "address",
576
+ name: "user",
577
+ type: "address",
578
+ },
579
+ ],
580
+ name: "rewards",
581
+ outputs: [
582
+ {
583
+ internalType: "uint256",
584
+ name: "",
585
+ type: "uint256",
586
+ },
587
+ ],
588
+ stateMutability: "view",
589
+ type: "function",
590
+ },
591
+ {
592
+ inputs: [
593
+ {
594
+ internalType: "address",
595
+ name: "ksuBonusTokens_",
596
+ type: "address",
597
+ },
598
+ ],
599
+ name: "setKSULockBonus",
600
+ outputs: [],
601
+ stateMutability: "nonpayable",
602
+ type: "function",
603
+ },
604
+ {
605
+ inputs: [],
606
+ name: "totalSupply",
607
+ outputs: [
608
+ {
609
+ internalType: "uint256",
610
+ name: "",
611
+ type: "uint256",
612
+ },
613
+ ],
614
+ stateMutability: "view",
615
+ type: "function",
616
+ },
617
+ {
618
+ inputs: [
619
+ {
620
+ internalType: "address",
621
+ name: "to",
622
+ type: "address",
623
+ },
624
+ {
625
+ internalType: "uint256",
626
+ name: "value",
627
+ type: "uint256",
628
+ },
629
+ ],
630
+ name: "transfer",
631
+ outputs: [
632
+ {
633
+ internalType: "bool",
634
+ name: "",
635
+ type: "bool",
636
+ },
637
+ ],
638
+ stateMutability: "nonpayable",
639
+ type: "function",
640
+ },
641
+ {
642
+ inputs: [
643
+ {
644
+ internalType: "address",
645
+ name: "from",
646
+ type: "address",
647
+ },
648
+ {
649
+ internalType: "address",
650
+ name: "to",
651
+ type: "address",
652
+ },
653
+ {
654
+ internalType: "uint256",
655
+ name: "value",
656
+ type: "uint256",
657
+ },
658
+ ],
659
+ name: "transferFrom",
660
+ outputs: [
661
+ {
662
+ internalType: "bool",
663
+ name: "",
664
+ type: "bool",
665
+ },
666
+ ],
667
+ stateMutability: "nonpayable",
668
+ type: "function",
669
+ },
670
+ {
671
+ inputs: [
672
+ {
673
+ internalType: "uint256",
674
+ name: "amount",
675
+ type: "uint256",
676
+ },
677
+ {
678
+ internalType: "uint256",
679
+ name: "userLockId",
680
+ type: "uint256",
681
+ },
682
+ ],
683
+ name: "unlock",
684
+ outputs: [],
685
+ stateMutability: "nonpayable",
686
+ type: "function",
687
+ },
688
+ {
689
+ inputs: [
690
+ {
691
+ internalType: "address",
692
+ name: "",
693
+ type: "address",
694
+ },
695
+ {
696
+ internalType: "uint256",
697
+ name: "",
698
+ type: "uint256",
699
+ },
700
+ ],
701
+ name: "userLock",
702
+ outputs: [
703
+ {
704
+ components: [
705
+ {
706
+ internalType: "uint256",
707
+ name: "amount",
708
+ type: "uint256",
709
+ },
710
+ {
711
+ internalType: "uint256",
712
+ name: "rKSUAmount",
713
+ type: "uint256",
714
+ },
715
+ {
716
+ internalType: "uint256",
717
+ name: "rKSUMultiplier",
718
+ type: "uint256",
719
+ },
720
+ {
721
+ internalType: "uint256",
722
+ name: "startTime",
723
+ type: "uint256",
724
+ },
725
+ {
726
+ internalType: "uint256",
727
+ name: "lockPeriod",
728
+ type: "uint256",
729
+ },
730
+ ],
731
+ internalType: "struct IKSULocking.UserLock",
732
+ name: "",
733
+ type: "tuple",
734
+ },
735
+ ],
736
+ stateMutability: "view",
737
+ type: "function",
738
+ },
739
+ {
740
+ inputs: [
741
+ {
742
+ internalType: "address",
743
+ name: "",
744
+ type: "address",
745
+ },
746
+ ],
747
+ name: "userTotalDeposits",
748
+ outputs: [
749
+ {
750
+ internalType: "uint256",
751
+ name: "",
752
+ type: "uint256",
753
+ },
754
+ ],
755
+ stateMutability: "view",
756
+ type: "function",
757
+ },
758
+ ];
759
+ export class IKSULockingAbi__factory {
760
+ static createInterface() {
761
+ return new utils.Interface(_abi);
762
+ }
763
+ static connect(address, signerOrProvider) {
764
+ return new Contract(address, _abi, signerOrProvider);
765
+ }
766
+ }
767
+ IKSULockingAbi__factory.abi = _abi;