@pancakeswap/pools 4.0.5 → 4.0.7

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @pancakeswap/pools@4.0.5 build /home/runner/work/pancake-frontend/pancake-frontend/packages/pools
2
+ > @pancakeswap/pools@4.0.7 build /home/runner/work/pancake-frontend/pancake-frontend/packages/pools
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: {"index":"./src/index.ts"}
@@ -10,9 +10,9 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- CJS dist/index.js 175.01 KB
14
- CJS dist/index.js.map 296.92 KB
15
- CJS ⚡️ Build success in 1568ms
16
- ESM dist/index.mjs 167.31 KB
17
- ESM dist/index.mjs.map 296.92 KB
18
- ESM ⚡️ Build success in 1570ms
13
+ ESM dist/index.mjs 170.18 KB
14
+ ESM dist/index.mjs.map 302.61 KB
15
+ ESM ⚡️ Build success in 1799ms
16
+ CJS dist/index.js 178.00 KB
17
+ CJS dist/index.js.map 302.61 KB
18
+ CJS ⚡️ Build success in 1801ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @pancakeswap/pools
2
2
 
3
+ ## 4.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [868f4d11f]
8
+ - @pancakeswap/sdk@5.4.0
9
+ - @pancakeswap/tokens@0.4.0
10
+ - @pancakeswap/token-lists@0.0.8
11
+
12
+ ## 4.0.6
13
+
14
+ ### Patch Changes
15
+
16
+ - 4b3b18079: Add ALP pool at Arbitrum
17
+
3
18
  ## 4.0.5
4
19
 
5
20
  ### Patch Changes
@@ -8,15 +8,21 @@ export declare const ICAKE: {
8
8
  readonly 56: "0x3C458828D1622F5f4d526eb0d24Da8C4Eb8F07b1";
9
9
  readonly 97: "0x";
10
10
  readonly 1: "0x";
11
+ readonly 42161: "0x";
12
+ readonly 421613: "0x";
11
13
  };
12
14
  export declare const CAKE_VAULT: {
13
15
  readonly 56: "0x45c54210128a065de780C4B0Df3d16664f7f859e";
14
16
  readonly 97: "0x1088Fb24053F03802F673b84d16AE1A7023E400b";
15
17
  readonly 1: "0x";
18
+ readonly 42161: "0x";
19
+ readonly 421613: "0x";
16
20
  };
17
21
  export declare const CAKE_FLEXIBLE_SIDE_VAULT: {
18
22
  readonly 56: "0x615e896A8C2CA8470A2e9dc2E9552998f8658Ea0";
19
23
  readonly 97: "0x";
20
24
  readonly 1: "0x";
25
+ readonly 42161: "0x";
26
+ readonly 421613: "0x";
21
27
  };
22
28
  //# sourceMappingURL=contracts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/constants/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAE9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,OAAO,GAAG,gBAAgB,IAAI;KACnE,OAAO,IAAI,CAAC,GAAG,OAAO;CACxB,CAAA;AAED,eAAO,MAAM,KAAK;;;;CAIsC,CAAA;AAExD,eAAO,MAAM,UAAU;;;;CAIiC,CAAA;AAExD,eAAO,MAAM,wBAAwB;;;;CAImB,CAAA"}
