@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,1330 @@
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: "lossId",
11
+ type: "uint256",
12
+ },
13
+ ],
14
+ name: "LossIdNotValid",
15
+ type: "error",
16
+ },
17
+ {
18
+ inputs: [
19
+ {
20
+ internalType: "uint256",
21
+ name: "lossId",
22
+ type: "uint256",
23
+ },
24
+ ],
25
+ name: "LossMintAlreadyComplete",
26
+ type: "error",
27
+ },
28
+ {
29
+ inputs: [
30
+ {
31
+ internalType: "uint256",
32
+ name: "lossId",
33
+ type: "uint256",
34
+ },
35
+ ],
36
+ name: "LossMintingInProgress",
37
+ type: "error",
38
+ },
39
+ {
40
+ inputs: [
41
+ {
42
+ internalType: "uint256",
43
+ name: "lossId",
44
+ type: "uint256",
45
+ },
46
+ ],
47
+ name: "LossMintingNotYetComplete",
48
+ type: "error",
49
+ },
50
+ {
51
+ anonymous: false,
52
+ inputs: [
53
+ {
54
+ indexed: true,
55
+ internalType: "address",
56
+ name: "owner",
57
+ type: "address",
58
+ },
59
+ {
60
+ indexed: true,
61
+ internalType: "address",
62
+ name: "spender",
63
+ type: "address",
64
+ },
65
+ {
66
+ indexed: false,
67
+ internalType: "uint256",
68
+ name: "value",
69
+ type: "uint256",
70
+ },
71
+ ],
72
+ name: "Approval",
73
+ type: "event",
74
+ },
75
+ {
76
+ anonymous: false,
77
+ inputs: [
78
+ {
79
+ indexed: true,
80
+ internalType: "address",
81
+ name: "account",
82
+ type: "address",
83
+ },
84
+ {
85
+ indexed: true,
86
+ internalType: "address",
87
+ name: "operator",
88
+ type: "address",
89
+ },
90
+ {
91
+ indexed: false,
92
+ internalType: "bool",
93
+ name: "approved",
94
+ type: "bool",
95
+ },
96
+ ],
97
+ name: "ApprovalForAll",
98
+ type: "event",
99
+ },
100
+ {
101
+ anonymous: false,
102
+ inputs: [
103
+ {
104
+ indexed: true,
105
+ internalType: "address",
106
+ name: "sender",
107
+ type: "address",
108
+ },
109
+ {
110
+ indexed: true,
111
+ internalType: "address",
112
+ name: "owner",
113
+ type: "address",
114
+ },
115
+ {
116
+ indexed: false,
117
+ internalType: "uint256",
118
+ name: "assets",
119
+ type: "uint256",
120
+ },
121
+ {
122
+ indexed: false,
123
+ internalType: "uint256",
124
+ name: "shares",
125
+ type: "uint256",
126
+ },
127
+ ],
128
+ name: "Deposit",
129
+ type: "event",
130
+ },
131
+ {
132
+ anonymous: false,
133
+ inputs: [
134
+ {
135
+ indexed: true,
136
+ internalType: "address",
137
+ name: "user",
138
+ type: "address",
139
+ },
140
+ {
141
+ indexed: true,
142
+ internalType: "uint256",
143
+ name: "lossId",
144
+ type: "uint256",
145
+ },
146
+ {
147
+ indexed: false,
148
+ internalType: "uint256",
149
+ name: "amount",
150
+ type: "uint256",
151
+ },
152
+ ],
153
+ name: "LossClaimed",
154
+ type: "event",
155
+ },
156
+ {
157
+ anonymous: false,
158
+ inputs: [
159
+ {
160
+ indexed: true,
161
+ internalType: "uint256",
162
+ name: "lossId",
163
+ type: "uint256",
164
+ },
165
+ ],
166
+ name: "LossMintingComplete",
167
+ type: "event",
168
+ },
169
+ {
170
+ anonymous: false,
171
+ inputs: [
172
+ {
173
+ indexed: true,
174
+ internalType: "uint256",
175
+ name: "lossId",
176
+ type: "uint256",
177
+ },
178
+ {
179
+ indexed: false,
180
+ internalType: "uint256",
181
+ name: "lossAmount",
182
+ type: "uint256",
183
+ },
184
+ {
185
+ indexed: false,
186
+ internalType: "uint256",
187
+ name: "usersCount",
188
+ type: "uint256",
189
+ },
190
+ ],
191
+ name: "LossRegistered",
192
+ type: "event",
193
+ },
194
+ {
195
+ anonymous: false,
196
+ inputs: [
197
+ {
198
+ indexed: true,
199
+ internalType: "uint256",
200
+ name: "lossId",
201
+ type: "uint256",
202
+ },
203
+ {
204
+ indexed: false,
205
+ internalType: "uint256",
206
+ name: "amount",
207
+ type: "uint256",
208
+ },
209
+ ],
210
+ name: "LossReturned",
211
+ type: "event",
212
+ },
213
+ {
214
+ anonymous: false,
215
+ inputs: [
216
+ {
217
+ indexed: true,
218
+ internalType: "uint256",
219
+ name: "lossId",
220
+ type: "uint256",
221
+ },
222
+ {
223
+ indexed: false,
224
+ internalType: "uint256",
225
+ name: "batchCount",
226
+ type: "uint256",
227
+ },
228
+ ],
229
+ name: "MintedLossTokensToUsers",
230
+ type: "event",
231
+ },
232
+ {
233
+ anonymous: false,
234
+ inputs: [
235
+ {
236
+ indexed: true,
237
+ internalType: "address",
238
+ name: "from",
239
+ type: "address",
240
+ },
241
+ {
242
+ indexed: true,
243
+ internalType: "address",
244
+ name: "to",
245
+ type: "address",
246
+ },
247
+ {
248
+ indexed: false,
249
+ internalType: "uint256",
250
+ name: "value",
251
+ type: "uint256",
252
+ },
253
+ ],
254
+ name: "Transfer",
255
+ type: "event",
256
+ },
257
+ {
258
+ anonymous: false,
259
+ inputs: [
260
+ {
261
+ indexed: true,
262
+ internalType: "address",
263
+ name: "operator",
264
+ type: "address",
265
+ },
266
+ {
267
+ indexed: true,
268
+ internalType: "address",
269
+ name: "from",
270
+ type: "address",
271
+ },
272
+ {
273
+ indexed: true,
274
+ internalType: "address",
275
+ name: "to",
276
+ type: "address",
277
+ },
278
+ {
279
+ indexed: false,
280
+ internalType: "uint256[]",
281
+ name: "ids",
282
+ type: "uint256[]",
283
+ },
284
+ {
285
+ indexed: false,
286
+ internalType: "uint256[]",
287
+ name: "values",
288
+ type: "uint256[]",
289
+ },
290
+ ],
291
+ name: "TransferBatch",
292
+ type: "event",
293
+ },
294
+ {
295
+ anonymous: false,
296
+ inputs: [
297
+ {
298
+ indexed: true,
299
+ internalType: "address",
300
+ name: "operator",
301
+ type: "address",
302
+ },
303
+ {
304
+ indexed: true,
305
+ internalType: "address",
306
+ name: "from",
307
+ type: "address",
308
+ },
309
+ {
310
+ indexed: true,
311
+ internalType: "address",
312
+ name: "to",
313
+ type: "address",
314
+ },
315
+ {
316
+ indexed: false,
317
+ internalType: "uint256",
318
+ name: "id",
319
+ type: "uint256",
320
+ },
321
+ {
322
+ indexed: false,
323
+ internalType: "uint256",
324
+ name: "value",
325
+ type: "uint256",
326
+ },
327
+ ],
328
+ name: "TransferSingle",
329
+ type: "event",
330
+ },
331
+ {
332
+ anonymous: false,
333
+ inputs: [
334
+ {
335
+ indexed: false,
336
+ internalType: "string",
337
+ name: "value",
338
+ type: "string",
339
+ },
340
+ {
341
+ indexed: true,
342
+ internalType: "uint256",
343
+ name: "id",
344
+ type: "uint256",
345
+ },
346
+ ],
347
+ name: "URI",
348
+ type: "event",
349
+ },
350
+ {
351
+ anonymous: false,
352
+ inputs: [
353
+ {
354
+ indexed: true,
355
+ internalType: "address",
356
+ name: "sender",
357
+ type: "address",
358
+ },
359
+ {
360
+ indexed: true,
361
+ internalType: "address",
362
+ name: "receiver",
363
+ type: "address",
364
+ },
365
+ {
366
+ indexed: true,
367
+ internalType: "address",
368
+ name: "owner",
369
+ type: "address",
370
+ },
371
+ {
372
+ indexed: false,
373
+ internalType: "uint256",
374
+ name: "assets",
375
+ type: "uint256",
376
+ },
377
+ {
378
+ indexed: false,
379
+ internalType: "uint256",
380
+ name: "shares",
381
+ type: "uint256",
382
+ },
383
+ ],
384
+ name: "Withdraw",
385
+ type: "event",
386
+ },
387
+ {
388
+ inputs: [
389
+ {
390
+ internalType: "address",
391
+ name: "owner",
392
+ type: "address",
393
+ },
394
+ {
395
+ internalType: "address",
396
+ name: "spender",
397
+ type: "address",
398
+ },
399
+ ],
400
+ name: "allowance",
401
+ outputs: [
402
+ {
403
+ internalType: "uint256",
404
+ name: "",
405
+ type: "uint256",
406
+ },
407
+ ],
408
+ stateMutability: "view",
409
+ type: "function",
410
+ },
411
+ {
412
+ inputs: [
413
+ {
414
+ internalType: "address",
415
+ name: "spender",
416
+ type: "address",
417
+ },
418
+ {
419
+ internalType: "uint256",
420
+ name: "value",
421
+ type: "uint256",
422
+ },
423
+ ],
424
+ name: "approve",
425
+ outputs: [
426
+ {
427
+ internalType: "bool",
428
+ name: "",
429
+ type: "bool",
430
+ },
431
+ ],
432
+ stateMutability: "nonpayable",
433
+ type: "function",
434
+ },
435
+ {
436
+ inputs: [],
437
+ name: "asset",
438
+ outputs: [
439
+ {
440
+ internalType: "address",
441
+ name: "assetTokenAddress",
442
+ type: "address",
443
+ },
444
+ ],
445
+ stateMutability: "view",
446
+ type: "function",
447
+ },
448
+ {
449
+ inputs: [
450
+ {
451
+ internalType: "address",
452
+ name: "account",
453
+ type: "address",
454
+ },
455
+ {
456
+ internalType: "uint256",
457
+ name: "id",
458
+ type: "uint256",
459
+ },
460
+ ],
461
+ name: "balanceOf",
462
+ outputs: [
463
+ {
464
+ internalType: "uint256",
465
+ name: "",
466
+ type: "uint256",
467
+ },
468
+ ],
469
+ stateMutability: "view",
470
+ type: "function",
471
+ },
472
+ {
473
+ inputs: [
474
+ {
475
+ internalType: "address",
476
+ name: "account",
477
+ type: "address",
478
+ },
479
+ ],
480
+ name: "balanceOf",
481
+ outputs: [
482
+ {
483
+ internalType: "uint256",
484
+ name: "",
485
+ type: "uint256",
486
+ },
487
+ ],
488
+ stateMutability: "view",
489
+ type: "function",
490
+ },
491
+ {
492
+ inputs: [
493
+ {
494
+ internalType: "address[]",
495
+ name: "accounts",
496
+ type: "address[]",
497
+ },
498
+ {
499
+ internalType: "uint256[]",
500
+ name: "ids",
501
+ type: "uint256[]",
502
+ },
503
+ ],
504
+ name: "balanceOfBatch",
505
+ outputs: [
506
+ {
507
+ internalType: "uint256[]",
508
+ name: "",
509
+ type: "uint256[]",
510
+ },
511
+ ],
512
+ stateMutability: "view",
513
+ type: "function",
514
+ },
515
+ {
516
+ inputs: [
517
+ {
518
+ internalType: "uint256",
519
+ name: "lossId",
520
+ type: "uint256",
521
+ },
522
+ {
523
+ internalType: "uint256",
524
+ name: "batchSize",
525
+ type: "uint256",
526
+ },
527
+ ],
528
+ name: "batchMintLossTokens",
529
+ outputs: [],
530
+ stateMutability: "nonpayable",
531
+ type: "function",
532
+ },
533
+ {
534
+ inputs: [],
535
+ name: "calculateMaximumLossAmount",
536
+ outputs: [
537
+ {
538
+ internalType: "uint256",
539
+ name: "",
540
+ type: "uint256",
541
+ },
542
+ ],
543
+ stateMutability: "view",
544
+ type: "function",
545
+ },
546
+ {
547
+ inputs: [
548
+ {
549
+ internalType: "address",
550
+ name: "user",
551
+ type: "address",
552
+ },
553
+ {
554
+ internalType: "uint256",
555
+ name: "lossId",
556
+ type: "uint256",
557
+ },
558
+ ],
559
+ name: "claimRepaidLoss",
560
+ outputs: [
561
+ {
562
+ internalType: "uint256",
563
+ name: "claimedAmount",
564
+ type: "uint256",
565
+ },
566
+ ],
567
+ stateMutability: "nonpayable",
568
+ type: "function",
569
+ },
570
+ {
571
+ inputs: [
572
+ {
573
+ internalType: "uint256",
574
+ name: "shares",
575
+ type: "uint256",
576
+ },
577
+ ],
578
+ name: "convertToAssets",
579
+ outputs: [
580
+ {
581
+ internalType: "uint256",
582
+ name: "assets",
583
+ type: "uint256",
584
+ },
585
+ ],
586
+ stateMutability: "view",
587
+ type: "function",
588
+ },
589
+ {
590
+ inputs: [
591
+ {
592
+ internalType: "uint256",
593
+ name: "assets",
594
+ type: "uint256",
595
+ },
596
+ ],
597
+ name: "convertToShares",
598
+ outputs: [
599
+ {
600
+ internalType: "uint256",
601
+ name: "shares",
602
+ type: "uint256",
603
+ },
604
+ ],
605
+ stateMutability: "view",
606
+ type: "function",
607
+ },
608
+ {
609
+ inputs: [],
610
+ name: "decimals",
611
+ outputs: [
612
+ {
613
+ internalType: "uint8",
614
+ name: "",
615
+ type: "uint8",
616
+ },
617
+ ],
618
+ stateMutability: "view",
619
+ type: "function",
620
+ },
621
+ {
622
+ inputs: [
623
+ {
624
+ internalType: "uint256",
625
+ name: "assets",
626
+ type: "uint256",
627
+ },
628
+ {
629
+ internalType: "address",
630
+ name: "receiver",
631
+ type: "address",
632
+ },
633
+ ],
634
+ name: "deposit",
635
+ outputs: [
636
+ {
637
+ internalType: "uint256",
638
+ name: "shares",
639
+ type: "uint256",
640
+ },
641
+ ],
642
+ stateMutability: "nonpayable",
643
+ type: "function",
644
+ },
645
+ {
646
+ inputs: [
647
+ {
648
+ internalType: "address",
649
+ name: "account",
650
+ type: "address",
651
+ },
652
+ {
653
+ internalType: "address",
654
+ name: "operator",
655
+ type: "address",
656
+ },
657
+ ],
658
+ name: "isApprovedForAll",
659
+ outputs: [
660
+ {
661
+ internalType: "bool",
662
+ name: "",
663
+ type: "bool",
664
+ },
665
+ ],
666
+ stateMutability: "view",
667
+ type: "function",
668
+ },
669
+ {
670
+ inputs: [
671
+ {
672
+ internalType: "uint256",
673
+ name: "lossId",
674
+ type: "uint256",
675
+ },
676
+ ],
677
+ name: "isLossMintingComplete",
678
+ outputs: [
679
+ {
680
+ internalType: "bool",
681
+ name: "",
682
+ type: "bool",
683
+ },
684
+ ],
685
+ stateMutability: "view",
686
+ type: "function",
687
+ },
688
+ {
689
+ inputs: [
690
+ {
691
+ internalType: "uint256",
692
+ name: "lossId",
693
+ type: "uint256",
694
+ },
695
+ ],
696
+ name: "lossDetails",
697
+ outputs: [
698
+ {
699
+ components: [
700
+ {
701
+ internalType: "uint256",
702
+ name: "lossAmount",
703
+ type: "uint256",
704
+ },
705
+ {
706
+ internalType: "uint256",
707
+ name: "usersCount",
708
+ type: "uint256",
709
+ },
710
+ {
711
+ internalType: "uint256",
712
+ name: "usersMintedCount",
713
+ type: "uint256",
714
+ },
715
+ {
716
+ internalType: "uint256",
717
+ name: "recoveredAmount",
718
+ type: "uint256",
719
+ },
720
+ {
721
+ internalType: "uint256",
722
+ name: "totalLossShares",
723
+ type: "uint256",
724
+ },
725
+ ],
726
+ internalType: "struct LossDetails",
727
+ name: "",
728
+ type: "tuple",
729
+ },
730
+ ],
731
+ stateMutability: "view",
732
+ type: "function",
733
+ },
734
+ {
735
+ inputs: [
736
+ {
737
+ internalType: "address",
738
+ name: "receiver",
739
+ type: "address",
740
+ },
741
+ ],
742
+ name: "maxDeposit",
743
+ outputs: [
744
+ {
745
+ internalType: "uint256",
746
+ name: "maxAssets",
747
+ type: "uint256",
748
+ },
749
+ ],
750
+ stateMutability: "view",
751
+ type: "function",
752
+ },
753
+ {
754
+ inputs: [
755
+ {
756
+ internalType: "address",
757
+ name: "receiver",
758
+ type: "address",
759
+ },
760
+ ],
761
+ name: "maxMint",
762
+ outputs: [
763
+ {
764
+ internalType: "uint256",
765
+ name: "maxShares",
766
+ type: "uint256",
767
+ },
768
+ ],
769
+ stateMutability: "view",
770
+ type: "function",
771
+ },
772
+ {
773
+ inputs: [
774
+ {
775
+ internalType: "address",
776
+ name: "owner",
777
+ type: "address",
778
+ },
779
+ ],
780
+ name: "maxRedeem",
781
+ outputs: [
782
+ {
783
+ internalType: "uint256",
784
+ name: "maxShares",
785
+ type: "uint256",
786
+ },
787
+ ],
788
+ stateMutability: "view",
789
+ type: "function",
790
+ },
791
+ {
792
+ inputs: [
793
+ {
794
+ internalType: "address",
795
+ name: "owner",
796
+ type: "address",
797
+ },
798
+ ],
799
+ name: "maxWithdraw",
800
+ outputs: [
801
+ {
802
+ internalType: "uint256",
803
+ name: "maxAssets",
804
+ type: "uint256",
805
+ },
806
+ ],
807
+ stateMutability: "view",
808
+ type: "function",
809
+ },
810
+ {
811
+ inputs: [],
812
+ name: "minimumAssetAmountLeftAfterLoss",
813
+ outputs: [
814
+ {
815
+ internalType: "uint256",
816
+ name: "",
817
+ type: "uint256",
818
+ },
819
+ ],
820
+ stateMutability: "view",
821
+ type: "function",
822
+ },
823
+ {
824
+ inputs: [
825
+ {
826
+ internalType: "uint256",
827
+ name: "shares",
828
+ type: "uint256",
829
+ },
830
+ {
831
+ internalType: "address",
832
+ name: "receiver",
833
+ type: "address",
834
+ },
835
+ ],
836
+ name: "mint",
837
+ outputs: [
838
+ {
839
+ internalType: "uint256",
840
+ name: "assets",
841
+ type: "uint256",
842
+ },
843
+ ],
844
+ stateMutability: "nonpayable",
845
+ type: "function",
846
+ },
847
+ {
848
+ inputs: [],
849
+ name: "name",
850
+ outputs: [
851
+ {
852
+ internalType: "string",
853
+ name: "",
854
+ type: "string",
855
+ },
856
+ ],
857
+ stateMutability: "view",
858
+ type: "function",
859
+ },
860
+ {
861
+ inputs: [
862
+ {
863
+ internalType: "uint256",
864
+ name: "assets",
865
+ type: "uint256",
866
+ },
867
+ ],
868
+ name: "previewDeposit",
869
+ outputs: [
870
+ {
871
+ internalType: "uint256",
872
+ name: "shares",
873
+ type: "uint256",
874
+ },
875
+ ],
876
+ stateMutability: "view",
877
+ type: "function",
878
+ },
879
+ {
880
+ inputs: [
881
+ {
882
+ internalType: "uint256",
883
+ name: "shares",
884
+ type: "uint256",
885
+ },
886
+ ],
887
+ name: "previewMint",
888
+ outputs: [
889
+ {
890
+ internalType: "uint256",
891
+ name: "assets",
892
+ type: "uint256",
893
+ },
894
+ ],
895
+ stateMutability: "view",
896
+ type: "function",
897
+ },
898
+ {
899
+ inputs: [
900
+ {
901
+ internalType: "uint256",
902
+ name: "shares",
903
+ type: "uint256",
904
+ },
905
+ ],
906
+ name: "previewRedeem",
907
+ outputs: [
908
+ {
909
+ internalType: "uint256",
910
+ name: "assets",
911
+ type: "uint256",
912
+ },
913
+ ],
914
+ stateMutability: "view",
915
+ type: "function",
916
+ },
917
+ {
918
+ inputs: [
919
+ {
920
+ internalType: "uint256",
921
+ name: "assets",
922
+ type: "uint256",
923
+ },
924
+ ],
925
+ name: "previewWithdraw",
926
+ outputs: [
927
+ {
928
+ internalType: "uint256",
929
+ name: "shares",
930
+ type: "uint256",
931
+ },
932
+ ],
933
+ stateMutability: "view",
934
+ type: "function",
935
+ },
936
+ {
937
+ inputs: [
938
+ {
939
+ internalType: "uint256",
940
+ name: "shares",
941
+ type: "uint256",
942
+ },
943
+ {
944
+ internalType: "address",
945
+ name: "receiver",
946
+ type: "address",
947
+ },
948
+ {
949
+ internalType: "address",
950
+ name: "owner",
951
+ type: "address",
952
+ },
953
+ ],
954
+ name: "redeem",
955
+ outputs: [
956
+ {
957
+ internalType: "uint256",
958
+ name: "assets",
959
+ type: "uint256",
960
+ },
961
+ ],
962
+ stateMutability: "nonpayable",
963
+ type: "function",
964
+ },
965
+ {
966
+ inputs: [
967
+ {
968
+ internalType: "uint256",
969
+ name: "lossId",
970
+ type: "uint256",
971
+ },
972
+ {
973
+ internalType: "uint256",
974
+ name: "lossAmount",
975
+ type: "uint256",
976
+ },
977
+ {
978
+ internalType: "bool",
979
+ name: "doMintLossTokens",
980
+ type: "bool",
981
+ },
982
+ ],
983
+ name: "registerTrancheLoss",
984
+ outputs: [
985
+ {
986
+ internalType: "uint256",
987
+ name: "lossApplied",
988
+ type: "uint256",
989
+ },
990
+ ],
991
+ stateMutability: "nonpayable",
992
+ type: "function",
993
+ },
994
+ {
995
+ inputs: [
996
+ {
997
+ internalType: "address",
998
+ name: "user",
999
+ type: "address",
1000
+ },
1001
+ {
1002
+ internalType: "uint256",
1003
+ name: "shares",
1004
+ type: "uint256",
1005
+ },
1006
+ ],
1007
+ name: "removeUserActiveShares",
1008
+ outputs: [],
1009
+ stateMutability: "nonpayable",
1010
+ type: "function",
1011
+ },
1012
+ {
1013
+ inputs: [
1014
+ {
1015
+ internalType: "uint256",
1016
+ name: "lossId",
1017
+ type: "uint256",
1018
+ },
1019
+ {
1020
+ internalType: "uint256",
1021
+ name: "amount",
1022
+ type: "uint256",
1023
+ },
1024
+ ],
1025
+ name: "repayLoss",
1026
+ outputs: [],
1027
+ stateMutability: "nonpayable",
1028
+ type: "function",
1029
+ },
1030
+ {
1031
+ inputs: [
1032
+ {
1033
+ internalType: "address",
1034
+ name: "from",
1035
+ type: "address",
1036
+ },
1037
+ {
1038
+ internalType: "address",
1039
+ name: "to",
1040
+ type: "address",
1041
+ },
1042
+ {
1043
+ internalType: "uint256[]",
1044
+ name: "ids",
1045
+ type: "uint256[]",
1046
+ },
1047
+ {
1048
+ internalType: "uint256[]",
1049
+ name: "values",
1050
+ type: "uint256[]",
1051
+ },
1052
+ {
1053
+ internalType: "bytes",
1054
+ name: "data",
1055
+ type: "bytes",
1056
+ },
1057
+ ],
1058
+ name: "safeBatchTransferFrom",
1059
+ outputs: [],
1060
+ stateMutability: "nonpayable",
1061
+ type: "function",
1062
+ },
1063
+ {
1064
+ inputs: [
1065
+ {
1066
+ internalType: "address",
1067
+ name: "from",
1068
+ type: "address",
1069
+ },
1070
+ {
1071
+ internalType: "address",
1072
+ name: "to",
1073
+ type: "address",
1074
+ },
1075
+ {
1076
+ internalType: "uint256",
1077
+ name: "id",
1078
+ type: "uint256",
1079
+ },
1080
+ {
1081
+ internalType: "uint256",
1082
+ name: "value",
1083
+ type: "uint256",
1084
+ },
1085
+ {
1086
+ internalType: "bytes",
1087
+ name: "data",
1088
+ type: "bytes",
1089
+ },
1090
+ ],
1091
+ name: "safeTransferFrom",
1092
+ outputs: [],
1093
+ stateMutability: "nonpayable",
1094
+ type: "function",
1095
+ },
1096
+ {
1097
+ inputs: [
1098
+ {
1099
+ internalType: "address",
1100
+ name: "operator",
1101
+ type: "address",
1102
+ },
1103
+ {
1104
+ internalType: "bool",
1105
+ name: "approved",
1106
+ type: "bool",
1107
+ },
1108
+ ],
1109
+ name: "setApprovalForAll",
1110
+ outputs: [],
1111
+ stateMutability: "nonpayable",
1112
+ type: "function",
1113
+ },
1114
+ {
1115
+ inputs: [
1116
+ {
1117
+ internalType: "bytes4",
1118
+ name: "interfaceId",
1119
+ type: "bytes4",
1120
+ },
1121
+ ],
1122
+ name: "supportsInterface",
1123
+ outputs: [
1124
+ {
1125
+ internalType: "bool",
1126
+ name: "",
1127
+ type: "bool",
1128
+ },
1129
+ ],
1130
+ stateMutability: "view",
1131
+ type: "function",
1132
+ },
1133
+ {
1134
+ inputs: [],
1135
+ name: "symbol",
1136
+ outputs: [
1137
+ {
1138
+ internalType: "string",
1139
+ name: "",
1140
+ type: "string",
1141
+ },
1142
+ ],
1143
+ stateMutability: "view",
1144
+ type: "function",
1145
+ },
1146
+ {
1147
+ inputs: [],
1148
+ name: "totalAssets",
1149
+ outputs: [
1150
+ {
1151
+ internalType: "uint256",
1152
+ name: "totalManagedAssets",
1153
+ type: "uint256",
1154
+ },
1155
+ ],
1156
+ stateMutability: "view",
1157
+ type: "function",
1158
+ },
1159
+ {
1160
+ inputs: [],
1161
+ name: "totalSupply",
1162
+ outputs: [
1163
+ {
1164
+ internalType: "uint256",
1165
+ name: "",
1166
+ type: "uint256",
1167
+ },
1168
+ ],
1169
+ stateMutability: "view",
1170
+ type: "function",
1171
+ },
1172
+ {
1173
+ inputs: [
1174
+ {
1175
+ internalType: "address",
1176
+ name: "to",
1177
+ type: "address",
1178
+ },
1179
+ {
1180
+ internalType: "uint256",
1181
+ name: "value",
1182
+ type: "uint256",
1183
+ },
1184
+ ],
1185
+ name: "transfer",
1186
+ outputs: [
1187
+ {
1188
+ internalType: "bool",
1189
+ name: "",
1190
+ type: "bool",
1191
+ },
1192
+ ],
1193
+ stateMutability: "nonpayable",
1194
+ type: "function",
1195
+ },
1196
+ {
1197
+ inputs: [
1198
+ {
1199
+ internalType: "address",
1200
+ name: "from",
1201
+ type: "address",
1202
+ },
1203
+ {
1204
+ internalType: "address",
1205
+ name: "to",
1206
+ type: "address",
1207
+ },
1208
+ {
1209
+ internalType: "uint256",
1210
+ name: "value",
1211
+ type: "uint256",
1212
+ },
1213
+ ],
1214
+ name: "transferFrom",
1215
+ outputs: [
1216
+ {
1217
+ internalType: "bool",
1218
+ name: "",
1219
+ type: "bool",
1220
+ },
1221
+ ],
1222
+ stateMutability: "nonpayable",
1223
+ type: "function",
1224
+ },
1225
+ {
1226
+ inputs: [
1227
+ {
1228
+ internalType: "address",
1229
+ name: "user",
1230
+ type: "address",
1231
+ },
1232
+ ],
1233
+ name: "userActiveAssets",
1234
+ outputs: [
1235
+ {
1236
+ internalType: "uint256",
1237
+ name: "",
1238
+ type: "uint256",
1239
+ },
1240
+ ],
1241
+ stateMutability: "view",
1242
+ type: "function",
1243
+ },
1244
+ {
1245
+ inputs: [
1246
+ {
1247
+ internalType: "address",
1248
+ name: "user",
1249
+ type: "address",
1250
+ },
1251
+ {
1252
+ internalType: "uint256",
1253
+ name: "lossId",
1254
+ type: "uint256",
1255
+ },
1256
+ ],
1257
+ name: "userClaimableLoss",
1258
+ outputs: [
1259
+ {
1260
+ internalType: "uint256",
1261
+ name: "claimableAmount",
1262
+ type: "uint256",
1263
+ },
1264
+ ],
1265
+ stateMutability: "view",
1266
+ type: "function",
1267
+ },
1268
+ {
1269
+ inputs: [
1270
+ {
1271
+ internalType: "address",
1272
+ name: "user",
1273
+ type: "address",
1274
+ },
1275
+ {
1276
+ internalType: "uint256",
1277
+ name: "lossId",
1278
+ type: "uint256",
1279
+ },
1280
+ ],
1281
+ name: "userClaimedLosses",
1282
+ outputs: [
1283
+ {
1284
+ internalType: "uint256",
1285
+ name: "claimedAmount",
1286
+ type: "uint256",
1287
+ },
1288
+ ],
1289
+ stateMutability: "view",
1290
+ type: "function",
1291
+ },
1292
+ {
1293
+ inputs: [
1294
+ {
1295
+ internalType: "uint256",
1296
+ name: "assets",
1297
+ type: "uint256",
1298
+ },
1299
+ {
1300
+ internalType: "address",
1301
+ name: "receiver",
1302
+ type: "address",
1303
+ },
1304
+ {
1305
+ internalType: "address",
1306
+ name: "owner",
1307
+ type: "address",
1308
+ },
1309
+ ],
1310
+ name: "withdraw",
1311
+ outputs: [
1312
+ {
1313
+ internalType: "uint256",
1314
+ name: "shares",
1315
+ type: "uint256",
1316
+ },
1317
+ ],
1318
+ stateMutability: "nonpayable",
1319
+ type: "function",
1320
+ },
1321
+ ];
1322
+ export class ILendingPoolTrancheAbi__factory {
1323
+ static createInterface() {
1324
+ return new utils.Interface(_abi);
1325
+ }
1326
+ static connect(address, signerOrProvider) {
1327
+ return new Contract(address, _abi, signerOrProvider);
1328
+ }
1329
+ }
1330
+ ILendingPoolTrancheAbi__factory.abi = _abi;