@pancakeswap/pools 4.0.8 → 4.0.9
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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +8 -0
- package/dist/constants/contracts.d.ts +6 -0
- package/dist/constants/contracts.d.ts.map +1 -1
- package/dist/constants/pools/280.d.ts +5 -0
- package/dist/constants/pools/280.d.ts.map +1 -0
- package/dist/constants/pools/324.d.ts +5 -0
- package/dist/constants/pools/324.d.ts.map +1 -0
- package/dist/constants/pools/56.d.ts.map +1 -1
- package/dist/constants/pools/index.d.ts +2 -2
- package/dist/constants/pools/index.d.ts.map +1 -1
- package/dist/constants/supportedChains.d.ts +1 -1
- package/dist/constants/supportedChains.d.ts.map +1 -1
- package/dist/index.js +118 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +119 -35
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/constants/contracts.ts +6 -0
- package/src/constants/pools/280.ts +53 -0
- package/src/constants/pools/324.ts +26 -0
- package/src/constants/pools/56.ts +27 -18
- package/src/constants/pools/index.ts +6 -0
- package/src/constants/supportedChains.ts +2 -0
- package/src/queries/fetchUserPoolsData.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pancakeswap/pools",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.9",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"typescript": "^5.1.3",
|
|
21
21
|
"vitest": "^0.27.2",
|
|
22
22
|
"@pancakeswap/tsconfig": "0.0.0",
|
|
23
|
-
"@pancakeswap/utils": "5.0.
|
|
23
|
+
"@pancakeswap/utils": "5.0.2"
|
|
24
24
|
},
|
|
25
25
|
"exports": {
|
|
26
26
|
"./package.json": "./package.json",
|
|
@@ -13,6 +13,8 @@ export const ICAKE = {
|
|
|
13
13
|
[ChainId.ETHEREUM]: '0x',
|
|
14
14
|
[ChainId.ARBITRUM_ONE]: '0x',
|
|
15
15
|
[ChainId.ARBITRUM_GOERLI]: '0x',
|
|
16
|
+
[ChainId.ZKSYNC]: '0x',
|
|
17
|
+
[ChainId.ZKSYNC_TESTNET]: '0x',
|
|
16
18
|
} as const satisfies ContractAddresses<SupportedChainId>
|
|
17
19
|
|
|
18
20
|
export const CAKE_VAULT = {
|
|
@@ -21,6 +23,8 @@ export const CAKE_VAULT = {
|
|
|
21
23
|
[ChainId.ETHEREUM]: '0x',
|
|
22
24
|
[ChainId.ARBITRUM_ONE]: '0x',
|
|
23
25
|
[ChainId.ARBITRUM_GOERLI]: '0x',
|
|
26
|
+
[ChainId.ZKSYNC]: '0x',
|
|
27
|
+
[ChainId.ZKSYNC_TESTNET]: '0x',
|
|
24
28
|
} as const satisfies ContractAddresses<SupportedChainId>
|
|
25
29
|
|
|
26
30
|
export const CAKE_FLEXIBLE_SIDE_VAULT = {
|
|
@@ -29,4 +33,6 @@ export const CAKE_FLEXIBLE_SIDE_VAULT = {
|
|
|
29
33
|
[ChainId.ETHEREUM]: '0x',
|
|
30
34
|
[ChainId.ARBITRUM_ONE]: '0x',
|
|
31
35
|
[ChainId.ARBITRUM_GOERLI]: '0x',
|
|
36
|
+
[ChainId.ZKSYNC]: '0x',
|
|
37
|
+
[ChainId.ZKSYNC_TESTNET]: '0x',
|
|
32
38
|
} as const satisfies ContractAddresses<SupportedChainId>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { zkSyncTestnetTokens } from '@pancakeswap/tokens'
|
|
2
|
+
import { getAddress } from 'viem'
|
|
3
|
+
|
|
4
|
+
import { PoolCategory, SerializedPool } from '../../types'
|
|
5
|
+
|
|
6
|
+
export const livePools: SerializedPool[] = [
|
|
7
|
+
{
|
|
8
|
+
sousId: 4,
|
|
9
|
+
stakingToken: zkSyncTestnetTokens.cake,
|
|
10
|
+
earningToken: zkSyncTestnetTokens.mock,
|
|
11
|
+
contractAddress: '0x4BDFF8A608be623077E54F6916761f631e87D884',
|
|
12
|
+
poolCategory: PoolCategory.CORE,
|
|
13
|
+
tokenPerSecond: '0.01',
|
|
14
|
+
version: 3,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
sousId: 3,
|
|
18
|
+
stakingToken: zkSyncTestnetTokens.cake,
|
|
19
|
+
earningToken: zkSyncTestnetTokens.mock,
|
|
20
|
+
contractAddress: '0x926E99bad2BC7dA5c0880f0bebD7f448Be86562B',
|
|
21
|
+
poolCategory: PoolCategory.CORE,
|
|
22
|
+
tokenPerSecond: '0.01',
|
|
23
|
+
version: 3,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
sousId: 2,
|
|
27
|
+
stakingToken: zkSyncTestnetTokens.cake,
|
|
28
|
+
earningToken: zkSyncTestnetTokens.mock,
|
|
29
|
+
contractAddress: '0x5F7Cc0C5E3FC6e26bC98d392fa3516D4F33Df8aD',
|
|
30
|
+
poolCategory: PoolCategory.CORE,
|
|
31
|
+
tokenPerSecond: '0.01',
|
|
32
|
+
version: 3,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
sousId: 1,
|
|
36
|
+
stakingToken: zkSyncTestnetTokens.cake,
|
|
37
|
+
earningToken: zkSyncTestnetTokens.mock,
|
|
38
|
+
contractAddress: '0x455d2eBbfb172CDba2D499cAf36cBbF5366F976D',
|
|
39
|
+
poolCategory: PoolCategory.CORE,
|
|
40
|
+
tokenPerSecond: '0.01',
|
|
41
|
+
version: 3,
|
|
42
|
+
},
|
|
43
|
+
].map((p) => ({
|
|
44
|
+
...p,
|
|
45
|
+
contractAddress: getAddress(p.contractAddress),
|
|
46
|
+
stakingToken: p.stakingToken.serialize,
|
|
47
|
+
earningToken: p.earningToken.serialize,
|
|
48
|
+
}))
|
|
49
|
+
|
|
50
|
+
// known finished pools
|
|
51
|
+
export const finishedPools: SerializedPool[] = []
|
|
52
|
+
|
|
53
|
+
export const pools: SerializedPool[] = [...livePools, ...finishedPools]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { zksyncTokens } from '@pancakeswap/tokens'
|
|
2
|
+
import { getAddress } from 'viem'
|
|
3
|
+
|
|
4
|
+
import { PoolCategory, SerializedPool } from '../../types'
|
|
5
|
+
|
|
6
|
+
export const livePools: SerializedPool[] = [
|
|
7
|
+
{
|
|
8
|
+
sousId: 1,
|
|
9
|
+
stakingToken: zksyncTokens.cake,
|
|
10
|
+
earningToken: zksyncTokens.tes,
|
|
11
|
+
contractAddress: '0xedB2E9eB4fc47d57c08B387775e09E5fC9e21EBE',
|
|
12
|
+
poolCategory: PoolCategory.CORE,
|
|
13
|
+
tokenPerSecond: '0.02546',
|
|
14
|
+
version: 3,
|
|
15
|
+
},
|
|
16
|
+
].map((p) => ({
|
|
17
|
+
...p,
|
|
18
|
+
contractAddress: getAddress(p.contractAddress),
|
|
19
|
+
stakingToken: p.stakingToken.serialize,
|
|
20
|
+
earningToken: p.earningToken.serialize,
|
|
21
|
+
}))
|
|
22
|
+
|
|
23
|
+
// known finished pools
|
|
24
|
+
export const finishedPools: SerializedPool[] = []
|
|
25
|
+
|
|
26
|
+
export const pools: SerializedPool[] = [...livePools, ...finishedPools]
|
|
@@ -13,6 +13,15 @@ export const livePools: SerializedPool[] = [
|
|
|
13
13
|
tokenPerBlock: '10',
|
|
14
14
|
isFinished: false,
|
|
15
15
|
},
|
|
16
|
+
{
|
|
17
|
+
sousId: 361,
|
|
18
|
+
stakingToken: bscTokens.cake,
|
|
19
|
+
earningToken: bscTokens.mbx,
|
|
20
|
+
contractAddress: '0x51ebC2F8D7Af302835A1C2Bd02111a3af573e399',
|
|
21
|
+
poolCategory: PoolCategory.CORE,
|
|
22
|
+
tokenPerBlock: '0.1118',
|
|
23
|
+
version: 3,
|
|
24
|
+
},
|
|
16
25
|
{
|
|
17
26
|
sousId: 360,
|
|
18
27
|
stakingToken: bscTokens.cake,
|
|
@@ -49,15 +58,6 @@ export const livePools: SerializedPool[] = [
|
|
|
49
58
|
tokenPerBlock: '0.5594',
|
|
50
59
|
version: 3,
|
|
51
60
|
},
|
|
52
|
-
{
|
|
53
|
-
sousId: 355,
|
|
54
|
-
stakingToken: bscTokens.cake,
|
|
55
|
-
earningToken: bscTokens.planet,
|
|
56
|
-
contractAddress: '0x69Aeec4EBA2333deC563E378a6AFD5eF23437677',
|
|
57
|
-
poolCategory: PoolCategory.CORE,
|
|
58
|
-
tokenPerBlock: '150.4',
|
|
59
|
-
version: 3,
|
|
60
|
-
},
|
|
61
61
|
{
|
|
62
62
|
sousId: 354,
|
|
63
63
|
stakingToken: bscTokens.cake,
|
|
@@ -138,15 +138,6 @@ export const livePools: SerializedPool[] = [
|
|
|
138
138
|
poolCategory: PoolCategory.CORE,
|
|
139
139
|
tokenPerBlock: '2.017',
|
|
140
140
|
},
|
|
141
|
-
{
|
|
142
|
-
sousId: 325,
|
|
143
|
-
stakingToken: bscTokens.cake,
|
|
144
|
-
earningToken: bscTokens.lvl,
|
|
145
|
-
contractAddress: '0x1394a09F868bE27B1c8D39D79F0b0D6f112bddAf',
|
|
146
|
-
poolCategory: PoolCategory.CORE,
|
|
147
|
-
tokenPerBlock: '0.009765',
|
|
148
|
-
version: 3,
|
|
149
|
-
},
|
|
150
141
|
].map((p) => ({
|
|
151
142
|
...p,
|
|
152
143
|
contractAddress: getAddress(p.contractAddress),
|
|
@@ -156,6 +147,24 @@ export const livePools: SerializedPool[] = [
|
|
|
156
147
|
|
|
157
148
|
// known finished pools
|
|
158
149
|
const finishedPools = [
|
|
150
|
+
{
|
|
151
|
+
sousId: 355,
|
|
152
|
+
stakingToken: bscTokens.cake,
|
|
153
|
+
earningToken: bscTokens.planet,
|
|
154
|
+
contractAddress: '0x69Aeec4EBA2333deC563E378a6AFD5eF23437677',
|
|
155
|
+
poolCategory: PoolCategory.CORE,
|
|
156
|
+
tokenPerBlock: '150.4',
|
|
157
|
+
version: 3,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
sousId: 325,
|
|
161
|
+
stakingToken: bscTokens.cake,
|
|
162
|
+
earningToken: bscTokens.lvl,
|
|
163
|
+
contractAddress: '0x1394a09F868bE27B1c8D39D79F0b0D6f112bddAf',
|
|
164
|
+
poolCategory: PoolCategory.CORE,
|
|
165
|
+
tokenPerBlock: '0.009765',
|
|
166
|
+
version: 3,
|
|
167
|
+
},
|
|
159
168
|
{
|
|
160
169
|
sousId: 345,
|
|
161
170
|
stakingToken: bscTokens.cake,
|
|
@@ -5,6 +5,8 @@ import { pools as bscPools, livePools as bscLivePools } from './56'
|
|
|
5
5
|
import { pools as bscTestnetPools, livePools as bscTestnetLivePools } from './97'
|
|
6
6
|
import { pools as arbPools, livePools as arbLivePools } from './42161'
|
|
7
7
|
import { pools as arbTestnetPools, livePools as arbTestnetLivePools } from './421613'
|
|
8
|
+
import { pools as zkSyncPools, livePools as zkSyncLivePools } from './324'
|
|
9
|
+
import { pools as zkSyncTestnetPools, livePools as zkSyncTestnetLivePools } from './280'
|
|
8
10
|
import { SerializedPool } from '../../types'
|
|
9
11
|
import { SupportedChainId } from '../supportedChains'
|
|
10
12
|
import { isPoolsSupported } from '../../utils/isPoolsSupported'
|
|
@@ -19,6 +21,8 @@ export const POOLS_CONFIG_BY_CHAIN = {
|
|
|
19
21
|
[ChainId.BSC_TESTNET]: bscTestnetPools,
|
|
20
22
|
[ChainId.ARBITRUM_ONE]: arbPools,
|
|
21
23
|
[ChainId.ARBITRUM_GOERLI]: arbTestnetPools,
|
|
24
|
+
[ChainId.ZKSYNC]: zkSyncPools,
|
|
25
|
+
[ChainId.ZKSYNC_TESTNET]: zkSyncTestnetPools,
|
|
22
26
|
} as PoolsConfigByChain<SupportedChainId>
|
|
23
27
|
|
|
24
28
|
export const LIVE_POOLS_CONFIG_BY_CHAIN = {
|
|
@@ -27,6 +31,8 @@ export const LIVE_POOLS_CONFIG_BY_CHAIN = {
|
|
|
27
31
|
[ChainId.BSC_TESTNET]: bscTestnetLivePools,
|
|
28
32
|
[ChainId.ARBITRUM_ONE]: arbLivePools,
|
|
29
33
|
[ChainId.ARBITRUM_GOERLI]: arbTestnetLivePools,
|
|
34
|
+
[ChainId.ZKSYNC]: zkSyncLivePools,
|
|
35
|
+
[ChainId.ZKSYNC_TESTNET]: zkSyncTestnetLivePools,
|
|
30
36
|
} as PoolsConfigByChain<SupportedChainId>
|
|
31
37
|
|
|
32
38
|
export const getPoolsConfig = (chainId: ChainId) => {
|
|
@@ -95,7 +95,7 @@ export const fetchUserBalances = async ({ account, chainId, provider }: FetchUse
|
|
|
95
95
|
)
|
|
96
96
|
|
|
97
97
|
// BNB pools
|
|
98
|
-
const bnbBalanceJson = new BigNumber((bnbBalance.result as bigint)
|
|
98
|
+
const bnbBalanceJson = new BigNumber((bnbBalance.result as bigint)?.toString()).toJSON()
|
|
99
99
|
const bnbBalances = fromPairs(bnbPools.map((pool) => [pool.sousId, bnbBalanceJson]))
|
|
100
100
|
|
|
101
101
|
return { ...poolTokenBalances, ...bnbBalances }
|