@ichidao/ichi-vaults-sdk 0.0.112 → 0.1.0
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/README.md +163 -0
- package/dist/abis/types/MultiFeeDistributer.d.ts +475 -0
- package/dist/abis/types/MultiFeeDistributer.js +3 -0
- package/dist/abis/types/MultiFeeDistributer.js.map +1 -0
- package/dist/abis/types/factories/MultiFeeDistributer__factory.d.ts +451 -0
- package/dist/abis/types/factories/MultiFeeDistributer__factory.js +596 -0
- package/dist/abis/types/factories/MultiFeeDistributer__factory.js.map +1 -0
- package/dist/abis/types/factories/index.d.ts +1 -0
- package/dist/abis/types/factories/index.js +3 -1
- package/dist/abis/types/factories/index.js.map +1 -1
- package/dist/abis/types/index.d.ts +2 -0
- package/dist/abis/types/index.js +3 -1
- package/dist/abis/types/index.js.map +1 -1
- package/dist/src/__tests__/index.test.js +74 -1
- package/dist/src/__tests__/index.test.js.map +1 -1
- package/dist/src/abis/types/MultiFeeDistributer.d.ts +475 -0
- package/dist/src/abis/types/factories/MultiFeeDistributer__factory.d.ts +451 -0
- package/dist/src/abis/types/factories/index.d.ts +1 -0
- package/dist/src/abis/types/index.d.ts +2 -0
- package/dist/src/contracts/index.d.ts +2 -1
- package/dist/src/contracts/index.js +11 -1
- package/dist/src/contracts/index.js.map +1 -1
- package/dist/src/functions/claimRewards.d.ts +14 -0
- package/dist/src/functions/claimRewards.js +108 -0
- package/dist/src/functions/claimRewards.js.map +1 -0
- package/dist/src/functions/rewardInfo.d.ts +3 -0
- package/dist/src/functions/rewardInfo.js +176 -0
- package/dist/src/functions/rewardInfo.js.map +1 -0
- package/dist/src/functions/userBalances.d.ts +1 -1
- package/dist/src/functions/userBalances.js +64 -29
- package/dist/src/functions/userBalances.js.map +1 -1
- package/dist/src/functions/userRewards.d.ts +7 -0
- package/dist/src/functions/userRewards.js +132 -0
- package/dist/src/functions/userRewards.js.map +1 -0
- package/dist/src/functions/vault.d.ts +2 -1
- package/dist/src/functions/vault.js +75 -26
- package/dist/src/functions/vault.js.map +1 -1
- package/dist/src/graphql/constants.js +53 -46
- package/dist/src/graphql/constants.js.map +1 -1
- package/dist/src/graphql/queries.d.ts +14 -1
- package/dist/src/graphql/queries.js +57 -18
- package/dist/src/graphql/queries.js.map +1 -1
- package/dist/src/index.cjs.js +4 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.esm.js +4 -1
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/src/contracts/index.d.ts +2 -1
- package/dist/src/src/functions/claimRewards.d.ts +14 -0
- package/dist/src/src/functions/rewardInfo.d.ts +3 -0
- package/dist/src/src/functions/userBalances.d.ts +1 -1
- package/dist/src/src/functions/userRewards.d.ts +7 -0
- package/dist/src/src/functions/vault.d.ts +2 -1
- package/dist/src/src/graphql/queries.d.ts +14 -1
- package/dist/src/src/index.d.ts +3 -0
- package/dist/src/src/types/index.d.ts +39 -0
- package/dist/src/src/types/vaultQueryData.d.ts +10 -1
- package/dist/src/src/utils/isVelodrome.d.ts +2 -0
- package/dist/src/src/utils/multicallUtils.d.ts +2 -0
- package/dist/src/types/index.d.ts +39 -0
- package/dist/src/types/index.js +2 -0
- package/dist/src/types/index.js.map +1 -1
- package/dist/src/types/vaultQueryData.d.ts +10 -1
- package/dist/src/utils/config/addresses.js +113 -101
- package/dist/src/utils/config/addresses.js.map +1 -1
- package/dist/src/utils/isVelodrome.d.ts +2 -0
- package/dist/src/utils/isVelodrome.js +11 -0
- package/dist/src/utils/isVelodrome.js.map +1 -0
- package/dist/src/utils/multicallUtils.d.ts +2 -0
- package/dist/src/utils/multicallUtils.js +19 -1
- package/dist/src/utils/multicallUtils.js.map +1 -1
- package/package.json +1 -1
@@ -0,0 +1,451 @@
|
|
1
|
+
import { Signer } from "ethers";
|
2
|
+
import type { Provider } from "@ethersproject/providers";
|
3
|
+
import type { MultiFeeDistributer, MultiFeeDistributerInterface } from "../MultiFeeDistributer";
|
4
|
+
export declare class MultiFeeDistributer__factory {
|
5
|
+
static readonly abi: readonly [{
|
6
|
+
readonly inputs: readonly [];
|
7
|
+
readonly stateMutability: "nonpayable";
|
8
|
+
readonly type: "constructor";
|
9
|
+
}, {
|
10
|
+
readonly inputs: readonly [];
|
11
|
+
readonly name: "ActiveReward";
|
12
|
+
readonly type: "error";
|
13
|
+
}, {
|
14
|
+
readonly inputs: readonly [];
|
15
|
+
readonly name: "AddressZero";
|
16
|
+
readonly type: "error";
|
17
|
+
}, {
|
18
|
+
readonly inputs: readonly [];
|
19
|
+
readonly name: "InsufficientPermission";
|
20
|
+
readonly type: "error";
|
21
|
+
}, {
|
22
|
+
readonly inputs: readonly [];
|
23
|
+
readonly name: "InvalidAmount";
|
24
|
+
readonly type: "error";
|
25
|
+
}, {
|
26
|
+
readonly inputs: readonly [];
|
27
|
+
readonly name: "InvalidBurn";
|
28
|
+
readonly type: "error";
|
29
|
+
}, {
|
30
|
+
readonly inputs: readonly [];
|
31
|
+
readonly name: "IsStakingToken";
|
32
|
+
readonly type: "error";
|
33
|
+
}, {
|
34
|
+
readonly anonymous: false;
|
35
|
+
readonly inputs: readonly [{
|
36
|
+
readonly indexed: true;
|
37
|
+
readonly internalType: "address";
|
38
|
+
readonly name: "previousOwner";
|
39
|
+
readonly type: "address";
|
40
|
+
}, {
|
41
|
+
readonly indexed: true;
|
42
|
+
readonly internalType: "address";
|
43
|
+
readonly name: "newOwner";
|
44
|
+
readonly type: "address";
|
45
|
+
}];
|
46
|
+
readonly name: "OwnershipTransferred";
|
47
|
+
readonly type: "event";
|
48
|
+
}, {
|
49
|
+
readonly anonymous: false;
|
50
|
+
readonly inputs: readonly [{
|
51
|
+
readonly indexed: false;
|
52
|
+
readonly internalType: "address";
|
53
|
+
readonly name: "account";
|
54
|
+
readonly type: "address";
|
55
|
+
}];
|
56
|
+
readonly name: "Paused";
|
57
|
+
readonly type: "event";
|
58
|
+
}, {
|
59
|
+
readonly anonymous: false;
|
60
|
+
readonly inputs: readonly [{
|
61
|
+
readonly indexed: true;
|
62
|
+
readonly internalType: "address";
|
63
|
+
readonly name: "token";
|
64
|
+
readonly type: "address";
|
65
|
+
}, {
|
66
|
+
readonly indexed: false;
|
67
|
+
readonly internalType: "uint256";
|
68
|
+
readonly name: "amount";
|
69
|
+
readonly type: "uint256";
|
70
|
+
}];
|
71
|
+
readonly name: "Recovered";
|
72
|
+
readonly type: "event";
|
73
|
+
}, {
|
74
|
+
readonly anonymous: false;
|
75
|
+
readonly inputs: readonly [{
|
76
|
+
readonly indexed: true;
|
77
|
+
readonly internalType: "address";
|
78
|
+
readonly name: "user";
|
79
|
+
readonly type: "address";
|
80
|
+
}, {
|
81
|
+
readonly indexed: true;
|
82
|
+
readonly internalType: "address";
|
83
|
+
readonly name: "rewardToken";
|
84
|
+
readonly type: "address";
|
85
|
+
}, {
|
86
|
+
readonly indexed: false;
|
87
|
+
readonly internalType: "uint256";
|
88
|
+
readonly name: "reward";
|
89
|
+
readonly type: "uint256";
|
90
|
+
}];
|
91
|
+
readonly name: "RewardPaid";
|
92
|
+
readonly type: "event";
|
93
|
+
}, {
|
94
|
+
readonly anonymous: false;
|
95
|
+
readonly inputs: readonly [];
|
96
|
+
readonly name: "RewardsUpdated";
|
97
|
+
readonly type: "event";
|
98
|
+
}, {
|
99
|
+
readonly anonymous: false;
|
100
|
+
readonly inputs: readonly [{
|
101
|
+
readonly indexed: true;
|
102
|
+
readonly internalType: "address";
|
103
|
+
readonly name: "user";
|
104
|
+
readonly type: "address";
|
105
|
+
}, {
|
106
|
+
readonly indexed: false;
|
107
|
+
readonly internalType: "uint256";
|
108
|
+
readonly name: "amount";
|
109
|
+
readonly type: "uint256";
|
110
|
+
}];
|
111
|
+
readonly name: "Stake";
|
112
|
+
readonly type: "event";
|
113
|
+
}, {
|
114
|
+
readonly anonymous: false;
|
115
|
+
readonly inputs: readonly [{
|
116
|
+
readonly indexed: false;
|
117
|
+
readonly internalType: "address";
|
118
|
+
readonly name: "account";
|
119
|
+
readonly type: "address";
|
120
|
+
}];
|
121
|
+
readonly name: "Unpaused";
|
122
|
+
readonly type: "event";
|
123
|
+
}, {
|
124
|
+
readonly anonymous: false;
|
125
|
+
readonly inputs: readonly [{
|
126
|
+
readonly indexed: true;
|
127
|
+
readonly internalType: "address";
|
128
|
+
readonly name: "user";
|
129
|
+
readonly type: "address";
|
130
|
+
}, {
|
131
|
+
readonly indexed: false;
|
132
|
+
readonly internalType: "uint256";
|
133
|
+
readonly name: "receivedAmount";
|
134
|
+
readonly type: "uint256";
|
135
|
+
}];
|
136
|
+
readonly name: "Unstake";
|
137
|
+
readonly type: "event";
|
138
|
+
}, {
|
139
|
+
readonly inputs: readonly [{
|
140
|
+
readonly internalType: "address";
|
141
|
+
readonly name: "_rewardToken";
|
142
|
+
readonly type: "address";
|
143
|
+
}];
|
144
|
+
readonly name: "addReward";
|
145
|
+
readonly outputs: readonly [];
|
146
|
+
readonly stateMutability: "nonpayable";
|
147
|
+
readonly type: "function";
|
148
|
+
}, {
|
149
|
+
readonly inputs: readonly [{
|
150
|
+
readonly internalType: "address";
|
151
|
+
readonly name: "";
|
152
|
+
readonly type: "address";
|
153
|
+
}, {
|
154
|
+
readonly internalType: "address";
|
155
|
+
readonly name: "";
|
156
|
+
readonly type: "address";
|
157
|
+
}];
|
158
|
+
readonly name: "claimable";
|
159
|
+
readonly outputs: readonly [{
|
160
|
+
readonly internalType: "uint256";
|
161
|
+
readonly name: "";
|
162
|
+
readonly type: "uint256";
|
163
|
+
}];
|
164
|
+
readonly stateMutability: "view";
|
165
|
+
readonly type: "function";
|
166
|
+
}, {
|
167
|
+
readonly inputs: readonly [{
|
168
|
+
readonly internalType: "address";
|
169
|
+
readonly name: "account";
|
170
|
+
readonly type: "address";
|
171
|
+
}];
|
172
|
+
readonly name: "claimableRewards";
|
173
|
+
readonly outputs: readonly [{
|
174
|
+
readonly internalType: "address[]";
|
175
|
+
readonly name: "";
|
176
|
+
readonly type: "address[]";
|
177
|
+
}, {
|
178
|
+
readonly internalType: "uint256[]";
|
179
|
+
readonly name: "";
|
180
|
+
readonly type: "uint256[]";
|
181
|
+
}];
|
182
|
+
readonly stateMutability: "view";
|
183
|
+
readonly type: "function";
|
184
|
+
}, {
|
185
|
+
readonly inputs: readonly [];
|
186
|
+
readonly name: "getAllRewards";
|
187
|
+
readonly outputs: readonly [{
|
188
|
+
readonly internalType: "uint256[]";
|
189
|
+
readonly name: "claimableAmounts";
|
190
|
+
readonly type: "uint256[]";
|
191
|
+
}];
|
192
|
+
readonly stateMutability: "nonpayable";
|
193
|
+
readonly type: "function";
|
194
|
+
}, {
|
195
|
+
readonly inputs: readonly [{
|
196
|
+
readonly internalType: "address";
|
197
|
+
readonly name: "_onBehalfOf";
|
198
|
+
readonly type: "address";
|
199
|
+
}, {
|
200
|
+
readonly internalType: "address[]";
|
201
|
+
readonly name: "_rewardTokens";
|
202
|
+
readonly type: "address[]";
|
203
|
+
}];
|
204
|
+
readonly name: "getReward";
|
205
|
+
readonly outputs: readonly [{
|
206
|
+
readonly internalType: "uint256[]";
|
207
|
+
readonly name: "claimableAmounts";
|
208
|
+
readonly type: "uint256[]";
|
209
|
+
}];
|
210
|
+
readonly stateMutability: "nonpayable";
|
211
|
+
readonly type: "function";
|
212
|
+
}, {
|
213
|
+
readonly inputs: readonly [{
|
214
|
+
readonly internalType: "address";
|
215
|
+
readonly name: "user";
|
216
|
+
readonly type: "address";
|
217
|
+
}, {
|
218
|
+
readonly internalType: "address";
|
219
|
+
readonly name: "rewardToken";
|
220
|
+
readonly type: "address";
|
221
|
+
}];
|
222
|
+
readonly name: "getUserRewardPerToken";
|
223
|
+
readonly outputs: readonly [{
|
224
|
+
readonly internalType: "uint256";
|
225
|
+
readonly name: "";
|
226
|
+
readonly type: "uint256";
|
227
|
+
}];
|
228
|
+
readonly stateMutability: "view";
|
229
|
+
readonly type: "function";
|
230
|
+
}, {
|
231
|
+
readonly inputs: readonly [{
|
232
|
+
readonly internalType: "address";
|
233
|
+
readonly name: "";
|
234
|
+
readonly type: "address";
|
235
|
+
}];
|
236
|
+
readonly name: "managers";
|
237
|
+
readonly outputs: readonly [{
|
238
|
+
readonly internalType: "bool";
|
239
|
+
readonly name: "";
|
240
|
+
readonly type: "bool";
|
241
|
+
}];
|
242
|
+
readonly stateMutability: "view";
|
243
|
+
readonly type: "function";
|
244
|
+
}, {
|
245
|
+
readonly inputs: readonly [];
|
246
|
+
readonly name: "owner";
|
247
|
+
readonly outputs: readonly [{
|
248
|
+
readonly internalType: "address";
|
249
|
+
readonly name: "";
|
250
|
+
readonly type: "address";
|
251
|
+
}];
|
252
|
+
readonly stateMutability: "view";
|
253
|
+
readonly type: "function";
|
254
|
+
}, {
|
255
|
+
readonly inputs: readonly [];
|
256
|
+
readonly name: "pause";
|
257
|
+
readonly outputs: readonly [];
|
258
|
+
readonly stateMutability: "nonpayable";
|
259
|
+
readonly type: "function";
|
260
|
+
}, {
|
261
|
+
readonly inputs: readonly [];
|
262
|
+
readonly name: "paused";
|
263
|
+
readonly outputs: readonly [{
|
264
|
+
readonly internalType: "bool";
|
265
|
+
readonly name: "";
|
266
|
+
readonly type: "bool";
|
267
|
+
}];
|
268
|
+
readonly stateMutability: "view";
|
269
|
+
readonly type: "function";
|
270
|
+
}, {
|
271
|
+
readonly inputs: readonly [{
|
272
|
+
readonly internalType: "address";
|
273
|
+
readonly name: "tokenAddress";
|
274
|
+
readonly type: "address";
|
275
|
+
}, {
|
276
|
+
readonly internalType: "uint256";
|
277
|
+
readonly name: "tokenAmount";
|
278
|
+
readonly type: "uint256";
|
279
|
+
}];
|
280
|
+
readonly name: "recoverERC20";
|
281
|
+
readonly outputs: readonly [];
|
282
|
+
readonly stateMutability: "nonpayable";
|
283
|
+
readonly type: "function";
|
284
|
+
}, {
|
285
|
+
readonly inputs: readonly [{
|
286
|
+
readonly internalType: "address[]";
|
287
|
+
readonly name: "_managers";
|
288
|
+
readonly type: "address[]";
|
289
|
+
}];
|
290
|
+
readonly name: "removeManagers";
|
291
|
+
readonly outputs: readonly [];
|
292
|
+
readonly stateMutability: "nonpayable";
|
293
|
+
readonly type: "function";
|
294
|
+
}, {
|
295
|
+
readonly inputs: readonly [];
|
296
|
+
readonly name: "renounceOwnership";
|
297
|
+
readonly outputs: readonly [];
|
298
|
+
readonly stateMutability: "nonpayable";
|
299
|
+
readonly type: "function";
|
300
|
+
}, {
|
301
|
+
readonly inputs: readonly [{
|
302
|
+
readonly internalType: "address";
|
303
|
+
readonly name: "";
|
304
|
+
readonly type: "address";
|
305
|
+
}];
|
306
|
+
readonly name: "rewardData";
|
307
|
+
readonly outputs: readonly [{
|
308
|
+
readonly internalType: "uint256";
|
309
|
+
readonly name: "amount";
|
310
|
+
readonly type: "uint256";
|
311
|
+
}, {
|
312
|
+
readonly internalType: "uint256";
|
313
|
+
readonly name: "lastTimeUpdated";
|
314
|
+
readonly type: "uint256";
|
315
|
+
}, {
|
316
|
+
readonly internalType: "uint256";
|
317
|
+
readonly name: "rewardPerToken";
|
318
|
+
readonly type: "uint256";
|
319
|
+
}];
|
320
|
+
readonly stateMutability: "view";
|
321
|
+
readonly type: "function";
|
322
|
+
}, {
|
323
|
+
readonly inputs: readonly [{
|
324
|
+
readonly internalType: "uint256";
|
325
|
+
readonly name: "";
|
326
|
+
readonly type: "uint256";
|
327
|
+
}];
|
328
|
+
readonly name: "rewardTokens";
|
329
|
+
readonly outputs: readonly [{
|
330
|
+
readonly internalType: "address";
|
331
|
+
readonly name: "";
|
332
|
+
readonly type: "address";
|
333
|
+
}];
|
334
|
+
readonly stateMutability: "view";
|
335
|
+
readonly type: "function";
|
336
|
+
}, {
|
337
|
+
readonly inputs: readonly [{
|
338
|
+
readonly internalType: "address[]";
|
339
|
+
readonly name: "_managers";
|
340
|
+
readonly type: "address[]";
|
341
|
+
}];
|
342
|
+
readonly name: "setManagers";
|
343
|
+
readonly outputs: readonly [];
|
344
|
+
readonly stateMutability: "nonpayable";
|
345
|
+
readonly type: "function";
|
346
|
+
}, {
|
347
|
+
readonly inputs: readonly [{
|
348
|
+
readonly internalType: "uint256";
|
349
|
+
readonly name: "amount";
|
350
|
+
readonly type: "uint256";
|
351
|
+
}, {
|
352
|
+
readonly internalType: "address";
|
353
|
+
readonly name: "onBehalfOf";
|
354
|
+
readonly type: "address";
|
355
|
+
}];
|
356
|
+
readonly name: "stake";
|
357
|
+
readonly outputs: readonly [];
|
358
|
+
readonly stateMutability: "nonpayable";
|
359
|
+
readonly type: "function";
|
360
|
+
}, {
|
361
|
+
readonly inputs: readonly [];
|
362
|
+
readonly name: "stakingToken";
|
363
|
+
readonly outputs: readonly [{
|
364
|
+
readonly internalType: "address";
|
365
|
+
readonly name: "";
|
366
|
+
readonly type: "address";
|
367
|
+
}];
|
368
|
+
readonly stateMutability: "view";
|
369
|
+
readonly type: "function";
|
370
|
+
}, {
|
371
|
+
readonly inputs: readonly [{
|
372
|
+
readonly internalType: "address";
|
373
|
+
readonly name: "user";
|
374
|
+
readonly type: "address";
|
375
|
+
}];
|
376
|
+
readonly name: "totalBalance";
|
377
|
+
readonly outputs: readonly [{
|
378
|
+
readonly internalType: "uint256";
|
379
|
+
readonly name: "";
|
380
|
+
readonly type: "uint256";
|
381
|
+
}];
|
382
|
+
readonly stateMutability: "view";
|
383
|
+
readonly type: "function";
|
384
|
+
}, {
|
385
|
+
readonly inputs: readonly [];
|
386
|
+
readonly name: "totalStakes";
|
387
|
+
readonly outputs: readonly [{
|
388
|
+
readonly internalType: "uint256";
|
389
|
+
readonly name: "";
|
390
|
+
readonly type: "uint256";
|
391
|
+
}];
|
392
|
+
readonly stateMutability: "view";
|
393
|
+
readonly type: "function";
|
394
|
+
}, {
|
395
|
+
readonly inputs: readonly [{
|
396
|
+
readonly internalType: "address";
|
397
|
+
readonly name: "newOwner";
|
398
|
+
readonly type: "address";
|
399
|
+
}];
|
400
|
+
readonly name: "transferOwnership";
|
401
|
+
readonly outputs: readonly [];
|
402
|
+
readonly stateMutability: "nonpayable";
|
403
|
+
readonly type: "function";
|
404
|
+
}, {
|
405
|
+
readonly inputs: readonly [];
|
406
|
+
readonly name: "unpause";
|
407
|
+
readonly outputs: readonly [];
|
408
|
+
readonly stateMutability: "nonpayable";
|
409
|
+
readonly type: "function";
|
410
|
+
}, {
|
411
|
+
readonly inputs: readonly [{
|
412
|
+
readonly internalType: "uint256";
|
413
|
+
readonly name: "amount";
|
414
|
+
readonly type: "uint256";
|
415
|
+
}];
|
416
|
+
readonly name: "unstake";
|
417
|
+
readonly outputs: readonly [];
|
418
|
+
readonly stateMutability: "nonpayable";
|
419
|
+
readonly type: "function";
|
420
|
+
}, {
|
421
|
+
readonly inputs: readonly [];
|
422
|
+
readonly name: "updateReward";
|
423
|
+
readonly outputs: readonly [];
|
424
|
+
readonly stateMutability: "nonpayable";
|
425
|
+
readonly type: "function";
|
426
|
+
}, {
|
427
|
+
readonly inputs: readonly [{
|
428
|
+
readonly internalType: "address";
|
429
|
+
readonly name: "";
|
430
|
+
readonly type: "address";
|
431
|
+
}];
|
432
|
+
readonly name: "userData";
|
433
|
+
readonly outputs: readonly [{
|
434
|
+
readonly internalType: "uint256";
|
435
|
+
readonly name: "tokenAmount";
|
436
|
+
readonly type: "uint256";
|
437
|
+
}, {
|
438
|
+
readonly internalType: "uint256";
|
439
|
+
readonly name: "lastTimeUpdated";
|
440
|
+
readonly type: "uint256";
|
441
|
+
}, {
|
442
|
+
readonly internalType: "uint256";
|
443
|
+
readonly name: "tokenClaimable";
|
444
|
+
readonly type: "uint256";
|
445
|
+
}];
|
446
|
+
readonly stateMutability: "view";
|
447
|
+
readonly type: "function";
|
448
|
+
}];
|
449
|
+
static createInterface(): MultiFeeDistributerInterface;
|
450
|
+
static connect(address: string, signerOrProvider: Signer | Provider): MultiFeeDistributer;
|
451
|
+
}
|