@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.
Files changed (40) hide show
  1. package/package.json +1 -1
  2. package/src/contracts/IClearingCoordinatorAbi.ts +406 -0
  3. package/src/contracts/IERC20MetadataAbi.ts +364 -0
  4. package/src/contracts/IFeeManagerAbi.ts +182 -0
  5. package/src/contracts/IKSULockingAbi.ts +965 -0
  6. package/src/contracts/IKasuAllowListAbi.ts +605 -0
  7. package/src/contracts/IKasuControllerAbi.ts +703 -0
  8. package/src/contracts/IKasuNFTsAbi.ts +2744 -0
  9. package/src/contracts/IKsuPriceAbi.ts +87 -0
  10. package/src/contracts/ILendingPoolAbi.ts +2081 -0
  11. package/src/contracts/ILendingPoolFactoryAbi.ts +161 -0
  12. package/src/contracts/ILendingPoolManagerAbi.ts +1917 -0
  13. package/src/contracts/ILendingPoolTrancheAbi.ts +1911 -0
  14. package/src/contracts/ISystemVariablesAbi.ts +908 -0
  15. package/src/contracts/IUserLoyaltyRewardsAbi.ts +544 -0
  16. package/src/contracts/IUserManagerAbi.ts +612 -0
  17. package/src/contracts/KSULockBonusAbi.ts +124 -0
  18. package/src/contracts/KasuPoolExternalTVLAbi.ts +1071 -0
  19. package/src/contracts/SwapperAbi.ts +266 -0
  20. package/src/contracts/common.ts +44 -0
  21. package/src/contracts/factories/IClearingCoordinatorAbi__factory.ts +438 -0
  22. package/src/contracts/factories/IERC20MetadataAbi__factory.ts +248 -0
  23. package/src/contracts/factories/IFeeManagerAbi__factory.ts +90 -0
  24. package/src/contracts/factories/IKSULockingAbi__factory.ts +778 -0
  25. package/src/contracts/factories/IKasuAllowListAbi__factory.ts +479 -0
  26. package/src/contracts/factories/IKasuControllerAbi__factory.ts +447 -0
  27. package/src/contracts/factories/IKasuNFTsAbi__factory.ts +2116 -0
  28. package/src/contracts/factories/IKsuPriceAbi__factory.ts +36 -0
  29. package/src/contracts/factories/ILendingPoolAbi__factory.ts +1455 -0
  30. package/src/contracts/factories/ILendingPoolFactoryAbi__factory.ts +125 -0
  31. package/src/contracts/factories/ILendingPoolManagerAbi__factory.ts +1375 -0
  32. package/src/contracts/factories/ILendingPoolTrancheAbi__factory.ts +1345 -0
  33. package/src/contracts/factories/ISystemVariablesAbi__factory.ts +455 -0
  34. package/src/contracts/factories/IUserLoyaltyRewardsAbi__factory.ts +316 -0
  35. package/src/contracts/factories/IUserManagerAbi__factory.ts +345 -0
  36. package/src/contracts/factories/KSULockBonusAbi__factory.ts +115 -0
  37. package/src/contracts/factories/KasuPoolExternalTVLAbi__factory.ts +840 -0
  38. package/src/contracts/factories/SwapperAbi__factory.ts +167 -0
  39. package/src/contracts/factories/index.ts +21 -0
  40. package/src/contracts/index.ts +40 -0