1
+ {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/constants/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAE9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,OAAO,GAAG,gBAAgB,IAAI;KACnE,OAAO,IAAI,CAAC,GAAG,OAAO;CACxB,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;CAMsC,CAAA;AAExD,eAAO,MAAM,UAAU;;;;;;CAMiC,CAAA;AAExD,eAAO,MAAM,wBAAwB;;;;;;CAMmB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { SerializedPool } from '../../types';
2
+ export declare const livePools: SerializedPool[];
3
+ export declare const finishedPools: SerializedPool[];
4
+ export declare const pools: SerializedPool[];
5
+ //# sourceMappingURL=42161.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"42161.d.ts","sourceRoot":"","sources":["../../../src/constants/pools/42161.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"}
@@ -0,0 +1,5 @@
1
+ import { SerializedPool } from '../../types';
2
+ export declare const livePools: SerializedPool[];
3
+ export declare const finishedPools: SerializedPool[];
4
+ export declare const pools: SerializedPool[];
5
+ //# sourceMappingURL=421613.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"421613.d.ts","sourceRoot":"","sources":["../../../src/constants/pools/421613.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAA;AAE1D,eAAO,MAAM,SAAS,EAAE,cAAc,EAiCnC,CAAA;AAGH,eAAO,MAAM,aAAa,EAAE,cAAc,EAyBvC,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,EA4InC,CAAA;AAmuFH,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,EAqJnC,CAAA;AAmuFH,eAAO,MAAM,KAAK,EAAE,cAAc,EAAqC,CAAA"}
@@ -3,8 +3,8 @@ import { SerializedPool } from '../../types';
3
3
  export type PoolsConfigByChain<TChainId extends ChainId> = {
4
4
  [chainId in TChainId]: SerializedPool[];
5
5
  };
6
- export declare const POOLS_CONFIG_BY_CHAIN: PoolsConfigByChain<ChainId.ETHEREUM | ChainId.BSC | ChainId.BSC_TESTNET>;
7
- export declare const LIVE_POOLS_CONFIG_BY_CHAIN: PoolsConfigByChain<ChainId.ETHEREUM | ChainId.BSC | ChainId.BSC_TESTNET>;
6
+ export declare const POOLS_CONFIG_BY_CHAIN: PoolsConfigByChain<ChainId.ETHEREUM | ChainId.BSC | ChainId.BSC_TESTNET | ChainId.ARBITRUM_ONE | ChainId.ARBITRUM_GOERLI>;
7
+ export declare const LIVE_POOLS_CONFIG_BY_CHAIN: PoolsConfigByChain<ChainId.ETHEREUM | ChainId.BSC | ChainId.BSC_TESTNET | ChainId.ARBITRUM_ONE | ChainId.ARBITRUM_GOERLI>;
8
8
  export declare const getPoolsConfig: (chainId: ChainId) => SerializedPool[] | undefined;
9
9
  export declare const getLivePoolsConfig: (chainId: ChainId) => SerializedPool[] | undefined;
10
10
  export declare const MAX_LOCK_DURATION = 31536000;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/pools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAK1C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAI5C,MAAM,MAAM,kBAAkB,CAAC,QAAQ,SAAS,OAAO,IAAI;KACxD,OAAO,IAAI,QAAQ,GAAG,cAAc,EAAE;CACxC,CAAA;AAED,eAAO,MAAM,qBAAqB,0EAIO,CAAA;AAEzC,eAAO,MAAM,0BAA0B,0EAIE,CAAA;AAEzC,eAAO,MAAM,cAAc,YAAa,OAAO,iCAK9C,CAAA;AAED,eAAO,MAAM,kBAAkB,YAAa,OAAO,iCAKlD,CAAA;AAED,eAAO,MAAM,iBAAiB,WAAW,CAAA;AACzC,eAAO,MAAM,oBAAoB,SAAS,CAAA;AAC1C,eAAO,MAAM,gBAAgB,SAAS,CAAA;AACtC,eAAO,MAAM,YAAY,kBAAkB,CAAA;AAC3C,eAAO,MAAM,eAAe,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/pools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAO1C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAI5C,MAAM,MAAM,kBAAkB,CAAC,QAAQ,SAAS,OAAO,IAAI;KACxD,OAAO,IAAI,QAAQ,GAAG,cAAc,EAAE;CACxC,CAAA;AAED,eAAO,MAAM,qBAAqB,2HAMO,CAAA;AAEzC,eAAO,MAAM,0BAA0B,2HAME,CAAA;AAEzC,eAAO,MAAM,cAAc,YAAa,OAAO,iCAK9C,CAAA;AAED,eAAO,MAAM,kBAAkB,YAAa,OAAO,iCAKlD,CAAA;AAED,eAAO,MAAM,iBAAiB,WAAW,CAAA;AACzC,eAAO,MAAM,oBAAoB,SAAS,CAAA;AAC1C,eAAO,MAAM,gBAAgB,SAAS,CAAA;AACtC,eAAO,MAAM,YAAY,kBAAkB,CAAA;AAC3C,eAAO,MAAM,eAAe,YAAY,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import { ChainId } from '@pancakeswap/sdk';
2
- export declare const SUPPORTED_CHAIN_IDS: readonly [ChainId.BSC, ChainId.BSC_TESTNET, ChainId.ETHEREUM];
2
+ export declare const SUPPORTED_CHAIN_IDS: readonly [ChainId.BSC, ChainId.BSC_TESTNET, ChainId.ETHEREUM, ChainId.ARBITRUM_ONE, ChainId.ARBITRUM_GOERLI];
3
3
  export type SupportedChainId = (typeof SUPPORTED_CHAIN_IDS)[number];
4
4
  //# 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,kBAAkB,CAAA;AAE1C,eAAO,MAAM,mBAAmB,+DAAgE,CAAA;AAEhG,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,kBAAkB,CAAA;AAE1C,eAAO,MAAM,mBAAmB,8GAMtB,CAAA;AAEV,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA"}
package/dist/index.js CHANGED
@@ -117,6 +117,15 @@ var livePools2 = [
117
117
  tokenPerBlock: "10",
118
118
  isFinished: false
119
119
  },
120
+ {
121
+ sousId: 360,
122
+ stakingToken: tokens.bscTokens.cake,
123
+ earningToken: tokens.bscTokens.axl,
124
+ contractAddress: "0x32f0414a4e970a3edd9e7db367A43348F25D74cD",
125
+ poolCategory: "Core" /* CORE */,
126
+ tokenPerBlock: "0.05358",
127
+ version: 3
128
+ },
120
129
  {
121
130
  sousId: 359,
122
131
  stakingToken: tokens.bscTokens.cake,
@@ -3097,7 +3106,92 @@ var livePools3 = [
3097
3106
  }));
