@pancakeswap/pools 4.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 (101) hide show
  1. package/.turbo/turbo-build.log +18 -0
  2. package/CHANGELOG.md +91 -0
  3. package/LICENSE +674 -0
  4. package/dist/abis/ICake.d.ts +92 -0
  5. package/dist/abis/ICake.d.ts.map +1 -0
  6. package/dist/abis/ICakeFlexibleSideVaultV2.d.ts +378 -0
  7. package/dist/abis/ICakeFlexibleSideVaultV2.d.ts.map +1 -0
  8. package/dist/abis/ICakeVaultV2.d.ts +750 -0
  9. package/dist/abis/ICakeVaultV2.d.ts.map +1 -0
  10. package/dist/abis/ISmartChef.d.ts +523 -0
  11. package/dist/abis/ISmartChef.d.ts.map +1 -0
  12. package/dist/abis/ISousChef.d.ts +212 -0
  13. package/dist/abis/ISousChef.d.ts.map +1 -0
  14. package/dist/abis/ISousChefBNB.d.ts +279 -0
  15. package/dist/abis/ISousChefBNB.d.ts.map +1 -0
  16. package/dist/abis/ISousChefV2.d.ts +264 -0
  17. package/dist/abis/ISousChefV2.d.ts.map +1 -0
  18. package/dist/abis/ISousChefV3.d.ts +523 -0
  19. package/dist/abis/ISousChefV3.d.ts.map +1 -0
  20. package/dist/constants/contracts.d.ts +22 -0
  21. package/dist/constants/contracts.d.ts.map +1 -0
  22. package/dist/constants/index.d.ts +8 -0
  23. package/dist/constants/index.d.ts.map +1 -0
  24. package/dist/constants/pools/1.d.ts +5 -0
  25. package/dist/constants/pools/1.d.ts.map +1 -0
  26. package/dist/constants/pools/56.d.ts +4 -0
  27. package/dist/constants/pools/56.d.ts.map +1 -0
  28. package/dist/constants/pools/97.d.ts +5 -0
  29. package/dist/constants/pools/97.d.ts.map +1 -0
  30. package/dist/constants/pools/index.d.ts +15 -0
  31. package/dist/constants/pools/index.d.ts.map +1 -0
  32. package/dist/constants/supportedChains.d.ts +4 -0
  33. package/dist/constants/supportedChains.d.ts.map +1 -0
  34. package/dist/index.d.ts +13 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +6288 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/index.mjs +6224 -0
  39. package/dist/index.mjs.map +1 -0
  40. package/dist/queries/fetchPools.d.ts +37 -0
  41. package/dist/queries/fetchPools.d.ts.map +1 -0
  42. package/dist/queries/fetchUserIfo.d.ts +16 -0
  43. package/dist/queries/fetchUserIfo.d.ts.map +1 -0
  44. package/dist/queries/fetchUserPoolsData.d.ts +16 -0
  45. package/dist/queries/fetchUserPoolsData.d.ts.map +1 -0
  46. package/dist/queries/fetchVaultPublic.d.ts +39 -0
  47. package/dist/queries/fetchVaultPublic.d.ts.map +1 -0
  48. package/dist/queries/fetchVaultUser.d.ts +12 -0
  49. package/dist/queries/fetchVaultUser.d.ts.map +1 -0
  50. package/dist/queries/getAddresses.d.ts +4 -0
  51. package/dist/queries/getAddresses.d.ts.map +1 -0
  52. package/dist/queries/index.d.ts +7 -0
  53. package/dist/queries/index.d.ts.map +1 -0
  54. package/dist/types.d.ts +176 -0
  55. package/dist/types.d.ts.map +1 -0
  56. package/dist/utils/apr.d.ts +11 -0
  57. package/dist/utils/apr.d.ts.map +1 -0
  58. package/dist/utils/getContractAddress.d.ts +4 -0
  59. package/dist/utils/getContractAddress.d.ts.map +1 -0
  60. package/dist/utils/getPoolContractBySousId.d.ts +35 -0
  61. package/dist/utils/getPoolContractBySousId.d.ts.map +1 -0
  62. package/dist/utils/index.d.ts +6 -0
  63. package/dist/utils/index.d.ts.map +1 -0
  64. package/dist/utils/isLegacyPool.d.ts +4 -0
  65. package/dist/utils/isLegacyPool.d.ts.map +1 -0
  66. package/dist/utils/isPoolsSupported.d.ts +3 -0
  67. package/dist/utils/isPoolsSupported.d.ts.map +1 -0
  68. package/package.json +40 -0
  69. package/src/abis/ICake.ts +59 -0
  70. package/src/abis/ICakeFlexibleSideVaultV2.ts +487 -0
  71. package/src/abis/ICakeVaultV2.ts +487 -0
  72. package/src/abis/ISmartChef.ts +326 -0
  73. package/src/abis/ISousChef.ts +122 -0
  74. package/src/abis/ISousChefBNB.ts +166 -0
  75. package/src/abis/ISousChefV2.ts +341 -0
  76. package/src/abis/ISousChefV3.ts +326 -0
  77. package/src/constants/contracts.ts +26 -0
  78. package/src/constants/index.ts +10 -0
  79. package/src/constants/pools/1.ts +80 -0
  80. package/src/constants/pools/56.ts +2933 -0
  81. package/src/constants/pools/97.ts +74 -0
  82. package/src/constants/pools/index.ts +44 -0
  83. package/src/constants/supportedChains.ts +5 -0
  84. package/src/index.ts +14 -0
  85. package/src/queries/fetchPools.ts +350 -0
  86. package/src/queries/fetchUserIfo.ts +53 -0
  87. package/src/queries/fetchUserPoolsData.ts +143 -0
  88. package/src/queries/fetchVaultPublic.ts +175 -0
  89. package/src/queries/fetchVaultUser.ts +106 -0
  90. package/src/queries/getAddresses.ts +12 -0
  91. package/src/queries/index.ts +6 -0
  92. package/src/types.ts +207 -0
  93. package/src/utils/apr.ts +35 -0
  94. package/src/utils/getContractAddress.ts +11 -0
  95. package/src/utils/getPoolContractBySousId.ts +111 -0
  96. package/src/utils/index.ts +5 -0
  97. package/src/utils/isLegacyPool.ts +15 -0
  98. package/src/utils/isPoolsSupported.ts +5 -0
  99. package/tsconfig.json +14 -0
  100. package/tsup.config.ts +26 -0
  101. package/vitest.config.ts +9 -0