@@ -0,0 +1,266 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type {
5
+ BaseContract,
6
+ BigNumber,
7
+ BytesLike,
8
+ CallOverrides,
9
+ ContractTransaction,
10
+ Overrides,
11
+ PopulatedTransaction,
12
+ Signer,
13
+ utils,
14
+ } from "ethers";
15
+ import type {
16
+ FunctionFragment,
17
+ Result,
18
+ EventFragment,
19
+ } from "@ethersproject/abi";
20
+ import type { Listener, Provider } from "@ethersproject/providers";
21
+ import type {
22
+ TypedEventFilter,
23
+ TypedEvent,
24
+ TypedListener,
25
+ OnEvent,
26
+ } from "./common";
27
+
28
+ export type SwapInfoStruct = {
29
+ swapTarget: string;
30
+ token: string;
31
+ swapCallData: BytesLike;
32
+ };
33
+
34
+ export type SwapInfoStructOutput = [string, string, string] & {
35
+ swapTarget: string;
36
+ token: string;
37
+ swapCallData: string;
38
+ };
39
+
40
+ export interface SwapperAbiInterface extends utils.Interface {
41
+ functions: {
42
+ "isExchangeAllowed(address)": FunctionFragment;
43
+ "swap(address[],(address,address,bytes)[],address,address)": FunctionFragment;
44
+ "updateExchangeAllowlist(address[],bool[])": FunctionFragment;
45
+ };
46
+
47
+ getFunction(
48
+ nameOrSignatureOrTopic:
49
+ | "isExchangeAllowed"
50
+ | "swap"
51
+ | "updateExchangeAllowlist"
52
+ ): FunctionFragment;
53
+
54
+ encodeFunctionData(
55
+ functionFragment: "isExchangeAllowed",
56
+ values: [string]
57
+ ): string;
58
+ encodeFunctionData(
59
+ functionFragment: "swap",
60
+ values: [string[], SwapInfoStruct[], string, string]
61
+ ): string;
62
+ encodeFunctionData(
63
+ functionFragment: "updateExchangeAllowlist",
64
+ values: [string[], boolean[]]
65
+ ): string;
66
+
67
+ decodeFunctionResult(
68
+ functionFragment: "isExchangeAllowed",
69
+ data: BytesLike
70
+ ): Result;
71
+ decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result;
72
+ decodeFunctionResult(
73
+ functionFragment: "updateExchangeAllowlist",
74
+ data: BytesLike
75
+ ): Result;
76
+
77
+ events: {
78
+ "ExchangeAllowlistUpdated(address,bool)": EventFragment;
79
+ "Swapped(address,address[],address,uint256[],uint256)": EventFragment;
80
+ };
81
+
82
+ getEvent(nameOrSignatureOrTopic: "ExchangeAllowlistUpdated"): EventFragment;
83
+ getEvent(nameOrSignatureOrTopic: "Swapped"): EventFragment;
84
+ }
85
+
86
+ export interface ExchangeAllowlistUpdatedEventObject {
87
+ exchange: string;
88
+ isAllowed: boolean;
89
+ }
90
+ export type ExchangeAllowlistUpdatedEvent = TypedEvent<
91
+ [string, boolean],
92
+ ExchangeAllowlistUpdatedEventObject
93
+ >;
94
+
95
+ export type ExchangeAllowlistUpdatedEventFilter =
96
+ TypedEventFilter<ExchangeAllowlistUpdatedEvent>;
97
+
98
+ export interface SwappedEventObject {
99
+ receiver: string;
100
+ tokensIn: string[];
101
+ tokenOut: string;
102
+ amountsIn: BigNumber[];
103
+ amountOut: BigNumber;
104
+ }
105
+ export type SwappedEvent = TypedEvent<
106
+ [string, string[], string, BigNumber[], BigNumber],
107
+ SwappedEventObject
108
+ >;
109
+
110
+ export type SwappedEventFilter = TypedEventFilter<SwappedEvent>;
111
+
112
+ export interface SwapperAbi extends BaseContract {
113
+ connect(signerOrProvider: Signer | Provider | string): this;
114
+ attach(addressOrName: string): this;
115
+ deployed(): Promise<this>;
116
+
117
+ interface: SwapperAbiInterface;
118
+
119
+ queryFilter<TEvent extends TypedEvent>(
120
+ event: TypedEventFilter<TEvent>,
121
+ fromBlockOrBlockhash?: string | number | undefined,
122
+ toBlock?: string | number | undefined
123
+ ): Promise<Array<TEvent>>;
124
+
125
+ listeners<TEvent extends TypedEvent>(
126
+ eventFilter?: TypedEventFilter<TEvent>
127
+ ): Array<TypedListener<TEvent>>;
128
+ listeners(eventName?: string): Array<Listener>;
129
+ removeAllListeners<TEvent extends TypedEvent>(
130
+ eventFilter: TypedEventFilter<TEvent>
131
+ ): this;
132
+ removeAllListeners(eventName?: string): this;
133
+ off: OnEvent<this>;
134
+ on: OnEvent<this>;
135
+ once: OnEvent<this>;
136
+ removeListener: OnEvent<this>;
137
+
138
+ functions: {
139
+ isExchangeAllowed(
140
+ exchange: string,
141
+ overrides?: CallOverrides
142
+ ): Promise<[boolean] & { isAllowed: boolean }>;
143
+
144
+ swap(
145
+ tokensIn: string[],
146
+ swapInfo: SwapInfoStruct[],
147
+ tokenOut: string,
148
+ receiver: string,
149
+ overrides?: Overrides & { from?: string }
150
+ ): Promise<ContractTransaction>;
151
+
152
+ updateExchangeAllowlist(
153
+ exchanges: string[],
154
+ allowed: boolean[],
155
+ overrides?: Overrides & { from?: string }
156
+ ): Promise<ContractTransaction>;
157
+ };
158
+
159
+ isExchangeAllowed(
160
+ exchange: string,
161
+ overrides?: CallOverrides
162
+ ): Promise<boolean>;
163
+
164
+ swap(
165
+ tokensIn: string[],
166
+ swapInfo: SwapInfoStruct[],
167
+ tokenOut: string,
168
+ receiver: string,
169
+ overrides?: Overrides & { from?: string }
170
+ ): Promise<ContractTransaction>;
171
+
172
+ updateExchangeAllowlist(
173
+ exchanges: string[],
174
+ allowed: boolean[],
175
+ overrides?: Overrides & { from?: string }
176
+ ): Promise<ContractTransaction>;
177
+
178
+ callStatic: {
179
+ isExchangeAllowed(
180
+ exchange: string,
181
+ overrides?: CallOverrides
182
+ ): Promise<boolean>;
183
+
184
+ swap(
185
+ tokensIn: string[],
186
+ swapInfo: SwapInfoStruct[],
187
+ tokenOut: string,
188
+ receiver: string,
189
+ overrides?: CallOverrides
190
+ ): Promise<BigNumber>;
191
+
192
+ updateExchangeAllowlist(
193
+ exchanges: string[],
194
+ allowed: boolean[],
195
+ overrides?: CallOverrides
196
+ ): Promise<void>;
197
+ };
198
+
199
+ filters: {
200
+ "ExchangeAllowlistUpdated(address,bool)"(
201
+ exchange?: string | null,
202
+ isAllowed?: null
203
+ ): ExchangeAllowlistUpdatedEventFilter;
204
+ ExchangeAllowlistUpdated(
205
+ exchange?: string | null,
206
+ isAllowed?: null
207
+ ): ExchangeAllowlistUpdatedEventFilter;
208
+
209
+ "Swapped(address,address[],address,uint256[],uint256)"(
210
+ receiver?: string | null,
211
+ tokensIn?: null,
212
+ tokenOut?: null,
213
+ amountsIn?: null,
214
+ amountOut?: null
215
+ ): SwappedEventFilter;
216
+ Swapped(
217
+ receiver?: string | null,
218
+ tokensIn?: null,
219
+ tokenOut?: null,
220
+ amountsIn?: null,
221
+ amountOut?: null
222
+ ): SwappedEventFilter;
223
+ };
224
+
225
+ estimateGas: {
226
+ isExchangeAllowed(
227
+ exchange: string,
228
+ overrides?: CallOverrides
229
+ ): Promise<BigNumber>;
230
+
231
+ swap(
232
+ tokensIn: string[],
233
+ swapInfo: SwapInfoStruct[],
234
+ tokenOut: string,
235
+ receiver: string,
236
+ overrides?: Overrides & { from?: string }
237
+ ): Promise<BigNumber>;
238
+
239
+ updateExchangeAllowlist(
240
+ exchanges: string[],
241
+ allowed: boolean[],
242
+ overrides?: Overrides & { from?: string }
243
+ ): Promise<BigNumber>;
244
+ };
245
+
246
+ populateTransaction: {
247
+ isExchangeAllowed(
248
+ exchange: string,
249
+ overrides?: CallOverrides
250
+ ): Promise<PopulatedTransaction>;
251
+
252
+ swap(
253
+ tokensIn: string[],
254
+ swapInfo: SwapInfoStruct[],
255
+ tokenOut: string,
256
+ receiver: string,
257
+ overrides?: Overrides & { from?: string }
258
+ ): Promise<PopulatedTransaction>;
259
+
260
+ updateExchangeAllowlist(
261
+ exchanges: string[],
262
+ allowed: boolean[],
263
+ overrides?: Overrides & { from?: string }
264
+ ): Promise<PopulatedTransaction>;
265
+ };
266
+ }
@@ -0,0 +1,44 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type { Listener } from "@ethersproject/providers";
5
+ import type { Event, EventFilter } from "ethers";
6
+
7
+ export interface TypedEvent<
8
+ TArgsArray extends Array<any> = any,
9
+ TArgsObject = any
10
+ > extends Event {
11
+ args: TArgsArray & TArgsObject;
12
+ }
13
+
14
+ export interface TypedEventFilter<_TEvent extends TypedEvent>
15
+ extends EventFilter {}
16
+
17
+ export interface TypedListener<TEvent extends TypedEvent> {
18
+ (...listenerArg: [...__TypechainArgsArray<TEvent>, TEvent]): void;
19
+ }
20
+
21
+ type __TypechainArgsArray<T> = T extends TypedEvent<infer U> ? U : never;
22
+
23
+ export interface OnEvent<TRes> {
24
+ <TEvent extends TypedEvent>(
25
+ eventFilter: TypedEventFilter<TEvent>,
26
+ listener: TypedListener<TEvent>
27
+ ): TRes;
28
+ (eventName: string, listener: Listener): TRes;
29
+ }
30
+
31
+ export type MinEthersFactory<C, ARGS> = {
32
+ deploy(...a: ARGS[]): Promise<C>;
33
+ };
34
+
35
+ export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<
36
+ infer C,
37
+ any
38
+ >
39
+ ? C
40
+ : never;
41
+
42
+ export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any>
43
+ ? Parameters<F["deploy"]>
44
+ : never;