@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,316 @@
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
+ IUserLoyaltyRewardsAbi,
9
+ IUserLoyaltyRewardsAbiInterface,
10
+ } from "../IUserLoyaltyRewardsAbi";
11
+
12
+ const _abi = [
13
+ {
14
+ inputs: [],
15
+ name: "OnlyUserManager",
16
+ type: "error",
17
+ },
18
+ {
19
+ anonymous: false,
20
+ inputs: [],
21
+ name: "LoyaltyRewardsDisabled",
22
+ type: "event",
23
+ },
24
+ {
25
+ anonymous: false,
26
+ inputs: [],
27
+ name: "LoyaltyRewardsEnabled",
28
+ type: "event",
29
+ },
30
+ {
31
+ anonymous: false,
32
+ inputs: [
33
+ {
34
+ indexed: true,
35
+ internalType: "uint256",
36
+ name: "loyaltyLevel",
37
+ type: "uint256",
38
+ },
39
+ {
40
+ indexed: false,
41
+ internalType: "uint256",
42
+ name: "rewardRate",
43
+ type: "uint256",
44
+ },
45
+ ],
46
+ name: "UpdatedLoyaltyLevelRewardRate",
47
+ type: "event",
48
+ },
49
+ {
50
+ anonymous: false,
51
+ inputs: [
52
+ {
53
+ indexed: true,
54
+ internalType: "address",
55
+ name: "user",
56
+ type: "address",
57
+ },
58
+ {
59
+ indexed: true,
60
+ internalType: "uint256",
61
+ name: "epoch",
62
+ type: "uint256",
63
+ },
64
+ {
65
+ indexed: false,
66
+ internalType: "uint256",
67
+ name: "rewardAmount",
68
+ type: "uint256",
69
+ },
70
+ ],
71
+ name: "UserLoyaltyRewardsEmitted",
72
+ type: "event",
73
+ },
74
+ {
75
+ anonymous: false,
76
+ inputs: [
77
+ {
78
+ indexed: true,
79
+ internalType: "address",
80
+ name: "user",
81
+ type: "address",
82
+ },
83
+ {
84
+ indexed: false,
85
+ internalType: "uint256",
86
+ name: "rewardAmount",
87
+ type: "uint256",
88
+ },
89
+ ],
90
+ name: "UserRewardClaimed",
91
+ type: "event",
92
+ },
93
+ {
94
+ inputs: [
95
+ {
96
+ internalType: "uint256",
97
+ name: "amount",
98
+ type: "uint256",
99
+ },
100
+ ],
101
+ name: "claimReward",
102
+ outputs: [],
103
+ stateMutability: "nonpayable",
104
+ type: "function",
105
+ },
106
+ {
107
+ inputs: [],
108
+ name: "doEmitRewards",
109
+ outputs: [
110
+ {
111
+ internalType: "bool",
112
+ name: "",
113
+ type: "bool",
114
+ },
115
+ ],
116
+ stateMutability: "view",
117
+ type: "function",
118
+ },
119
+ {
120
+ inputs: [
121
+ {
122
+ internalType: "address",
123
+ name: "user",
124
+ type: "address",
125
+ },
126
+ {
127
+ internalType: "uint256",
128
+ name: "epoch",
129
+ type: "uint256",
130
+ },
131
+ {
132
+ internalType: "uint256",
133
+ name: "userLoyaltyLevel",
134
+ type: "uint256",
135
+ },
136
+ {
137
+ internalType: "uint256",
138
+ name: "amountDeposited",
139
+ type: "uint256",
140
+ },
141
+ ],
142
+ name: "emitUserLoyaltyReward",
143
+ outputs: [],
144
+ stateMutability: "nonpayable",
145
+ type: "function",
146
+ },
147
+ {
148
+ inputs: [
149
+ {
150
+ components: [
151
+ {
152
+ internalType: "address",
153
+ name: "user",
154
+ type: "address",
155
+ },
156
+ {
157
+ internalType: "uint256",
158
+ name: "epoch",
159
+ type: "uint256",
160
+ },
161
+ {
162
+ internalType: "uint256",
163
+ name: "userLoyaltyLevel",
164
+ type: "uint256",
165
+ },
166
+ {
167
+ internalType: "uint256",
168
+ name: "amountDeposited",
169
+ type: "uint256",
170
+ },
171
+ ],
172
+ internalType: "struct UserRewardInput[]",
173
+ name: "userRewardInputs",
174
+ type: "tuple[]",
175
+ },
176
+ {
177
+ internalType: "uint256",
178
+ name: "ksuTokenPrice",
179
+ type: "uint256",
180
+ },
181
+ ],
182
+ name: "emitUserLoyaltyRewardBatch",
183
+ outputs: [],
184
+ stateMutability: "nonpayable",
185
+ type: "function",
186
+ },
187
+ {
188
+ inputs: [
189
+ {
190
+ internalType: "uint256",
191
+ name: "loyaltyLevel",
192
+ type: "uint256",
193
+ },
194
+ ],
195
+ name: "loyaltyEpochRewardRates",
196
+ outputs: [
197
+ {
198
+ internalType: "uint256",
199
+ name: "",
200
+ type: "uint256",
201
+ },
202
+ ],
203
+ stateMutability: "view",
204
+ type: "function",
205
+ },
206
+ {
207
+ inputs: [
208
+ {
209
+ internalType: "address",
210
+ name: "tokenAddress",
211
+ type: "address",
212
+ },
213
+ {
214
+ internalType: "uint256",
215
+ name: "tokenAmount",
216
+ type: "uint256",
217
+ },
218
+ {
219
+ internalType: "address",
220
+ name: "recipient",
221
+ type: "address",
222
+ },
223
+ ],
224
+ name: "recoverERC20",
225
+ outputs: [],
226
+ stateMutability: "nonpayable",
227
+ type: "function",
228
+ },
229
+ {
230
+ inputs: [
231
+ {
232
+ internalType: "bool",
233
+ name: "doEmitRewards_",
234
+ type: "bool",
235
+ },
236
+ ],
237
+ name: "setDoEmitRewards",
238
+ outputs: [],
239
+ stateMutability: "nonpayable",
240
+ type: "function",
241
+ },
242
+ {
243
+ inputs: [
244
+ {
245
+ components: [
246
+ {
247
+ internalType: "uint256",
248
+ name: "loyaltyLevel",
249
+ type: "uint256",
250
+ },
251
+ {
252
+ internalType: "uint256",
253
+ name: "epochRewardRate",
254
+ type: "uint256",
255
+ },
256
+ ],
257
+ internalType: "struct LoyaltyEpochRewardRateInput[]",
258
+ name: "loyaltyEpochRewardRateInput",
259
+ type: "tuple[]",
260
+ },
261
+ ],
262
+ name: "setRewardRatesPerLoyaltyLevel",
263
+ outputs: [],
264
+ stateMutability: "nonpayable",
265
+ type: "function",
266
+ },
267
+ {
268
+ inputs: [],
269
+ name: "totalUnclaimedRewards",
270
+ outputs: [
271
+ {
272
+ internalType: "uint256",
273
+ name: "",
274
+ type: "uint256",
275
+ },
276
+ ],
277
+ stateMutability: "view",
278
+ type: "function",
279
+ },
280
+ {
281
+ inputs: [
282
+ {
283
+ internalType: "address",
284
+ name: "user",
285
+ type: "address",
286
+ },
287
+ ],
288
+ name: "userRewards",
289
+ outputs: [
290
+ {
291
+ internalType: "uint256",
292
+ name: "",
293
+ type: "uint256",
294
+ },
295
+ ],
296
+ stateMutability: "view",
297
+ type: "function",
298
+ },
299
+ ] as const;
300
+
301
+ export class IUserLoyaltyRewardsAbi__factory {
302
+ static readonly abi = _abi;
303
+ static createInterface(): IUserLoyaltyRewardsAbiInterface {
304
+ return new utils.Interface(_abi) as IUserLoyaltyRewardsAbiInterface;
305
+ }
306
+ static connect(
307
+ address: string,
308
+ signerOrProvider: Signer | Provider
309
+ ): IUserLoyaltyRewardsAbi {
310
+ return new Contract(
311
+ address,
312
+ _abi,
313
+ signerOrProvider
314
+ ) as IUserLoyaltyRewardsAbi;
315
+ }
316
+ }
@@ -0,0 +1,345 @@
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
+ IUserManagerAbi,
9
+ IUserManagerAbiInterface,
10
+ } from "../IUserManagerAbi";
11
+
12
+ const _abi = [
13
+ {
14
+ inputs: [],
15
+ name: "BadUserIndex",
16
+ type: "error",
17
+ },
18
+ {
19
+ anonymous: false,
20
+ inputs: [
21
+ {
22
+ indexed: true,
23
+ internalType: "address",
24
+ name: "user",
25
+ type: "address",
26
+ },
27
+ {
28
+ indexed: true,
29
+ internalType: "uint256",
30
+ name: "epoch",
31
+ type: "uint256",
32
+ },
33
+ {
34
+ indexed: false,
35
+ internalType: "uint256",
36
+ name: "loyaltyLevel",
37
+ type: "uint256",
38
+ },
39
+ ],
40
+ name: "UserLoyaltyLevelUpdated",
41
+ type: "event",
42
+ },
43
+ {
44
+ anonymous: false,
45
+ inputs: [
46
+ {
47
+ indexed: true,
48
+ internalType: "uint256",
49
+ name: "epoch",
50
+ type: "uint256",
51
+ },
52
+ {
53
+ indexed: false,
54
+ internalType: "uint256",
55
+ name: "userCount",
56
+ type: "uint256",
57
+ },
58
+ ],
59
+ name: "UserLoyaltyLevelsForEpochProcessed",
60
+ type: "event",
61
+ },
62
+ {
63
+ inputs: [],
64
+ name: "allUsers",
65
+ outputs: [
66
+ {
67
+ internalType: "address[]",
68
+ name: "",
69
+ type: "address[]",
70
+ },
71
+ ],
72
+ stateMutability: "view",
73
+ type: "function",
74
+ },
75
+ {
76
+ inputs: [
77
+ {
78
+ internalType: "uint256",
79
+ name: "epoch",
80
+ type: "uint256",
81
+ },
82
+ ],
83
+ name: "areUserEpochLoyaltyLevelProcessed",
84
+ outputs: [
85
+ {
86
+ internalType: "bool",
87
+ name: "",
88
+ type: "bool",
89
+ },
90
+ ],
91
+ stateMutability: "view",
92
+ type: "function",
93
+ },
94
+ {
95
+ inputs: [
96
+ {
97
+ internalType: "uint256",
98
+ name: "batchSize",
99
+ type: "uint256",
100
+ },
101
+ ],
102
+ name: "batchCalculateUserLoyaltyLevels",
103
+ outputs: [],
104
+ stateMutability: "nonpayable",
105
+ type: "function",
106
+ },
107
+ {
108
+ inputs: [
109
+ {
110
+ internalType: "address",
111
+ name: "user",
112
+ type: "address",
113
+ },
114
+ {
115
+ internalType: "uint256",
116
+ name: "epoch",
117
+ type: "uint256",
118
+ },
119
+ ],
120
+ name: "calculatedUserEpochLoyaltyLevel",
121
+ outputs: [
122
+ {
123
+ internalType: "uint8",
124
+ name: "loyaltyLevel",
125
+ type: "uint8",
126
+ },
127
+ ],
128
+ stateMutability: "view",
129
+ type: "function",
130
+ },
131
+ {
132
+ inputs: [
133
+ {
134
+ internalType: "address",
135
+ name: "user",
136
+ type: "address",
137
+ },
138
+ ],
139
+ name: "canUserDepositInJuniorTranche",
140
+ outputs: [
141
+ {
142
+ internalType: "bool",
143
+ name: "",
144
+ type: "bool",
145
+ },
146
+ ],
147
+ stateMutability: "view",
148
+ type: "function",
149
+ },
150
+ {
151
+ inputs: [
152
+ {
153
+ internalType: "uint256",
154
+ name: "epoch",
155
+ type: "uint256",
156
+ },
157
+ ],
158
+ name: "epochUserLoyaltyProcessing",
159
+ outputs: [
160
+ {
161
+ components: [
162
+ {
163
+ internalType: "bool",
164
+ name: "didStart",
165
+ type: "bool",
166
+ },
167
+ {
168
+ internalType: "uint256",
169
+ name: "userCount",
170
+ type: "uint256",
171
+ },
172
+ {
173
+ internalType: "uint256",
174
+ name: "processedUsersCount",
175
+ type: "uint256",
176
+ },
177
+ ],
178
+ internalType: "struct EpochUserLoyaltyProcessing",
179
+ name: "",
180
+ type: "tuple",
181
+ },
182
+ ],
183
+ stateMutability: "view",
184
+ type: "function",
185
+ },
186
+ {
187
+ inputs: [
188
+ {
189
+ internalType: "address",
190
+ name: "user",
191
+ type: "address",
192
+ },
193
+ ],
194
+ name: "hasUserRKSU",
195
+ outputs: [
196
+ {
197
+ internalType: "bool",
198
+ name: "",
199
+ type: "bool",
200
+ },
201
+ ],
202
+ stateMutability: "view",
203
+ type: "function",
204
+ },
205
+ {
206
+ inputs: [
207
+ {
208
+ internalType: "uint256",
209
+ name: "fromIndex",
210
+ type: "uint256",
211
+ },
212
+ {
213
+ internalType: "uint256",
214
+ name: "toIndex",
215
+ type: "uint256",
216
+ },
217
+ ],
218
+ name: "updateUserLendingPools",
219
+ outputs: [],
220
+ stateMutability: "nonpayable",
221
+ type: "function",
222
+ },
223
+ {
224
+ inputs: [
225
+ {
226
+ internalType: "address",
227
+ name: "user",
228
+ type: "address",
229
+ },
230
+ ],
231
+ name: "userLendingPools",
232
+ outputs: [
233
+ {
234
+ internalType: "address[]",
235
+ name: "lendingPools",
236
+ type: "address[]",
237
+ },
238
+ ],
239
+ stateMutability: "nonpayable",
240
+ type: "function",
241
+ },
242
+ {
243
+ inputs: [
244
+ {
245
+ internalType: "address",
246
+ name: "user",
247
+ type: "address",
248
+ },
249
+ ],
250
+ name: "userLoyaltyLevel",
251
+ outputs: [
252
+ {
253
+ internalType: "uint256",
254
+ name: "currentEpoch",
255
+ type: "uint256",
256
+ },
257
+ {
258
+ internalType: "uint8",
259
+ name: "loyaltyLevel",
260
+ type: "uint8",
261
+ },
262
+ ],
263
+ stateMutability: "view",
264
+ type: "function",
265
+ },
266
+ {
267
+ inputs: [
268
+ {
269
+ internalType: "address",
270
+ name: "user",
271
+ type: "address",
272
+ },
273
+ {
274
+ internalType: "address",
275
+ name: "lendingPool",
276
+ type: "address",
277
+ },
278
+ ],
279
+ name: "userRequestedDeposit",
280
+ outputs: [],
281
+ stateMutability: "nonpayable",
282
+ type: "function",
283
+ },
284
+ {
285
+ inputs: [
286
+ {
287
+ internalType: "address",
288
+ name: "user",
289
+ type: "address",
290
+ },
291
+ ],
292
+ name: "userTotalPendingAndActiveDepositedAmount",
293
+ outputs: [
294
+ {
295
+ internalType: "uint256",
296
+ name: "activeDepositAmount",
297
+ type: "uint256",
298
+ },
299
+ {
300
+ internalType: "uint256",
301
+ name: "pendingDepositAmount",
302
+ type: "uint256",
303
+ },
304
+ ],
305
+ stateMutability: "view",
306
+ type: "function",
307
+ },
308
+ {
309
+ inputs: [
310
+ {
311
+ internalType: "address",
312
+ name: "user",
313
+ type: "address",
314
+ },
315
+ ],
316
+ name: "userTotalPendingAndActiveDepositedAmountForCurrentEpoch",
317
+ outputs: [
318
+ {
319
+ internalType: "uint256",
320
+ name: "activeDepositAmount",
321
+ type: "uint256",
322
+ },
323
+ {
324
+ internalType: "uint256",
325
+ name: "pendingDepositAmount",
326
+ type: "uint256",
327
+ },
328
+ ],
329
+ stateMutability: "view",
330
+ type: "function",
331
+ },
332
+ ] as const;
333
+
334
+ export class IUserManagerAbi__factory {
335
+ static readonly abi = _abi;
336
+ static createInterface(): IUserManagerAbiInterface {
337
+ return new utils.Interface(_abi) as IUserManagerAbiInterface;
338
+ }
339
+ static connect(
340
+ address: string,
341
+ signerOrProvider: Signer | Provider
342
+ ): IUserManagerAbi {
343
+ return new Contract(address, _abi, signerOrProvider) as IUserManagerAbi;
344
+ }
345
+ }