@kasufinance/kasu-sdk 1.0.1 → 1.0.2

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 (45) hide show
  1. package/.github/workflows/ci.yml +39 -0
  2. package/.github/workflows/main.yml +17 -13
  3. package/README.md +146 -0
  4. package/package.json +1 -1
  5. package/src/contracts/IClearingCoordinatorAbi.ts +0 -406
  6. package/src/contracts/IERC20MetadataAbi.ts +0 -364
  7. package/src/contracts/IFeeManagerAbi.ts +0 -182
  8. package/src/contracts/IKSULockingAbi.ts +0 -965
  9. package/src/contracts/IKasuAllowListAbi.ts +0 -605
  10. package/src/contracts/IKasuControllerAbi.ts +0 -703
  11. package/src/contracts/IKasuNFTsAbi.ts +0 -2744
  12. package/src/contracts/IKsuPriceAbi.ts +0 -87
  13. package/src/contracts/ILendingPoolAbi.ts +0 -2081
  14. package/src/contracts/ILendingPoolFactoryAbi.ts +0 -161
  15. package/src/contracts/ILendingPoolManagerAbi.ts +0 -1917
  16. package/src/contracts/ILendingPoolTrancheAbi.ts +0 -1911
  17. package/src/contracts/ISystemVariablesAbi.ts +0 -908
  18. package/src/contracts/IUserLoyaltyRewardsAbi.ts +0 -544
  19. package/src/contracts/IUserManagerAbi.ts +0 -612
  20. package/src/contracts/KSULockBonusAbi.ts +0 -124
  21. package/src/contracts/KasuPoolExternalTVLAbi.ts +0 -1071
  22. package/src/contracts/SwapperAbi.ts +0 -266
  23. package/src/contracts/common.ts +0 -44
  24. package/src/contracts/factories/IClearingCoordinatorAbi__factory.ts +0 -438
  25. package/src/contracts/factories/IERC20MetadataAbi__factory.ts +0 -248
  26. package/src/contracts/factories/IFeeManagerAbi__factory.ts +0 -90
  27. package/src/contracts/factories/IKSULockingAbi__factory.ts +0 -778
  28. package/src/contracts/factories/IKasuAllowListAbi__factory.ts +0 -479
  29. package/src/contracts/factories/IKasuControllerAbi__factory.ts +0 -447
  30. package/src/contracts/factories/IKasuNFTsAbi__factory.ts +0 -2116
  31. package/src/contracts/factories/IKsuPriceAbi__factory.ts +0 -36
  32. package/src/contracts/factories/ILendingPoolAbi__factory.ts +0 -1455
  33. package/src/contracts/factories/ILendingPoolFactoryAbi__factory.ts +0 -125
  34. package/src/contracts/factories/ILendingPoolManagerAbi__factory.ts +0 -1375
  35. package/src/contracts/factories/ILendingPoolTrancheAbi__factory.ts +0 -1345
  36. package/src/contracts/factories/ISystemVariablesAbi__factory.ts +0 -455
  37. package/src/contracts/factories/IUserLoyaltyRewardsAbi__factory.ts +0 -316
  38. package/src/contracts/factories/IUserManagerAbi__factory.ts +0 -345
  39. package/src/contracts/factories/KSULockBonusAbi__factory.ts +0 -115
  40. package/src/contracts/factories/KasuPoolExternalTVLAbi__factory.ts +0 -840
  41. package/src/contracts/factories/SwapperAbi__factory.ts +0 -167
  42. package/src/contracts/factories/index.ts +0 -21
  43. package/src/contracts/index.ts +0 -40
  44. package/tsconfig.tsbuildinfo +0 -1
  45. package/versioner.sh +0 -6
@@ -1,316 +0,0 @@
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
- }
@@ -1,345 +0,0 @@
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
- }