From b99844765076dc00d096f8b58804226361a91b45 Mon Sep 17 00:00:00 2001
From: Chef Yogi <99634186+Chef-Yogi@users.noreply.github.com>
Date: Mon, 9 Dec 2024 02:52:49 +0800
Subject: [PATCH] feat: support BCake feature on base
---
.../web/src/components/CrossChainVeCakeModal/constants.ts | 6 ++++++
apps/web/src/components/CrossChainVeCakeModal/index.tsx | 7 +++++++
apps/web/src/config/constants/contracts.ts | 2 ++
packages/farms/constants/v3/index.ts | 2 ++
packages/farms/src/const.ts | 8 +++++++-
packages/ifos/src/constants/lzChainMap.ts | 1 +
6 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/apps/web/src/components/CrossChainVeCakeModal/constants.ts b/apps/web/src/components/CrossChainVeCakeModal/constants.ts
index 95b9b8eec91a7..8e58feae828df 100644
--- a/apps/web/src/components/CrossChainVeCakeModal/constants.ts
+++ b/apps/web/src/components/CrossChainVeCakeModal/constants.ts
@@ -23,4 +23,10 @@ export const CROSS_CHAIN_CONFIG: Record<
layerZeroFee: 2373941681319489n,
layerZeroFeeBufferTimes: 10,
},
+ [ChainId.BASE]: {
+ eid: 30184,
+ dstGas: 850000n,
+ name: 'Base',
+ layerZeroFee: 2373941681319489n,
+ },
}
diff --git a/apps/web/src/components/CrossChainVeCakeModal/index.tsx b/apps/web/src/components/CrossChainVeCakeModal/index.tsx
index 07d96bdc2ceef..ae6147ab40538 100644
--- a/apps/web/src/components/CrossChainVeCakeModal/index.tsx
+++ b/apps/web/src/components/CrossChainVeCakeModal/index.tsx
@@ -3,6 +3,7 @@ import { useTranslation } from '@pancakeswap/localization'
import {
ArrowUpIcon,
AtomBox,
+ BaseIcon,
Box,
Button,
CheckmarkCircleFillIcon,
@@ -55,6 +56,7 @@ const ChainLogoMap = {
[ChainId.ETHEREUM]: ,
[ChainId.ARBITRUM_ONE]: ,
[ChainId.ZKSYNC]: ,
+ [ChainId.BASE]: ,
}
const StyleUl = styled.ul`
@@ -132,6 +134,11 @@ const OtherChainsConfig = [
chainId: ChainId.ZKSYNC,
Icon: ,
},
+ {
+ chainName: 'Base',
+ chainId: ChainId.BASE,
+ Icon: ,
+ },
] as const
export const CrossChainVeCakeModal: React.FC<{
diff --git a/apps/web/src/config/constants/contracts.ts b/apps/web/src/config/constants/contracts.ts
index abd3bd8cfd4d3..2d794e03f3d25 100644
--- a/apps/web/src/config/constants/contracts.ts
+++ b/apps/web/src/config/constants/contracts.ts
@@ -48,6 +48,7 @@ export default {
[ChainId.ARBITRUM_ONE]: '0x5A3526891D6216DAe42d3e17a545A45f854F2213',
[ChainId.ETHEREUM]: '0xeA08f9e4267e30721D755A46Bcaddbf993d8C59B',
[ChainId.ZKSYNC]: '0xb6700cC1ab23BeB00c88496EAAA344fba31Ff895',
+ [ChainId.BASE]: '0x', // TODO: Add BASE address after SC deployment
},
pancakeBunnies: {
[ChainId.BSC]: '0xDf7952B35f24aCF7fC0487D01c8d5690a60DBa07',
@@ -236,6 +237,7 @@ export default {
[ChainId.ARBITRUM_ONE]: '0xF4C31dfEB3C0A2203472A3e20e49B1EFE4bD588d',
[ChainId.ETHEREUM]: '0x0aC4ED1D63c51f2b35C555eE09b425f08E6eA556',
[ChainId.ZKSYNC]: '0x77AbEA6a2FAa1938723411B28A0863be34f3c89f',
+ [ChainId.BASE]: '0x', // TODO: Add BASE address after SC deployment
},
pancakeVeSenderV2: {
[ChainId.BSC]: '0xEF58528Ecb76b69a0F61F65d94797d531B34cf64',
diff --git a/packages/farms/constants/v3/index.ts b/packages/farms/constants/v3/index.ts
index b07a9e9636e83..9cb6b65c5c39c 100644
--- a/packages/farms/constants/v3/index.ts
+++ b/packages/farms/constants/v3/index.ts
@@ -15,6 +15,7 @@ export const bCakeFarmBoosterV3VeCakeAddress: Addresses = {
[ChainId.ARBITRUM_ONE]: '0xc4EfD50205Ccd15c192F342B3837d644c8fff99a',
[ChainId.ETHEREUM]: '0xE604940C06DF1B6A9851f8E8D8d22468CB932E38',
[ChainId.ZKSYNC]: '0xBF5412F6217Fd57caf46e51f7929ea6f74739D21',
+ [ChainId.BASE]: '0x', // TODO: Add BASE address after SC deployment
}
export const bCakeFarmWrapperBoosterVeCakeAddress: Addresses = {
@@ -22,4 +23,5 @@ export const bCakeFarmWrapperBoosterVeCakeAddress: Addresses = {
[ChainId.ARBITRUM_ONE]: '0x21Eb14cf06270Ef944A1480bEf9163fe4Cf7DB14',
[ChainId.ETHEREUM]: '0xB509DBeE68B273767Cd8D45c1Ce95453391741f6',
[ChainId.ZKSYNC]: '0x5497577d6d37B825C74B0d41F580a009b79362eB',
+ [ChainId.BASE]: '0x', // TODO: Add BASE address after SC deployment
}
diff --git a/packages/farms/src/const.ts b/packages/farms/src/const.ts
index 83902e52446ab..866a3f6c07a96 100644
--- a/packages/farms/src/const.ts
+++ b/packages/farms/src/const.ts
@@ -36,7 +36,13 @@ export const supportedChainIdV3 = [
ChainId.OPBNB_TESTNET,
] as const
export const supportedChainId = uniq([...supportedChainIdV2, ...supportedChainIdV3])
-export const bCakeSupportedChainId = [ChainId.BSC, ChainId.ARBITRUM_ONE, ChainId.ETHEREUM, ChainId.ZKSYNC] as const
+export const bCakeSupportedChainId = [
+ ChainId.BSC,
+ ChainId.ARBITRUM_ONE,
+ ChainId.ETHEREUM,
+ ChainId.ZKSYNC,
+ ChainId.BASE,
+] as const
export const FARM_AUCTION_HOSTING_IN_SECONDS = 691200
diff --git a/packages/ifos/src/constants/lzChainMap.ts b/packages/ifos/src/constants/lzChainMap.ts
index d791937350e56..e504b8e847a88 100644
--- a/packages/ifos/src/constants/lzChainMap.ts
+++ b/packages/ifos/src/constants/lzChainMap.ts
@@ -19,6 +19,7 @@ export const LZ_CHAIN_MAP_V2 = {
[ChainId.POLYGON_ZKEVM]: 30158,
[ChainId.ZKSYNC]: 30165,
[ChainId.ARBITRUM_ONE]: 30110,
+ [ChainId.BASE]: 30184,
// Testnets
[ChainId.BSC_TESTNET]: 10102,
[ChainId.GOERLI]: 10121,