@pancakeswap/pools 4.0.21 → 4.0.22

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 (36) hide show
  1. package/dist/constants/boostedPools/arb.d.ts +3 -0
  2. package/dist/constants/boostedPools/arb.d.ts.map +1 -0
  3. package/dist/constants/boostedPools/index.d.ts +9 -0
  4. package/dist/constants/boostedPools/index.d.ts.map +1 -0
  5. package/dist/constants/contracts.d.ts +1 -1
  6. package/dist/constants/index.d.ts +1 -0
  7. package/dist/constants/index.d.ts.map +1 -1
  8. package/dist/constants/pools/324.d.ts.map +1 -1
  9. package/dist/constants/pools/56.d.ts.map +1 -1
  10. package/dist/constants/supportedChains.d.ts +2 -0
  11. package/dist/constants/supportedChains.d.ts.map +1 -1
  12. package/dist/index.d.ts +0 -1
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +136 -127
  15. package/dist/index.js.map +1 -1
  16. package/dist/index.mjs +130 -124
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/queries/index.d.ts +0 -1
  19. package/dist/queries/index.d.ts.map +1 -1
  20. package/dist/utils/boosted/apr/fetchAlpBoostedPoolApr.d.ts +3 -0
  21. package/dist/utils/boosted/apr/fetchAlpBoostedPoolApr.d.ts.map +1 -0
  22. package/dist/utils/boosted/apr/getBoostedPoolApr.d.ts +9 -0
  23. package/dist/utils/boosted/apr/getBoostedPoolApr.d.ts.map +1 -0
  24. package/dist/utils/boosted/checkIsBoostedPool.d.ts +3 -0
  25. package/dist/utils/boosted/checkIsBoostedPool.d.ts.map +1 -0
  26. package/dist/utils/boosted/types.d.ts +10 -0
  27. package/dist/utils/boosted/types.d.ts.map +1 -0
  28. package/dist/utils/index.d.ts +2 -0
  29. package/dist/utils/index.d.ts.map +1 -1
  30. package/dist/utils/isPoolsSupported.d.ts +3 -1
  31. package/dist/utils/isPoolsSupported.d.ts.map +1 -1
  32. package/package.json +6 -6
  33. package/dist/abis/ICake.d.ts +0 -92
  34. package/dist/abis/ICake.d.ts.map +0 -1
  35. package/dist/queries/fetchUserIfo.d.ts +0 -16
  36. package/dist/queries/fetchUserIfo.d.ts.map +0 -1
@@ -0,0 +1,3 @@
1
+ import { BoosterConfig } from '../../utils/boosted/types';
2
+ export declare const arbBoostedPools: BoosterConfig[];
3
+ //# sourceMappingURL=arb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arb.d.ts","sourceRoot":"","sources":["../../../src/constants/boostedPools/arb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAM,2BAA2B,CAAA;AAEtE,eAAO,MAAM,eAAe,EAAE,aAAa,EAO1C,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { ChainId } from '@pancakeswap/chains';
2
+ import { BoosterConfig } from '../../utils/boosted/types';
3
+ export type BoostedPoolsConfigByChain<TChainId extends ChainId> = {
4
+ [chainId in TChainId]?: BoosterConfig[];
5
+ };
6
+ export declare const BOOSTED_POOLS_CONFIG_BY_CHAIN: BoostedPoolsConfigByChain<ChainId>;
7
+ export declare const getBoostedPoolsConfig: (chainId: ChainId) => BoosterConfig[] | undefined;
8
+ export declare const getBoostedPoolConfig: (chainId: ChainId, contractAddress: string) => BoosterConfig | undefined;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/boostedPools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,MAAM,MAAM,yBAAyB,CAAC,QAAQ,SAAS,OAAO,IAAI;KAC/D,OAAO,IAAI,QAAQ,CAAC,CAAC,EAAE,aAAa,EAAE;CACxC,CAAA;AAED,eAAO,MAAM,6BAA6B,oCAEH,CAAA;AAEvC,eAAO,MAAM,qBAAqB,YAAa,OAAO,gCAErD,CAAA;AAED,eAAO,MAAM,oBAAoB,YAAa,OAAO,mBAAmB,MAAM,KAAG,aAAa,GAAG,SAGhG,CAAA"}
@@ -6,7 +6,7 @@ export type ContractAddresses<T extends ChainId = SupportedChainId> = {
6
6
  };