3098
3107
  var finishedPools3 = [];
3099
3108
  var pools3 = [...livePools3, ...finishedPools3];
3100
- var SUPPORTED_CHAIN_IDS = [sdk.ChainId.BSC, sdk.ChainId.BSC_TESTNET, sdk.ChainId.ETHEREUM];
3109
+ var livePools4 = [
3110
+ {
3111
+ sousId: 1,
3112
+ stakingToken: tokens.arbitrumTokens.alp,
3113
+ earningToken: tokens.arbitrumTokens.cake,
3114
+ contractAddress: "0x3dBdE2682330105902fb482d9849C270aa8E0881",
3115
+ poolCategory: "Core" /* CORE */,
3116
+ tokenPerSecond: "0.01135",
3117
+ version: 3
3118
+ }
3119
+ ].map((p) => ({
3120
+ ...p,
3121
+ contractAddress: viem.getAddress(p.contractAddress),
3122
+ stakingToken: p.stakingToken.serialize,
3123
+ earningToken: p.earningToken.serialize
3124
+ }));
3125
+ var finishedPools4 = [];
3126
+ var pools4 = [...livePools4, ...finishedPools4];
3127
+ var livePools5 = [
3128
+ {
3129
+ sousId: 5,
3130
+ stakingToken: tokens.arbitrumGoerliTokens.cake,
3131
+ earningToken: tokens.arbitrumGoerliTokens.mockA,
3132
+ contractAddress: "0x291f459243621E7d7c83a67644D87022F1FC39F5",
3133
+ poolCategory: "Core" /* CORE */,
3134
+ tokenPerSecond: "0.01",
3135
+ version: 3
3136
+ },
3137
+ {
3138
+ sousId: 4,
3139
+ stakingToken: tokens.arbitrumGoerliTokens.cake,
3140
+ earningToken: tokens.arbitrumGoerliTokens.mockA,
3141
+ contractAddress: "0xbA17c9f21bDea078c54F263a8cc63227F28EBfF8",
3142
+ poolCategory: "Core" /* CORE */,
3143
+ tokenPerSecond: "0.01",
3144
+ version: 3
3145
+ },
3146
+ {
3147
+ sousId: 3,
3148
+ stakingToken: tokens.arbitrumGoerliTokens.cake,
3149
+ earningToken: tokens.arbitrumGoerliTokens.mockA,
3150
+ contractAddress: "0xdDa7E82fF3c7b308c7f91a7080e474e41173F7f1",
3151
+ poolCategory: "Core" /* CORE */,
3152
+ tokenPerSecond: "0.01",
3153
+ version: 3
3154
+ }
3155
+ ].map((p) => ({
3156
+ ...p,
3157
+ contractAddress: viem.getAddress(p.contractAddress),
3158
+ stakingToken: p.stakingToken.serialize,
3159
+ earningToken: p.earningToken.serialize
3160
+ }));
3161
+ var finishedPools5 = [
3162
+ {
3163
+ sousId: 2,
3164
+ stakingToken: tokens.arbitrumGoerliTokens.cake,
3165
+ earningToken: tokens.arbitrumGoerliTokens.mockA,
3166
+ contractAddress: "0x4aB4ec9EC094E6042E822A73Cd3979A946280E56",
3167
+ poolCategory: "Core" /* CORE */,
3168
+ tokenPerSecond: "0.01",
3169
+ version: 3
3170
+ },
3171
+ {
3172
+ sousId: 1,
3173
+ stakingToken: tokens.arbitrumGoerliTokens.cake,
3174
+ earningToken: tokens.arbitrumGoerliTokens.mockA,
3175
+ contractAddress: "0x5b37404299Ef7DCABA32B00A8f36f0F43eC28E92",
3176
+ poolCategory: "Core" /* CORE */,
3177
+ tokenPerSecond: "0.01",
3178
+ version: 3
3179
+ }
3180
+ ].map((p) => ({
3181
+ ...p,
3182
+ isFinished: true,
3183
+ contractAddress: viem.getAddress(p.contractAddress),
3184
+ stakingToken: p.stakingToken.serialize,
3185
+ earningToken: p.earningToken.serialize
3186
+ }));
3187
+ var pools5 = [...livePools5, ...finishedPools5];
3188
+ var SUPPORTED_CHAIN_IDS = [
3189
+ sdk.ChainId.BSC,
3190
+ sdk.ChainId.BSC_TESTNET,
3191
+ sdk.ChainId.ETHEREUM,
3192
+ sdk.ChainId.ARBITRUM_ONE,
3193
+ sdk.ChainId.ARBITRUM_GOERLI
3194
+ ];
3101
3195
 
