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