7
7
  export declare const ICAKE: {
8
8
  readonly 56: "0x3C458828D1622F5f4d526eb0d24Da8C4Eb8F07b1";
9
- readonly 97: "0x";
9
+ readonly 97: "0x5FB0b7a782c2f192493d86922dD3873b6392C8e8";
10
10
  readonly 1: "0x";
11
11
  readonly 42161: "0x";
12
12
  readonly 421613: "0x";
@@ -1,4 +1,5 @@
1
1
  export * from './pools';
2
+ export * from './boostedPools';
2
3
  export * from './contracts';
3
4
  export * from './supportedChains';
4
5
  export declare const BSC_BLOCK_TIME = 3;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AAEjC,eAAO,MAAM,cAAc,IAAI,CAAA;AAE/B,eAAO,MAAM,cAAc,QAAkC,CAAA;AAC7D,eAAO,MAAM,eAAe,QAAuB,CAAA;AAEnD,eAAO,MAAM,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AAEjC,eAAO,MAAM,cAAc,IAAI,CAAA;AAE/B,eAAO,MAAM,cAAc,QAAkC,CAAA;AAC7D,eAAO,MAAM,eAAe,QAAuB,CAAA;AAEnD,eAAO,MAAM,eAAe,WAAW,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"324.d.ts","sourceRoot":"","sources":["../../../src/constants/pools/324.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAA;AAE1D,eAAO,MAAM,SAAS,EAAE,cAAc,EAenC,CAAA;AAGH,eAAO,MAAM,aAAa,EAAE,cAAc,EAAO,CAAA;AAEjD,eAAO,MAAM,KAAK,EAAE,cAAc,EAAqC,CAAA"}
1
+ {"version":3,"file":"324.d.ts","sourceRoot":"","sources":["../../../src/constants/pools/324.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAA;AAE1D,eAAO,MAAM,SAAS,EAAE,cAAc,EAAO,CAAA;AAS7C,eAAO,MAAM,aAAa,EAAE,cAAc,EAgBvC,CAAA;AAEH,eAAO,MAAM,KAAK,EAAE,cAAc,EAAqC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"56.d.ts","sourceRoot":"","sources":["../../../src/constants/pools/56.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAA;AAE1D,eAAO,MAAM,SAAS,EAAE,cAAc,EA8EnC,CAAA;AA80FH,eAAO,MAAM,KAAK,EAAE,cAAc,EAAqC,CAAA"}
1
+ {"version":3,"file":"56.d.ts","sourceRoot":"","sources":["../../../src/constants/pools/56.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAA;AAE1D,eAAO,MAAM,SAAS,EAAE,cAAc,EAmDnC,CAAA;AAy2FH,eAAO,MAAM,KAAK,EAAE,cAAc,EAAqC,CAAA"}
@@ -1,4 +1,6 @@
1
1
  import { ChainId } from '@pancakeswap/chains';
2
2
  export declare const SUPPORTED_CHAIN_IDS: readonly [ChainId.BSC, ChainId.BSC_TESTNET, ChainId.ETHEREUM, ChainId.ARBITRUM_ONE, ChainId.ARBITRUM_GOERLI, ChainId.ZKSYNC, ChainId.ZKSYNC_TESTNET, ChainId.LINEA_TESTNET, ChainId.BASE_TESTNET, ChainId.POLYGON_ZKEVM_TESTNET];
3
3
  export type SupportedChainId = (typeof SUPPORTED_CHAIN_IDS)[number];
4
+ export declare const CAKE_VAULT_SUPPORTED_CHAINS: readonly [ChainId.BSC, ChainId.BSC_TESTNET];
5
+ export type CakeVaultSupportedChainId = (typeof CAKE_VAULT_SUPPORTED_CHAINS)[number];
4
6
  //# sourceMappingURL=supportedChains.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"supportedChains.d.ts","sourceRoot":"","sources":["../../src/constants/supportedChains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAE7C,eAAO,MAAM,mBAAmB,kOAWtB,CAAA;AAEV,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA"}
1
+ {"version":3,"file":"supportedChains.d.ts","sourceRoot":"","sources":["../../src/constants/supportedChains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAE7C,eAAO,MAAM,mBAAmB,kOAWtB,CAAA;AAEV,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEnE,eAAO,MAAM,2BAA2B,6CAA8C,CAAA;AAEtF,MAAM,MAAM,yBAAyB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAA"}
package/dist/index.d.ts CHANGED
@@ -2,7 +2,6 @@ export * from './constants';
2
2
  export * from './types';
3
3
  export * from './queries';
4
4
  export * from './utils';
5
- export * from './abis/ICake';
6
5
  export * from './abis/ICakeFlexibleSideVaultV2';
7
6
  export * from './abis/ICakeVaultV2';
8
7
  export * from './abis/ISmartChef';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AAGvB,cAAc,cAAc,CAAA;AAC5B,cAAc,iCAAiC,CAAA;AAC/C,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AAGvB,cAAc,iCAAiC,CAAA;AAC/C,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA"}
package/dist/index.js CHANGED
@@ -162,16 +162,14 @@ var livePools2 = [
162
162
  poolCategory: "Core" /* CORE */,
163
163
  tokenPerBlock: "0.1118",
164
164
  version: 3
165
- },
166
- {
167
- sousId: 360,
168
- stakingToken: tokens.bscTokens.cake,
169
- earningToken: tokens.bscTokens.axl,
170
- contractAddress: "0x32f0414a4e970a3edd9e7db367A43348F25D74cD",
171
- poolCategory: "Core" /* CORE */,
172
- tokenPerBlock: "0.05358",
173
- version: 3
174
- },
165
+ }
166
+ ].map((p) => ({
167
+ ...p,
168
+ contractAddress: viem.getAddress(p.contractAddress),
169
+ stakingToken: p.stakingToken.serialize,
170
+ earningToken: p.earningToken.serialize
171
+ }));
172
+ var finishedPools2 = [
175
173
  {
176
174
  sousId: 359,
177
175
  stakingToken: tokens.bscTokens.cake,
@@ -189,14 +187,16 @@ var livePools2 = [
189
187
  poolCategory: "Core" /* CORE */,
190
188
  tokenPerBlock: "0.02314",
191
189
  version: 3
192
- }
193
- ].map((p) => ({
194
- ...p,
195
- contractAddress: viem.getAddress(p.contractAddress),
196
- stakingToken: p.stakingToken.serialize,
197
- earningToken: p.earningToken.serialize
198
- }));
199
- var finishedPools2 = [
190
+ },
191
+ {
192
+ sousId: 360,
193
+ stakingToken: tokens.bscTokens.cake,
194
+ earningToken: tokens.bscTokens.axl,
195
+ contractAddress: "0x32f0414a4e970a3edd9e7db367A43348F25D74cD",
196
+ poolCategory: "Core" /* CORE */,
197
+ tokenPerBlock: "0.05358",
198
+ version: 3
199
+ },
200
200
  {
201
201
  sousId: 357,
202
202
  stakingToken: tokens.bscTokens.cake,
@@ -3087,15 +3087,15 @@ var finishedPools2 = [
3087
3087
  }));
3088
3088
  var pools2 = [...livePools2, ...finishedPools2];
3089
3089
  var livePools3 = [
3090
- // {
3091
- // sousId: 0,
3092
- // stakingToken: bscTestnetTokens.cake2,
3093
- // earningToken: bscTestnetTokens.cake2,
3094
- // contractAddress: '0x4c650FB471fe4e0f476fD3437C3411B1122c4e3B',
3095
- // poolCategory: PoolCategory.CORE,
3096
- // tokenPerBlock: '0.01',
3097
- // isFinished: false,
3098
- // },
3090
+ {
3091
+ sousId: 0,
3092
+ stakingToken: tokens.bscTestnetTokens.cake2,
3093
+ earningToken: tokens.bscTestnetTokens.cake2,
3094
+ contractAddress: "0xf6B427A2Df6E24600e3e3c62634B7c478826619D",
3095
+ poolCategory: "Core" /* CORE */,
3096
+ tokenPerBlock: "0.01",
3097
+ isFinished: false
3098
+ },
3099
3099
  {
3100
3100
  sousId: 1,
3101
3101
  stakingToken: tokens.bscTestnetTokens.cake2,
@@ -3247,7 +3247,8 @@ var finishedPools5 = [
3247
3247
  earningToken: p.earningToken.serialize
3248
3248
  }));
3249
3249
  var pools5 = [...livePools5, ...finishedPools5];
3250
- var livePools6 = [
3250
+ var livePools6 = [];
3251
+ var finishedPools6 = [
3251
3252
  {
3252
3253
  sousId: 1,
3253
3254
  stakingToken: tokens.zksyncTokens.cake,
@@ -3259,11 +3260,11 @@ var livePools6 = [
3259
3260
  }
3260
3261
  ].map((p) => ({
3261
3262
  ...p,
3263
+ isFinished: true,
3262
3264
  contractAddress: viem.getAddress(p.contractAddress),
3263
3265
  stakingToken: p.stakingToken.serialize,
3264
3266
  earningToken: p.earningToken.serialize
3265
3267
  }));
3266
- var finishedPools6 = [];
3267
3268
  var pools6 = [...livePools6, ...finishedPools6];
3268
3269
  var livePools7 = [
3269
3270
  {
@@ -3472,11 +3473,15 @@ var SUPPORTED_CHAIN_IDS = [
3472
3473
  chains.ChainId.BASE_TESTNET,
3473
3474
  chains.ChainId.POLYGON_ZKEVM_TESTNET
3474
3475
  ];
3476
+ var CAKE_VAULT_SUPPORTED_CHAINS = [chains.ChainId.BSC, chains.ChainId.BSC_TESTNET];
3475
3477
 
3476
3478
  // src/utils/isPoolsSupported.ts
3477
3479
  function isPoolsSupported(chainId) {
3478
3480
  return SUPPORTED_CHAIN_IDS.includes(chainId);
3479
3481
  }
3482
+ function isCakeVaultSupported(chainId) {
3483
+ return !!chainId && CAKE_VAULT_SUPPORTED_CHAINS.includes(chainId);
3484
+ }
3480
3485
 
3481
3486
  // src/constants/pools/index.ts
3482
3487
  var POOLS_CONFIG_BY_CHAIN = {
@@ -3526,9 +3531,30 @@ var UNLOCK_FREE_DURATION = 604800;
3526
3531
  var ONE_WEEK_DEFAULT = 604800;
3527
3532
  var BOOST_WEIGHT = 20000000000000n;
3528
3533
  var DURATION_FACTOR = 31536000n;
3534
+
3535
+ // src/constants/boostedPools/arb.ts
3536
+ var arbBoostedPools = [
3537
+ {
3538
+ boosterType: 0 /* ALP */,
3539
+ contractAddress: "0x0639c5715EC308E16f089c96C0C109302d76FA81",
3540
+ tooltipsText: "Fee APY include the transaction fees shared in the ALP pool, funding rates for positions held, and liquidation income, and will be reflected in the growth of the ALP price. Stake APY is the return for staking ALP. Both Annualized using compound interest, for reference purposes only."
3541
+ }
3542
+ ];
3543
+
3544
+ // src/constants/boostedPools/index.ts
3545
+ var BOOSTED_POOLS_CONFIG_BY_CHAIN = {
3546
+ [chains.ChainId.ARBITRUM_ONE]: arbBoostedPools
3547
+ };
3548
+ var getBoostedPoolsConfig = (chainId) => {
3549
+ return BOOSTED_POOLS_CONFIG_BY_CHAIN[chainId];
3550
+ };
3551
+ var getBoostedPoolConfig = (chainId, contractAddress) => {
3552
+ const pool = getBoostedPoolsConfig(chainId);
3553
+ return pool?.find((i) => i?.contractAddress?.toLowerCase() === contractAddress.toLowerCase());
3554
+ };
3529
3555
  var ICAKE = {
3530
3556
  [chains.ChainId.BSC]: "0x3C458828D1622F5f4d526eb0d24Da8C4Eb8F07b1",
3531
- [chains.ChainId.BSC_TESTNET]: "0x",
3557
+ [chains.ChainId.BSC_TESTNET]: "0x5FB0b7a782c2f192493d86922dD3873b6392C8e8",
3532
3558
  [chains.ChainId.ETHEREUM]: "0x",
3533
3559
  [chains.ChainId.ARBITRUM_ONE]: "0x",
3534
3560
  [chains.ChainId.ARBITRUM_GOERLI]: "0x",
@@ -4974,6 +5000,79 @@ function getPoolContractBySousId({ chainId, sousId, signer, publicClient }) {
4974
5000
  return getSmartChefChefV2Contract({ address: contractAddress, signer, publicClient });
4975
5001
  }
4976
5002
 
5003
+ // src/utils/boosted/checkIsBoostedPool.ts
5004
+ var checkIsBoostedPool = (contract, chainId) => {
5005
+ const list = getBoostedPoolsConfig(chainId);
5006
+ const isBoosted = list?.find((i) => i?.contractAddress?.toLowerCase() === contract.toLowerCase());
5007
+ return isBoosted !== void 0;
5008
+ };
5009
+ var WEEK = 7;
5010
+ var YEAR = 365;
5011
+ var CONTRACT_ADDRESS = "0xB3879E95a4B8e3eE570c232B19d520821F540E48";
5012
+ var API_URL = "https://perp.pancakeswap.finance/bapi/futures/v1/public/future/apx/fee/info?chain=ARB";
5013
+ var fetchAlpBoostedPoolApr = async (client) => {
5014
+ try {
5015
+ const [totalValue] = await client.multicall({
5016
+ contracts: [
5017
+ {
5018
+ abi: [
5019
+ {
5020
+ inputs: [],
5021
+ name: "totalValue",
5022
+ outputs: [
5023
+ {
5024
+ components: [
5025
+ { internalType: "address", name: "tokenAddress", type: "address" },
5026
+ { internalType: "int256", name: "value", type: "int256" },
5027
+ { internalType: "uint8", name: "decimals", type: "uint8" },
5028
+ { internalType: "int256", name: "valueUsd", type: "int256" },
5029
+ { internalType: "uint16", name: "targetWeight", type: "uint16" },
5030
+ { internalType: "uint16", name: "feeBasisPoints", type: "uint16" },
5031
+ { internalType: "uint16", name: "taxBasisPoints", type: "uint16" },
5032
+ { internalType: "bool", name: "dynamicFee", type: "bool" }
5033
+ ],
5034
+ internalType: "struct IVault.LpItem[]",
5035
+ name: "lpItems",
5036
+ type: "tuple[]"
5037
+ }
5038
+ ],
5039
+ stateMutability: "view",
5040
+ type: "function"
5041
+ }
5042
+ ],
5043
+ address: CONTRACT_ADDRESS,
5044
+ functionName: "totalValue"
5045
+ }
5046
+ ],
5047
+ allowFailure: false
5048
+ });
5049
+ const totalValueUsd = totalValue.map((i) => new BigNumber7__default.default(i.valueUsd.toString()).div(1e18).toNumber()).reduce((a, b) => a + b, 0);
5050
+ const response = await fetch(API_URL);
5051
+ const result = await response.json();
5052
+ const { alpFundingFee, alpTradingFee, alpLipFee } = result.data;
5053
+ const apr = new BigNumber7__default.default(alpFundingFee).plus(alpTradingFee).plus(alpLipFee);
5054
+ const totalApr = apr.div(totalValueUsd.toString()).div(WEEK);
5055
+ const apy = totalApr.plus(1).exponentiatedBy(YEAR).minus(1).times(100);
5056
+ return apy.toNumber();
5057
+ } catch (error) {
5058
+ console.info("Fetch ALP boosted fee error: ", error);
5059
+ return 0;
5060
+ }
5061
+ };
5062
+
5063
+ // src/utils/boosted/apr/getBoostedPoolApr.ts
5064
+ var getBoostedPoolApr = async ({ client, contractAddress, chainId }) => {
5065
+ const pool = chainId && getBoostedPoolConfig(chainId, contractAddress);
5066
+ if (!contractAddress || !chainId || !pool) {
5067
+ return 0;
5068
+ }
5069
+ if (pool?.boosterType === 0 /* ALP */) {
5070
+ const result = await fetchAlpBoostedPoolApr(client);
5071
+ return result;
5072
+ }
5073
+ return 0;
5074
+ };
5075
+
4977
5076
  // src/queries/fetchPools.ts
4978
5077
  var getLivePoolsWithEnd = async (chainId) => {
4979
5078
  const poolsConfig = getPoolsConfig(chainId);
@@ -5330,99 +5429,6 @@ var fetchUserPendingRewards = async ({ account, chainId, provider }) => {
5330
5429
  return fromPairs2__default.default(nonMasterPools.map((pool, index) => [pool.sousId, new BigNumber7__default.default(res[index].toString()).toJSON()]));
5331
5430
  };
5332
5431
 
5333
- // src/abis/ICake.ts
5334
- var iCakeABI = [
5335
- {
5336
- inputs: [],
5337
- name: "MIN_CEILING_DURATION",
5338
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
5339
- stateMutability: "view",
5340
- type: "function"
5341
- },
5342
- {
5343
- inputs: [],
5344
- name: "admin",
5345
- outputs: [{ internalType: "address", name: "", type: "address" }],
5346
- stateMutability: "view",
5347
- type: "function"
5348
- },
5349
- {
5350
- inputs: [],
5351
- name: "cakePool",
5352
- outputs: [{ internalType: "contract ICaKePool", name: "", type: "address" }],
5353
- stateMutability: "view",
5354
- type: "function"
5355
- },
5356
- {
5357
- inputs: [],
5358
- name: "ceiling",
5359
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
5360
- stateMutability: "view",
5361
- type: "function"
5362
- },
5363
- {
5364
- inputs: [{ internalType: "address", name: "_user", type: "address" }],
5365
- name: "getUserCredit",
5366
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
5367
- stateMutability: "view",
5368
- type: "function"
5369
- },
5370
- {
5371
- inputs: [],
5372
- name: "owner",
5373
- outputs: [{ internalType: "address", name: "", type: "address" }],
5374
- stateMutability: "view",
5375
- type: "function"
5376
- },
5377
- { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
5378
- {
5379
- inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
5380
- name: "transferOwnership",
5381
- outputs: [],
5382
- stateMutability: "nonpayable",
5383
- type: "function"
5384
- },
5385
- {
5386
- inputs: [{ internalType: "uint256", name: "_newCeiling", type: "uint256" }],
5387
- name: "updateCeiling",
5388
- outputs: [],
5389
- stateMutability: "nonpayable",
5390
- type: "function"
5391
- }
5392
- ];
5393
-
5394
- // src/queries/fetchUserIfo.ts
5395
- var getIfoCreditAddressContract = (chainId, provider, walletClient) => {
5396
- const address = getContractAddress(ICAKE, chainId);
5397
- if (!address || address === "0x") {
5398
- throw new Error(`ICAKE not supported on chain ${chainId}`);
5399
- }
5400
- return viem.getContract({ abi: iCakeABI, address, publicClient: provider({ chainId }), walletClient });
5401
- };
5402
- var fetchPublicIfoData = async (chainId, provider) => {
5403
- try {
5404
- const ifoCreditAddressContract = getIfoCreditAddressContract(chainId, provider);
5405
- const ceiling = await ifoCreditAddressContract.read.ceiling();
5406
- return {
5407
- ceiling: new BigNumber7__default.default(ceiling.toString()).toJSON()
5408
- };
5409
- } catch (error) {
5410
- return {
5411
- ceiling: BIG_ZERO.toJSON()
5412
- };
5413
- }
5414
- };
5415
- var fetchUserIfoCredit = async ({ account, chainId, provider }) => {
5416
- try {
5417
- const ifoCreditAddressContract = getIfoCreditAddressContract(chainId, provider);
5418
- const credit = await ifoCreditAddressContract.read.getUserCredit([account]);
5419
- return new BigNumber7__default.default(credit.toString()).toJSON();
5420
- } catch (error) {
5421
- console.error(error);
5422
- return BIG_ZERO.toJSON();
5423
- }
5424
- };
5425
-
5426
5432
  // src/abis/ICakeVaultV2.ts
5427
5433
  var cakeVaultV2ABI = [
5428
5434
  {
@@ -6645,10 +6651,12 @@ var fetchFlexibleSideVaultUser = async ({
6645
6651
 
6646
6652
  exports.BLOCKS_PER_DAY = BLOCKS_PER_DAY;
6647
6653
  exports.BLOCKS_PER_YEAR = BLOCKS_PER_YEAR;
6654
+ exports.BOOSTED_POOLS_CONFIG_BY_CHAIN = BOOSTED_POOLS_CONFIG_BY_CHAIN;
6648
6655
  exports.BOOST_WEIGHT = BOOST_WEIGHT;
6649
6656
  exports.BSC_BLOCK_TIME = BSC_BLOCK_TIME;
6650
6657
  exports.CAKE_FLEXIBLE_SIDE_VAULT = CAKE_FLEXIBLE_SIDE_VAULT;
6651
6658
  exports.CAKE_VAULT = CAKE_VAULT;
6659
+ exports.CAKE_VAULT_SUPPORTED_CHAINS = CAKE_VAULT_SUPPORTED_CHAINS;
6652
6660
  exports.DURATION_FACTOR = DURATION_FACTOR;
6653
6661
  exports.ICAKE = ICAKE;
6654
6662
  exports.LIVE_POOLS_CONFIG_BY_CHAIN = LIVE_POOLS_CONFIG_BY_CHAIN;
@@ -6662,6 +6670,7 @@ exports.UNLOCK_FREE_DURATION = UNLOCK_FREE_DURATION;
6662
6670
  exports.VaultKey = VaultKey;
6663
6671
  exports.cakeFlexibleSideVaultV2ABI = cakeFlexibleSideVaultV2ABI;
6664
6672
  exports.cakeVaultV2ABI = cakeVaultV2ABI;
6673
+ exports.checkIsBoostedPool = checkIsBoostedPool;
6665
6674
  exports.fetchFlexibleSideVaultUser = fetchFlexibleSideVaultUser;
6666
6675
  exports.fetchPoolsAllowance = fetchPoolsAllowance;
6667
6676
  exports.fetchPoolsProfileRequirement = fetchPoolsProfileRequirement;
@@ -6670,18 +6679,18 @@ exports.fetchPoolsStakingLimitsByBlock = fetchPoolsStakingLimitsByBlock;
6670
6679
  exports.fetchPoolsTimeLimits = fetchPoolsTimeLimits;
6671
6680
  exports.fetchPoolsTotalStaking = fetchPoolsTotalStaking;
6672
6681
  exports.fetchPublicFlexibleSideVaultData = fetchPublicFlexibleSideVaultData;
6673
- exports.fetchPublicIfoData = fetchPublicIfoData;
6674
6682
  exports.fetchPublicVaultData = fetchPublicVaultData;
6675
6683
  exports.fetchUserBalances = fetchUserBalances;
6676
- exports.fetchUserIfoCredit = fetchUserIfoCredit;
6677
6684
  exports.fetchUserPendingRewards = fetchUserPendingRewards;
6678
6685
  exports.fetchUserStakeBalances = fetchUserStakeBalances;
6679
6686
  exports.fetchVaultFees = fetchVaultFees;
6680
6687
  exports.fetchVaultUser = fetchVaultUser;
6688
+ exports.getBoostedPoolApr = getBoostedPoolApr;
6689
+ exports.getBoostedPoolConfig = getBoostedPoolConfig;
6690
+ exports.getBoostedPoolsConfig = getBoostedPoolsConfig;
6681
6691
  exports.getCakeFlexibleSideVaultAddress = getCakeFlexibleSideVaultAddress;
6682
6692
  exports.getCakeVaultAddress = getCakeVaultAddress;
6683
6693
  exports.getContractAddress = getContractAddress;
6684
- exports.getIfoCreditAddressContract = getIfoCreditAddressContract;
6685
6694
  exports.getLivePoolsConfig = getLivePoolsConfig;
6686
6695
  exports.getPoolAprByTokenPerBlock = getPoolAprByTokenPerBlock;
6687
6696
  exports.getPoolAprByTokenPerSecond = getPoolAprByTokenPerSecond;
@@ -6690,7 +6699,7 @@ exports.getPoolsConfig = getPoolsConfig;
6690
6699
  exports.getSmartChefChefV2Contract = getSmartChefChefV2Contract;
6691
6700
  exports.getSousChefBNBContract = getSousChefBNBContract;
6692
6701
  exports.getSousChefV2Contract = getSousChefV2Contract;
6693
- exports.iCakeABI = iCakeABI;
6702
+ exports.isCakeVaultSupported = isCakeVaultSupported;
6694
6703
  exports.isLegacyPool = isLegacyPool;
6695
6704
  exports.isPoolsSupported = isPoolsSupported;
6696
6705
  exports.isUpgradedPool = isUpgradedPool;