3102
3196
  // src/utils/isPoolsSupported.ts
3103
3197
  function isPoolsSupported(chainId) {
@@ -3108,12 +3202,16 @@ function isPoolsSupported(chainId) {
3108
3202
  var POOLS_CONFIG_BY_CHAIN = {
3109
3203
  [sdk.ChainId.ETHEREUM]: pools,
3110
3204
  [sdk.ChainId.BSC]: pools2,
3111
- [sdk.ChainId.BSC_TESTNET]: pools3
3205
+ [sdk.ChainId.BSC_TESTNET]: pools3,
3206
+ [sdk.ChainId.ARBITRUM_ONE]: pools4,
3207
+ [sdk.ChainId.ARBITRUM_GOERLI]: pools5
3112
3208
  };
3113
3209
  var LIVE_POOLS_CONFIG_BY_CHAIN = {
3114
3210
  [sdk.ChainId.ETHEREUM]: livePools,
3115
3211
  [sdk.ChainId.BSC]: livePools2,
3116
- [sdk.ChainId.BSC_TESTNET]: livePools3
3212
+ [sdk.ChainId.BSC_TESTNET]: livePools3,
3213
+ [sdk.ChainId.ARBITRUM_ONE]: livePools4,
3214
+ [sdk.ChainId.ARBITRUM_GOERLI]: livePools5
3117
3215
  };
3118
3216
  var getPoolsConfig = (chainId) => {
3119
3217
  if (!isPoolsSupported(chainId)) {
@@ -3135,17 +3233,23 @@ var DURATION_FACTOR = 31536000n;
3135
3233
  var ICAKE = {
3136
3234
  [sdk.ChainId.BSC]: "0x3C458828D1622F5f4d526eb0d24Da8C4Eb8F07b1",
3137
3235
  [sdk.ChainId.BSC_TESTNET]: "0x",
3138
- [sdk.ChainId.ETHEREUM]: "0x"
3236
+ [sdk.ChainId.ETHEREUM]: "0x",
3237
+ [sdk.ChainId.ARBITRUM_ONE]: "0x",
3238
+ [sdk.ChainId.ARBITRUM_GOERLI]: "0x"
3139
3239
  };
3140
3240
  var CAKE_VAULT = {
3141
3241
  [sdk.ChainId.BSC]: "0x45c54210128a065de780C4B0Df3d16664f7f859e",
3142
3242
  [sdk.ChainId.BSC_TESTNET]: "0x1088Fb24053F03802F673b84d16AE1A7023E400b",
3143
- [sdk.ChainId.ETHEREUM]: "0x"
3243
+ [sdk.ChainId.ETHEREUM]: "0x",
3244
+ [sdk.ChainId.ARBITRUM_ONE]: "0x",
3245
+ [sdk.ChainId.ARBITRUM_GOERLI]: "0x"
3144
3246
  };
3145
3247
  var CAKE_FLEXIBLE_SIDE_VAULT = {
3146
3248
  [sdk.ChainId.BSC]: "0x615e896A8C2CA8470A2e9dc2E9552998f8658Ea0",
3147
3249
  [sdk.ChainId.BSC_TESTNET]: "0x",
3148
- [sdk.ChainId.ETHEREUM]: "0x"
3250
+ [sdk.ChainId.ETHEREUM]: "0x",
3251
+ [sdk.ChainId.ARBITRUM_ONE]: "0x",
3252
+ [sdk.ChainId.ARBITRUM_GOERLI]: "0x"
3149
3253
  };
3150
3254
 
3151
3255
  // src/constants/index.ts
@@ -4544,8 +4648,8 @@ function getPoolContractBySousId({ chainId, sousId, signer, publicClient }) {
4544
4648
  if (!chainId) {
4545
4649
  return null;
4546
4650
  }
4547
- const pools4 = getPoolsConfig(chainId);
4548
- const pool = pools4?.find((p) => p.sousId === Number(sousId));
4651
+ const pools6 = getPoolsConfig(chainId);
4652
+ const pool = pools6?.find((p) => p.sousId === Number(sousId));
4549
4653
  if (!pool) {
4550
4654
  return null;
4551
4655
  }
@@ -4567,11 +4671,11 @@ var getLivePoolsWithEnd = async (chainId) => {
4567
4671
  }
4568
4672
  return poolsConfig.filter((p) => p.sousId !== 0 && !p.isFinished);
4569
4673
  };
4570
- async function fetchUpgradedPoolsTimeLimits(pools4, chainId, provider) {
4571
- if (!pools4.length) {
4674
+ async function fetchUpgradedPoolsTimeLimits(pools6, chainId, provider) {
4675
+ if (!pools6.length) {
4572
4676
  return [];
4573
4677
  }
4574
- const calls = pools4.flatMap(({ contractAddress }) => {
4678
+ const calls = pools6.flatMap(({ contractAddress }) => {
4575
4679
  return [
4576
4680
  {
4577
4681
  abi: smartChefABI,
@@ -4598,7 +4702,7 @@ async function fetchUpgradedPoolsTimeLimits(pools4, chainId, provider) {
4598
4702
  resultArray[chunkIndex].push(item);
4599
4703
  return resultArray;
4600
4704
  }, []);
4601
- return pools4.map((cakePoolConfig, index) => {
4705
+ return pools6.map((cakePoolConfig, index) => {
4602
4706
  const [startTimestamp, endTimestamp] = startEndResult[index];
4603
4707
  return {
4604
4708
  sousId: cakePoolConfig.sousId,
@@ -4607,11 +4711,11 @@ async function fetchUpgradedPoolsTimeLimits(pools4, chainId, provider) {
4607
4711
  };
4608
4712
  });
4609
4713
  }
4610
- var fetchLegacyPoolsBlockLimits = async (pools4, chainId, provider) => {
4611
- if (!pools4.length) {
4714
+ var fetchLegacyPoolsBlockLimits = async (pools6, chainId, provider) => {
4715
+ if (!pools6.length) {
4612
4716
  return [];
4613
4717
  }
4614
- const startEndBlockCalls = pools4.flatMap(({ contractAddress }) => {
4718
+ const startEndBlockCalls = pools6.flatMap(({ contractAddress }) => {
4615
4719
  return [
4616
4720
  {
4617
4721
  abi: sousChefABI,
@@ -4644,7 +4748,7 @@ var fetchLegacyPoolsBlockLimits = async (pools4, chainId, provider) => {
4644
4748
  const getTimestampFromBlock = (targetBlock) => {
4645
4749
  return Number(block.timestamp) + (targetBlock - Number(block.number)) * BSC_BLOCK_TIME;
4646
4750
  };
4647
- return pools4.map((cakePoolConfig, index) => {
4751
+ return pools6.map((cakePoolConfig, index) => {
4648
4752
  const [startBlock, endBlock] = startEndBlockResult[index];
4649
4753
  return {
4650
4754
  sousId: cakePoolConfig.sousId,