@@ -0,0 +1,487 @@
1
+ export const cakeFlexibleSideVaultV2ABI = [
2
+ {
3
+ inputs: [],
4
+ name: 'MAX_PERFORMANCE_FEE',
5
+ outputs: [
6
+ {
7
+ internalType: 'uint256',
8
+ name: '',
9
+ type: 'uint256',
10
+ },
11
+ ],
12
+ stateMutability: 'view',
13
+ type: 'function',
14
+ },
15
+ {
16
+ inputs: [],
17
+ name: 'MAX_WITHDRAW_AMOUNT_BOOSTER',
18
+ outputs: [
19
+ {
20
+ internalType: 'uint256',
21
+ name: '',
22
+ type: 'uint256',
23
+ },
24
+ ],
25
+ stateMutability: 'view',
26
+ type: 'function',
27
+ },
28
+ {
29
+ inputs: [],
30
+ name: 'MAX_WITHDRAW_FEE',
31
+ outputs: [
32
+ {
33
+ internalType: 'uint256',
34
+ name: '',
35
+ type: 'uint256',
36
+ },
37
+ ],
38
+ stateMutability: 'view',
39
+ type: 'function',
40
+ },
41
+ {
42
+ inputs: [],
43
+ name: 'MAX_WITHDRAW_FEE_PERIOD',
44
+ outputs: [
45
+ {
46
+ internalType: 'uint256',
47
+ name: '',
48
+ type: 'uint256',
49
+ },
50
+ ],
51
+ stateMutability: 'view',
52
+ type: 'function',
53
+ },
54
+ {
55
+ inputs: [],
56
+ name: 'MIN_DEPOSIT_AMOUNT',
57
+ outputs: [
58
+ {
59
+ internalType: 'uint256',
60
+ name: '',
61
+ type: 'uint256',
62
+ },
63
+ ],
64
+ stateMutability: 'view',
65
+ type: 'function',
66
+ },
67
+ {
68
+ inputs: [],
69
+ name: 'MIN_WITHDRAW_AMOUNT',
70
+ outputs: [
71
+ {
72
+ internalType: 'uint256',
73
+ name: '',
74
+ type: 'uint256',
75
+ },
76
+ ],
77
+ stateMutability: 'view',
78
+ type: 'function',
79
+ },
80
+ {
81
+ inputs: [],
82
+ name: 'MIN_WITHDRAW_AMOUNT_BOOSTER',
83
+ outputs: [
84
+ {
85
+ internalType: 'uint256',
86
+ name: '',
87
+ type: 'uint256',
88
+ },
89
+ ],
90
+ stateMutability: 'view',
91
+ type: 'function',
92
+ },
93
+ {
94
+ inputs: [],
95
+ name: 'admin',
96
+ outputs: [
97
+ {
98
+ internalType: 'address',
99
+ name: '',
100
+ type: 'address',
101
+ },
102
+ ],
103
+ stateMutability: 'view',
104
+ type: 'function',
105
+ },
106
+ {
107
+ inputs: [],
108
+ name: 'available',
109
+ outputs: [
110
+ {
111
+ internalType: 'uint256',
112
+ name: '',
113
+ type: 'uint256',
114
+ },
115
+ ],
116
+ stateMutability: 'view',
117
+ type: 'function',
118
+ },
119
+ {
120
+ inputs: [],
121
+ name: 'balanceOf',
122
+ outputs: [
123
+ {
124
+ internalType: 'uint256',
125
+ name: '',
126
+ type: 'uint256',
127
+ },
128
+ ],
129
+ stateMutability: 'view',
130
+ type: 'function',
131
+ },
132
+ {
133
+ inputs: [],
134
+ name: 'cakePool',
135
+ outputs: [
136
+ {
137
+ internalType: 'contract ICakePool',
138
+ name: '',
139
+ type: 'address',
140
+ },
141
+ ],
142
+ stateMutability: 'view',
143
+ type: 'function',
144
+ },
145
+ {
146
+ inputs: [
147
+ {
148
+ internalType: 'uint256',
149
+ name: '_amount',
150
+ type: 'uint256',
151
+ },
152
+ ],
153
+ name: 'deposit',
154
+ outputs: [],
155
+ stateMutability: 'nonpayable',
156
+ type: 'function',
157
+ },
158
+ {
159
+ inputs: [],
160
+ name: 'emergencyWithdraw',
161
+ outputs: [],
162
+ stateMutability: 'nonpayable',
163
+ type: 'function',
164
+ },
165
+ {
166
+ inputs: [],
167
+ name: 'getPricePerFullShare',
168
+ outputs: [
169
+ {
170
+ internalType: 'uint256',
171
+ name: '',
172
+ type: 'uint256',
173
+ },
174
+ ],
175
+ stateMutability: 'view',
176
+ type: 'function',
177
+ },
178
+ {
179
+ inputs: [
180
+ {
181
+ internalType: 'address',
182
+ name: '_token',
183
+ type: 'address',
184
+ },
185
+ ],
186
+ name: 'inCaseTokensGetStuck',
187
+ outputs: [],
188
+ stateMutability: 'nonpayable',
189
+ type: 'function',
190
+ },
191
+ {
192
+ inputs: [],
193
+ name: 'owner',
194
+ outputs: [
195
+ {
196
+ internalType: 'address',
197
+ name: '',
198
+ type: 'address',
199
+ },
200
+ ],
201
+ stateMutability: 'view',
202
+ type: 'function',
203
+ },
204
+ {
205
+ inputs: [],
206
+ name: 'pause',
207
+ outputs: [],
208
+ stateMutability: 'nonpayable',
209
+ type: 'function',
210
+ },
211
+ {
212
+ inputs: [],
213
+ name: 'paused',
214
+ outputs: [
215
+ {
216
+ internalType: 'bool',
217
+ name: '',
218
+ type: 'bool',
219
+ },
220
+ ],
221
+ stateMutability: 'view',
222
+ type: 'function',
223
+ },
224
+ {
225
+ inputs: [],
226
+ name: 'performanceFee',
227
+ outputs: [
228
+ {
229
+ internalType: 'uint256',
230
+ name: '',
231
+ type: 'uint256',
232
+ },
233
+ ],
234
+ stateMutability: 'view',
235
+ type: 'function',
236
+ },
237
+ {
238
+ inputs: [],
239
+ name: 'renounceOwnership',
240
+ outputs: [],
241
+ stateMutability: 'nonpayable',
242
+ type: 'function',
243
+ },
244
+ {
245
+ inputs: [
246
+ {
247
+ internalType: 'address',
248
+ name: '_admin',
249
+ type: 'address',
250
+ },
251
+ ],
252
+ name: 'setAdmin',
253
+ outputs: [],
254
+ stateMutability: 'nonpayable',
255
+ type: 'function',
256
+ },
257
+ {
258
+ inputs: [
259
+ {
260
+ internalType: 'uint256',
261
+ name: '_performanceFee',
262
+ type: 'uint256',
263
+ },
264
+ ],
265
+ name: 'setPerformanceFee',
266
+ outputs: [],
267
+ stateMutability: 'nonpayable',
268
+ type: 'function',
269
+ },
270
+ {
271
+ inputs: [
272
+ {
273
+ internalType: 'address',
274
+ name: '_treasury',
275
+ type: 'address',
276
+ },
277
+ ],
278
+ name: 'setTreasury',
279
+ outputs: [],
280
+ stateMutability: 'nonpayable',
281
+ type: 'function',
282
+ },
283
+ {
284
+ inputs: [
285
+ {
286
+ internalType: 'uint256',
287
+ name: '_withdrawAmountBooster',
288
+ type: 'uint256',
289
+ },
290
+ ],
291
+ name: 'setWithdrawAmountBooster',
292
+ outputs: [],
293
+ stateMutability: 'nonpayable',
294
+ type: 'function',
295
+ },
296
+ {
297
+ inputs: [
298
+ {
299
+ internalType: 'uint256',
300
+ name: '_withdrawFee',
301
+ type: 'uint256',
302
+ },
303
+ ],
304
+ name: 'setWithdrawFee',
305
+ outputs: [],
306
+ stateMutability: 'nonpayable',
307
+ type: 'function',
308
+ },
309
+ {
310
+ inputs: [
311
+ {
312
+ internalType: 'uint256',
313
+ name: '_withdrawFeePeriod',
314
+ type: 'uint256',
315
+ },
316
+ ],
317
+ name: 'setWithdrawFeePeriod',
318
+ outputs: [],
319
+ stateMutability: 'nonpayable',
320
+ type: 'function',
321
+ },
322
+ {
323
+ inputs: [],
324
+ name: 'staking',
325
+ outputs: [
326
+ {
327
+ internalType: 'bool',
328
+ name: '',
329
+ type: 'bool',
330
+ },
331
+ ],
332
+ stateMutability: 'view',
333
+ type: 'function',
334
+ },
335
+ {
336
+ inputs: [],
337
+ name: 'token',
338
+ outputs: [
339
+ {
340
+ internalType: 'contract IERC20',
341
+ name: '',
342
+ type: 'address',
343
+ },
344
+ ],
345
+ stateMutability: 'view',
346
+ type: 'function',
347
+ },
348
+ {
349
+ inputs: [],
350
+ name: 'totalShares',
351
+ outputs: [
352
+ {
353
+ internalType: 'uint256',
354
+ name: '',
355
+ type: 'uint256',
356
+ },
357
+ ],
358
+ stateMutability: 'view',
359
+ type: 'function',
360
+ },
361
+ {
362
+ inputs: [
363
+ {
364
+ internalType: 'address',
365
+ name: 'newOwner',
366
+ type: 'address',
367
+ },
368
+ ],
369
+ name: 'transferOwnership',
370
+ outputs: [],
371
+ stateMutability: 'nonpayable',
372
+ type: 'function',
373
+ },
374
+ {
375
+ inputs: [],
376
+ name: 'treasury',
377
+ outputs: [
378
+ {
379
+ internalType: 'address',
380
+ name: '',
381
+ type: 'address',
382
+ },
383
+ ],
384
+ stateMutability: 'view',
385
+ type: 'function',
386
+ },
387
+ {
388
+ inputs: [],
389
+ name: 'unpause',
390
+ outputs: [],
391
+ stateMutability: 'nonpayable',
392
+ type: 'function',
393
+ },
394
+ {
395
+ inputs: [
396
+ {
397
+ internalType: 'address',
398
+ name: '',
399
+ type: 'address',
400
+ },
401
+ ],
402
+ name: 'userInfo',
403
+ outputs: [
404
+ {
405
+ internalType: 'uint256',
406
+ name: 'shares',
407
+ type: 'uint256',
408
+ },
409
+ {
410
+ internalType: 'uint256',
411
+ name: 'lastDepositedTime',
412
+ type: 'uint256',
413
+ },
414
+ {
415
+ internalType: 'uint256',
416
+ name: 'cakeAtLastUserAction',
417
+ type: 'uint256',
418
+ },
419
+ {
420
+ internalType: 'uint256',
421
+ name: 'lastUserActionTime',
422
+ type: 'uint256',
423
+ },
424
+ ],
425
+ stateMutability: 'view',
426
+ type: 'function',
427
+ },
428
+ {
429
+ inputs: [
430
+ {
431
+ internalType: 'uint256',
432
+ name: '_shares',
433
+ type: 'uint256',
434
+ },
435
+ ],
436
+ name: 'withdraw',
437
+ outputs: [],
438
+ stateMutability: 'nonpayable',
439
+ type: 'function',
440
+ },
441
+ {
442
+ inputs: [],
443
+ name: 'withdrawAll',
444
+ outputs: [],
445
+ stateMutability: 'nonpayable',
446
+ type: 'function',
447
+ },
448
+ {
449
+ inputs: [],
450
+ name: 'withdrawAmountBooster',
451
+ outputs: [
452
+ {
453
+ internalType: 'uint256',
454
+ name: '',
455
+ type: 'uint256',
456
+ },
457
+ ],
458
+ stateMutability: 'view',
459
+ type: 'function',
460
+ },
461
+ {
462
+ inputs: [],
463
+ name: 'withdrawFee',
464
+ outputs: [
465
+ {
466
+ internalType: 'uint256',
467
+ name: '',
468
+ type: 'uint256',
469
+ },
470
+ ],
471
+ stateMutability: 'view',
472
+ type: 'function',
473
+ },
474
+ {
475
+ inputs: [],
476
+ name: 'withdrawFeePeriod',
477
+ outputs: [
478
+ {
479
+ internalType: 'uint256',
480
+ name: '',
481
+ type: 'uint256',
482
+ },
483
+ ],
484
+ stateMutability: 'view',
485
+ type: 'function',
486
+ },
487
+ ] as const