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