@kasufinance/kasu-sdk 1.0.2 → 1.0.3
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.
- package/package.json +1 -1
- package/src/contracts/IClearingCoordinatorAbi.ts +406 -0
- package/src/contracts/IERC20MetadataAbi.ts +364 -0
- package/src/contracts/IFeeManagerAbi.ts +182 -0
- package/src/contracts/IKSULockingAbi.ts +965 -0
- package/src/contracts/IKasuAllowListAbi.ts +605 -0
- package/src/contracts/IKasuControllerAbi.ts +703 -0
- package/src/contracts/IKasuNFTsAbi.ts +2744 -0
- package/src/contracts/IKsuPriceAbi.ts +87 -0
- package/src/contracts/ILendingPoolAbi.ts +2081 -0
- package/src/contracts/ILendingPoolFactoryAbi.ts +161 -0
- package/src/contracts/ILendingPoolManagerAbi.ts +1917 -0
- package/src/contracts/ILendingPoolTrancheAbi.ts +1911 -0
- package/src/contracts/ISystemVariablesAbi.ts +908 -0
- package/src/contracts/IUserLoyaltyRewardsAbi.ts +544 -0
- package/src/contracts/IUserManagerAbi.ts +612 -0
- package/src/contracts/KSULockBonusAbi.ts +124 -0
- package/src/contracts/KasuPoolExternalTVLAbi.ts +1071 -0
- package/src/contracts/SwapperAbi.ts +266 -0
- package/src/contracts/common.ts +44 -0
- package/src/contracts/factories/IClearingCoordinatorAbi__factory.ts +438 -0
- package/src/contracts/factories/IERC20MetadataAbi__factory.ts +248 -0
- package/src/contracts/factories/IFeeManagerAbi__factory.ts +90 -0
- package/src/contracts/factories/IKSULockingAbi__factory.ts +778 -0
- package/src/contracts/factories/IKasuAllowListAbi__factory.ts +479 -0
- package/src/contracts/factories/IKasuControllerAbi__factory.ts +447 -0
- package/src/contracts/factories/IKasuNFTsAbi__factory.ts +2116 -0
- package/src/contracts/factories/IKsuPriceAbi__factory.ts +36 -0
- package/src/contracts/factories/ILendingPoolAbi__factory.ts +1455 -0
- package/src/contracts/factories/ILendingPoolFactoryAbi__factory.ts +125 -0
- package/src/contracts/factories/ILendingPoolManagerAbi__factory.ts +1375 -0
- package/src/contracts/factories/ILendingPoolTrancheAbi__factory.ts +1345 -0
- package/src/contracts/factories/ISystemVariablesAbi__factory.ts +455 -0
- package/src/contracts/factories/IUserLoyaltyRewardsAbi__factory.ts +316 -0
- package/src/contracts/factories/IUserManagerAbi__factory.ts +345 -0
- package/src/contracts/factories/KSULockBonusAbi__factory.ts +115 -0
- package/src/contracts/factories/KasuPoolExternalTVLAbi__factory.ts +840 -0
- package/src/contracts/factories/SwapperAbi__factory.ts +167 -0
- package/src/contracts/factories/index.ts +21 -0
- package/src/contracts/index.ts +40 -0
package/package.json
CHANGED
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import type {
|
|
5
|
+
BaseContract,
|
|
6
|
+
BigNumber,
|
|
7
|
+
BigNumberish,
|
|
8
|
+
BytesLike,
|
|
9
|
+
CallOverrides,
|
|
10
|
+
ContractTransaction,
|
|
11
|
+
Overrides,
|
|
12
|
+
PopulatedTransaction,
|
|
13
|
+
Signer,
|
|
14
|
+
utils,
|
|
15
|
+
} from "ethers";
|
|
16
|
+
import type {
|
|
17
|
+
FunctionFragment,
|
|
18
|
+
Result,
|
|
19
|
+
EventFragment,
|
|
20
|
+
} from "@ethersproject/abi";
|
|
21
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
22
|
+
import type {
|
|
23
|
+
TypedEventFilter,
|
|
24
|
+
TypedEvent,
|
|
25
|
+
TypedListener,
|
|
26
|
+
OnEvent,
|
|
27
|
+
} from "./common";
|
|
28
|
+
|
|
29
|
+
export type ClearingConfigurationStruct = {
|
|
30
|
+
drawAmount: BigNumberish;
|
|
31
|
+
trancheDesiredRatios: BigNumberish[];
|
|
32
|
+
maxExcessPercentage: BigNumberish;
|
|
33
|
+
minExcessPercentage: BigNumberish;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type ClearingConfigurationStructOutput = [
|
|
37
|
+
BigNumber,
|
|
38
|
+
BigNumber[],
|
|
39
|
+
BigNumber,
|
|
40
|
+
BigNumber
|
|
41
|
+
] & {
|
|
42
|
+
drawAmount: BigNumber;
|
|
43
|
+
trancheDesiredRatios: BigNumber[];
|
|
44
|
+
maxExcessPercentage: BigNumber;
|
|
45
|
+
minExcessPercentage: BigNumber;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export interface IClearingCoordinatorAbiInterface extends utils.Interface {
|
|
49
|
+
functions: {
|
|
50
|
+
"doClearing(address,uint256,uint256,uint256,(uint256,uint256[],uint256,uint256),bool)": FunctionFragment;
|
|
51
|
+
"initializeLendingPool(address)": FunctionFragment;
|
|
52
|
+
"isLendingPoolClearingPending(address)": FunctionFragment;
|
|
53
|
+
"lendingPoolClearingStatus(address,uint256)": FunctionFragment;
|
|
54
|
+
"lendingPoolMaxDrawAmount(address)": FunctionFragment;
|
|
55
|
+
"nextLendingPoolClearingEpoch(address)": FunctionFragment;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
getFunction(
|
|
59
|
+
nameOrSignatureOrTopic:
|
|
60
|
+
| "doClearing"
|
|
61
|
+
| "initializeLendingPool"
|
|
62
|
+
| "isLendingPoolClearingPending"
|
|
63
|
+
| "lendingPoolClearingStatus"
|
|
64
|
+
| "lendingPoolMaxDrawAmount"
|
|
65
|
+
| "nextLendingPoolClearingEpoch"
|
|
66
|
+
): FunctionFragment;
|
|
67
|
+
|
|
68
|
+
encodeFunctionData(
|
|
69
|
+
functionFragment: "doClearing",
|
|
70
|
+
values: [
|
|
71
|
+
string,
|
|
72
|
+
BigNumberish,
|
|
73
|
+
BigNumberish,
|
|
74
|
+
BigNumberish,
|
|
75
|
+
ClearingConfigurationStruct,
|
|
76
|
+
boolean
|
|
77
|
+
]
|
|
78
|
+
): string;
|
|
79
|
+
encodeFunctionData(
|
|
80
|
+
functionFragment: "initializeLendingPool",
|
|
81
|
+
values: [string]
|
|
82
|
+
): string;
|
|
83
|
+
encodeFunctionData(
|
|
84
|
+
functionFragment: "isLendingPoolClearingPending",
|
|
85
|
+
values: [string]
|
|
86
|
+
): string;
|
|
87
|
+
encodeFunctionData(
|
|
88
|
+
functionFragment: "lendingPoolClearingStatus",
|
|
89
|
+
values: [string, BigNumberish]
|
|
90
|
+
): string;
|
|
91
|
+
encodeFunctionData(
|
|
92
|
+
functionFragment: "lendingPoolMaxDrawAmount",
|
|
93
|
+
values: [string]
|
|
94
|
+
): string;
|
|
95
|
+
encodeFunctionData(
|
|
96
|
+
functionFragment: "nextLendingPoolClearingEpoch",
|
|
97
|
+
values: [string]
|
|
98
|
+
): string;
|
|
99
|
+
|
|
100
|
+
decodeFunctionResult(functionFragment: "doClearing", data: BytesLike): Result;
|
|
101
|
+
decodeFunctionResult(
|
|
102
|
+
functionFragment: "initializeLendingPool",
|
|
103
|
+
data: BytesLike
|
|
104
|
+
): Result;
|
|
105
|
+
decodeFunctionResult(
|
|
106
|
+
functionFragment: "isLendingPoolClearingPending",
|
|
107
|
+
data: BytesLike
|
|
108
|
+
): Result;
|
|
109
|
+
decodeFunctionResult(
|
|
110
|
+
functionFragment: "lendingPoolClearingStatus",
|
|
111
|
+
data: BytesLike
|
|
112
|
+
): Result;
|
|
113
|
+
decodeFunctionResult(
|
|
114
|
+
functionFragment: "lendingPoolMaxDrawAmount",
|
|
115
|
+
data: BytesLike
|
|
116
|
+
): Result;
|
|
117
|
+
decodeFunctionResult(
|
|
118
|
+
functionFragment: "nextLendingPoolClearingEpoch",
|
|
119
|
+
data: BytesLike
|
|
120
|
+
): Result;
|
|
121
|
+
|
|
122
|
+
events: {
|
|
123
|
+
"ClearingConfigSet(address,uint256,(uint256,uint256[],uint256,uint256))": EventFragment;
|
|
124
|
+
"ClearingExecuted(address,uint256,uint8)": EventFragment;
|
|
125
|
+
"Initialized(uint64)": EventFragment;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
getEvent(nameOrSignatureOrTopic: "ClearingConfigSet"): EventFragment;
|
|
129
|
+
getEvent(nameOrSignatureOrTopic: "ClearingExecuted"): EventFragment;
|
|
130
|
+
getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface ClearingConfigSetEventObject {
|
|
134
|
+
lendingPool: string;
|
|
135
|
+
epoch: BigNumber;
|
|
136
|
+
clearingConfig: ClearingConfigurationStructOutput;
|
|
137
|
+
}
|
|
138
|
+
export type ClearingConfigSetEvent = TypedEvent<
|
|
139
|
+
[string, BigNumber, ClearingConfigurationStructOutput],
|
|
140
|
+
ClearingConfigSetEventObject
|
|
141
|
+
>;
|
|
142
|
+
|
|
143
|
+
export type ClearingConfigSetEventFilter =
|
|
144
|
+
TypedEventFilter<ClearingConfigSetEvent>;
|
|
145
|
+
|
|
146
|
+
export interface ClearingExecutedEventObject {
|
|
147
|
+
lendingPool: string;
|
|
148
|
+
epoch: BigNumber;
|
|
149
|
+
clearingStatus: number;
|
|
150
|
+
}
|
|
151
|
+
export type ClearingExecutedEvent = TypedEvent<
|
|
152
|
+
[string, BigNumber, number],
|
|
153
|
+
ClearingExecutedEventObject
|
|
154
|
+
>;
|
|
155
|
+
|
|
156
|
+
export type ClearingExecutedEventFilter =
|
|
157
|
+
TypedEventFilter<ClearingExecutedEvent>;
|
|
158
|
+
|
|
159
|
+
export interface InitializedEventObject {
|
|
160
|
+
version: BigNumber;
|
|
161
|
+
}
|
|
162
|
+
export type InitializedEvent = TypedEvent<[BigNumber], InitializedEventObject>;
|
|
163
|
+
|
|
164
|
+
export type InitializedEventFilter = TypedEventFilter<InitializedEvent>;
|
|
165
|
+
|
|
166
|
+
export interface IClearingCoordinatorAbi extends BaseContract {
|
|
167
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
168
|
+
attach(addressOrName: string): this;
|
|
169
|
+
deployed(): Promise<this>;
|
|
170
|
+
|
|
171
|
+
interface: IClearingCoordinatorAbiInterface;
|
|
172
|
+
|
|
173
|
+
queryFilter<TEvent extends TypedEvent>(
|
|
174
|
+
event: TypedEventFilter<TEvent>,
|
|
175
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
176
|
+
toBlock?: string | number | undefined
|
|
177
|
+
): Promise<Array<TEvent>>;
|
|
178
|
+
|
|
179
|
+
listeners<TEvent extends TypedEvent>(
|
|
180
|
+
eventFilter?: TypedEventFilter<TEvent>
|
|
181
|
+
): Array<TypedListener<TEvent>>;
|
|
182
|
+
listeners(eventName?: string): Array<Listener>;
|
|
183
|
+
removeAllListeners<TEvent extends TypedEvent>(
|
|
184
|
+
eventFilter: TypedEventFilter<TEvent>
|
|
185
|
+
): this;
|
|
186
|
+
removeAllListeners(eventName?: string): this;
|
|
187
|
+
off: OnEvent<this>;
|
|
188
|
+
on: OnEvent<this>;
|
|
189
|
+
once: OnEvent<this>;
|
|
190
|
+
removeListener: OnEvent<this>;
|
|
191
|
+
|
|
192
|
+
functions: {
|
|
193
|
+
doClearing(
|
|
194
|
+
lendingPool: string,
|
|
195
|
+
targetEpoch: BigNumberish,
|
|
196
|
+
priorityCalculationBatchSize: BigNumberish,
|
|
197
|
+
acceptRequestsBatchSize: BigNumberish,
|
|
198
|
+
clearingConfig: ClearingConfigurationStruct,
|
|
199
|
+
isConfigOverridden: boolean,
|
|
200
|
+
overrides?: Overrides & { from?: string }
|
|
201
|
+
): Promise<ContractTransaction>;
|
|
202
|
+
|
|
203
|
+
initializeLendingPool(
|
|
204
|
+
lendingPool: string,
|
|
205
|
+
overrides?: Overrides & { from?: string }
|
|
206
|
+
): Promise<ContractTransaction>;
|
|
207
|
+
|
|
208
|
+
isLendingPoolClearingPending(
|
|
209
|
+
lendingPool: string,
|
|
210
|
+
overrides?: CallOverrides
|
|
211
|
+
): Promise<[boolean] & { isPending: boolean }>;
|
|
212
|
+
|
|
213
|
+
lendingPoolClearingStatus(
|
|
214
|
+
lendingPool: string,
|
|
215
|
+
epoch: BigNumberish,
|
|
216
|
+
overrides?: CallOverrides
|
|
217
|
+
): Promise<[number] & { status: number }>;
|
|
218
|
+
|
|
219
|
+
lendingPoolMaxDrawAmount(
|
|
220
|
+
lendingPool: string,
|
|
221
|
+
overrides?: CallOverrides
|
|
222
|
+
): Promise<[BigNumber]>;
|
|
223
|
+
|
|
224
|
+
nextLendingPoolClearingEpoch(
|
|
225
|
+
lendingPool: string,
|
|
226
|
+
overrides?: CallOverrides
|
|
227
|
+
): Promise<[BigNumber] & { nextClearingEpoch: BigNumber }>;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
doClearing(
|
|
231
|
+
lendingPool: string,
|
|
232
|
+
targetEpoch: BigNumberish,
|
|
233
|
+
priorityCalculationBatchSize: BigNumberish,
|
|
234
|
+
acceptRequestsBatchSize: BigNumberish,
|
|
235
|
+
clearingConfig: ClearingConfigurationStruct,
|
|
236
|
+
isConfigOverridden: boolean,
|
|
237
|
+
overrides?: Overrides & { from?: string }
|
|
238
|
+
): Promise<ContractTransaction>;
|
|
239
|
+
|
|
240
|
+
initializeLendingPool(
|
|
241
|
+
lendingPool: string,
|
|
242
|
+
overrides?: Overrides & { from?: string }
|
|
243
|
+
): Promise<ContractTransaction>;
|
|
244
|
+
|
|
245
|
+
isLendingPoolClearingPending(
|
|
246
|
+
lendingPool: string,
|
|
247
|
+
overrides?: CallOverrides
|
|
248
|
+
): Promise<boolean>;
|
|
249
|
+
|
|
250
|
+
lendingPoolClearingStatus(
|
|
251
|
+
lendingPool: string,
|
|
252
|
+
epoch: BigNumberish,
|
|
253
|
+
overrides?: CallOverrides
|
|
254
|
+
): Promise<number>;
|
|
255
|
+
|
|
256
|
+
lendingPoolMaxDrawAmount(
|
|
257
|
+
lendingPool: string,
|
|
258
|
+
overrides?: CallOverrides
|
|
259
|
+
): Promise<BigNumber>;
|
|
260
|
+
|
|
261
|
+
nextLendingPoolClearingEpoch(
|
|
262
|
+
lendingPool: string,
|
|
263
|
+
overrides?: CallOverrides
|
|
264
|
+
): Promise<BigNumber>;
|
|
265
|
+
|
|
266
|
+
callStatic: {
|
|
267
|
+
doClearing(
|
|
268
|
+
lendingPool: string,
|
|
269
|
+
targetEpoch: BigNumberish,
|
|
270
|
+
priorityCalculationBatchSize: BigNumberish,
|
|
271
|
+
acceptRequestsBatchSize: BigNumberish,
|
|
272
|
+
clearingConfig: ClearingConfigurationStruct,
|
|
273
|
+
isConfigOverridden: boolean,
|
|
274
|
+
overrides?: CallOverrides
|
|
275
|
+
): Promise<void>;
|
|
276
|
+
|
|
277
|
+
initializeLendingPool(
|
|
278
|
+
lendingPool: string,
|
|
279
|
+
overrides?: CallOverrides
|
|
280
|
+
): Promise<void>;
|
|
281
|
+
|
|
282
|
+
isLendingPoolClearingPending(
|
|
283
|
+
lendingPool: string,
|
|
284
|
+
overrides?: CallOverrides
|
|
285
|
+
): Promise<boolean>;
|
|
286
|
+
|
|
287
|
+
lendingPoolClearingStatus(
|
|
288
|
+
lendingPool: string,
|
|
289
|
+
epoch: BigNumberish,
|
|
290
|
+
overrides?: CallOverrides
|
|
291
|
+
): Promise<number>;
|
|
292
|
+
|
|
293
|
+
lendingPoolMaxDrawAmount(
|
|
294
|
+
lendingPool: string,
|
|
295
|
+
overrides?: CallOverrides
|
|
296
|
+
): Promise<BigNumber>;
|
|
297
|
+
|
|
298
|
+
nextLendingPoolClearingEpoch(
|
|
299
|
+
lendingPool: string,
|
|
300
|
+
overrides?: CallOverrides
|
|
301
|
+
): Promise<BigNumber>;
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
filters: {
|
|
305
|
+
"ClearingConfigSet(address,uint256,(uint256,uint256[],uint256,uint256))"(
|
|
306
|
+
lendingPool?: string | null,
|
|
307
|
+
epoch?: BigNumberish | null,
|
|
308
|
+
clearingConfig?: null
|
|
309
|
+
): ClearingConfigSetEventFilter;
|
|
310
|
+
ClearingConfigSet(
|
|
311
|
+
lendingPool?: string | null,
|
|
312
|
+
epoch?: BigNumberish | null,
|
|
313
|
+
clearingConfig?: null
|
|
314
|
+
): ClearingConfigSetEventFilter;
|
|
315
|
+
|
|
316
|
+
"ClearingExecuted(address,uint256,uint8)"(
|
|
317
|
+
lendingPool?: string | null,
|
|
318
|
+
epoch?: BigNumberish | null,
|
|
319
|
+
clearingStatus?: null
|
|
320
|
+
): ClearingExecutedEventFilter;
|
|
321
|
+
ClearingExecuted(
|
|
322
|
+
lendingPool?: string | null,
|
|
323
|
+
epoch?: BigNumberish | null,
|
|
324
|
+
clearingStatus?: null
|
|
325
|
+
): ClearingExecutedEventFilter;
|
|
326
|
+
|
|
327
|
+
"Initialized(uint64)"(version?: null): InitializedEventFilter;
|
|
328
|
+
Initialized(version?: null): InitializedEventFilter;
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
estimateGas: {
|
|
332
|
+
doClearing(
|
|
333
|
+
lendingPool: string,
|
|
334
|
+
targetEpoch: BigNumberish,
|
|
335
|
+
priorityCalculationBatchSize: BigNumberish,
|
|
336
|
+
acceptRequestsBatchSize: BigNumberish,
|
|
337
|
+
clearingConfig: ClearingConfigurationStruct,
|
|
338
|
+
isConfigOverridden: boolean,
|
|
339
|
+
overrides?: Overrides & { from?: string }
|
|
340
|
+
): Promise<BigNumber>;
|
|
341
|
+
|
|
342
|
+
initializeLendingPool(
|
|
343
|
+
lendingPool: string,
|
|
344
|
+
overrides?: Overrides & { from?: string }
|
|
345
|
+
): Promise<BigNumber>;
|
|
346
|
+
|
|
347
|
+
isLendingPoolClearingPending(
|
|
348
|
+
lendingPool: string,
|
|
349
|
+
overrides?: CallOverrides
|
|
350
|
+
): Promise<BigNumber>;
|
|
351
|
+
|
|
352
|
+
lendingPoolClearingStatus(
|
|
353
|
+
lendingPool: string,
|
|
354
|
+
epoch: BigNumberish,
|
|
355
|
+
overrides?: CallOverrides
|
|
356
|
+
): Promise<BigNumber>;
|
|
357
|
+
|
|
358
|
+
lendingPoolMaxDrawAmount(
|
|
359
|
+
lendingPool: string,
|
|
360
|
+
overrides?: CallOverrides
|
|
361
|
+
): Promise<BigNumber>;
|
|
362
|
+
|
|
363
|
+
nextLendingPoolClearingEpoch(
|
|
364
|
+
lendingPool: string,
|
|
365
|
+
overrides?: CallOverrides
|
|
366
|
+
): Promise<BigNumber>;
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
populateTransaction: {
|
|
370
|
+
doClearing(
|
|
371
|
+
lendingPool: string,
|
|
372
|
+
targetEpoch: BigNumberish,
|
|
373
|
+
priorityCalculationBatchSize: BigNumberish,
|
|
374
|
+
acceptRequestsBatchSize: BigNumberish,
|
|
375
|
+
clearingConfig: ClearingConfigurationStruct,
|
|
376
|
+
isConfigOverridden: boolean,
|
|
377
|
+
overrides?: Overrides & { from?: string }
|
|
378
|
+
): Promise<PopulatedTransaction>;
|
|
379
|
+
|
|
380
|
+
initializeLendingPool(
|
|
381
|
+
lendingPool: string,
|
|
382
|
+
overrides?: Overrides & { from?: string }
|
|
383
|
+
): Promise<PopulatedTransaction>;
|
|
384
|
+
|
|
385
|
+
isLendingPoolClearingPending(
|
|
386
|
+
lendingPool: string,
|
|
387
|
+
overrides?: CallOverrides
|
|
388
|
+
): Promise<PopulatedTransaction>;
|
|
389
|
+
|
|
390
|
+
lendingPoolClearingStatus(
|
|
391
|
+
lendingPool: string,
|
|
392
|
+
epoch: BigNumberish,
|
|
393
|
+
overrides?: CallOverrides
|
|
394
|
+
): Promise<PopulatedTransaction>;
|
|
395
|
+
|
|
396
|
+
lendingPoolMaxDrawAmount(
|
|
397
|
+
lendingPool: string,
|
|
398
|
+
overrides?: CallOverrides
|
|
399
|
+
): Promise<PopulatedTransaction>;
|
|
400
|
+
|
|
401
|
+
nextLendingPoolClearingEpoch(
|
|
402
|
+
lendingPool: string,
|
|
403
|
+
overrides?: CallOverrides
|
|
404
|
+
): Promise<PopulatedTransaction>;
|
|
405
|
+
};
|
|
406
|
+
}
|