Skip to content

Commit fb696d4

Browse files
Merge pull request #62 from StabilityNexus/sarthak
Added BNB chain support.
2 parents 5fe9b29 + fa98883 commit fb696d4

11 files changed

Lines changed: 21 additions & 4 deletions

File tree

app/[vaultId]/InteractionClient.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export default function InteractionClient() {
8080
2001: 'Milkomeda',
8181
137: 'Polygon',
8282
8453: 'Base',
83+
56: 'Binance Smart Chain',
8384
}
8485
return chainNames[chainId] || `Chain ${chainId}`
8586
}

components/ChainDropdown.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { motion, AnimatePresence } from "framer-motion";
55
import { ChevronDown, Check, Network, Wifi } from "lucide-react";
66

77
// Define supported chain IDs
8-
type SupportedChainId = 1 | 137 | 534351 | 5115 | 61 | 2001 | 8453;
8+
type SupportedChainId = 1 | 137 | 534351 | 5115 | 61 | 2001 | 8453 | 56;
99

1010
// Chain ID to name mapping
1111
const CHAIN_NAMES: Record<SupportedChainId, string> = {
@@ -16,6 +16,7 @@ const CHAIN_NAMES: Record<SupportedChainId, string> = {
1616
61: "Ethereum Classic",
1717
2001: "Milkomeda",
1818
8453: "Base",
19+
56: "Binance Smart Chain",
1920
};
2021

2122
// Chain colors for visual distinction
@@ -27,6 +28,7 @@ const CHAIN_COLORS: Record<SupportedChainId, string> = {
2728
61: "bg-green-500",
2829
2001: "bg-purple-500",
2930
8453: "bg-blue-500",
31+
56: "bg-yellow-500",
3032
};
3133

3234
// Chain icons
@@ -38,6 +40,7 @@ const CHAIN_ICONS: Record<SupportedChainId, string> = {
3840
61: "🟢",
3941
2001: "🟤",
4042
8453: "🔵",
43+
56: "🟨",
4144
};
4245

4346
interface ChainDropdownProps {

components/CreateVault/CreateForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const BLOCK_EXPLORERS: { [key: number]: string } = {
3030
61: 'https://blockscout.com/etc/mainnet',
3131
137: 'https://polygonscan.com',
3232
8453: 'https://basescan.org',
33+
56: 'https://bscscan.com',
3334
2001: 'https://explorer-mainnet-cardano-evm.c1.milkomeda.com',
3435
534351: 'https://sepolia.scrollscan.com',
3536
5115: 'https://explorer.testnet.citrea.xyz',

components/Explorer/CardExplorer.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export default function CardExplorer({ vault }: { vault: ExtendedVaultProps }) {
9494
2001: 'Milkomeda',
9595
137: 'Polygon',
9696
8453: 'Base',
97+
56: 'Binance Smart Chain',
9798
}
9899
return chainNames[chainId] || `Chain ${chainId}`
99100
}
@@ -107,6 +108,7 @@ export default function CardExplorer({ vault }: { vault: ExtendedVaultProps }) {
107108
2001: 'bg-purple-400/10 text-purple-500 border-purple-400/20 dark:bg-purple-500/10 dark:text-purple-400 dark:border-purple-500/20',
108109
137: 'bg-violet-400/10 text-violet-500 border-violet-400/20 dark:bg-violet-500/10 dark:text-violet-400 dark:border-violet-500/20',
109110
8453: 'bg-purple-400/10 text-purple-500 border-purple-400/20 dark:bg-purple-500/10 dark:text-purple-400 dark:border-purple-500/20',
111+
56: 'bg-purple-400/10 text-purple-500 border-purple-400/20 dark:bg-purple-500/10 dark:text-purple-400 dark:border-purple-500/20',
110112
}
111113
return chainColors[chainId] || 'bg-gray-400/10 text-gray-500 border-gray-400/20 dark:bg-gray-500/10 dark:text-gray-400 dark:border-gray-500/20'
112114
}

components/Explorer/ExplorerVaults.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { Loading } from '../ui/loading'
2020
import { cn } from '@/lib/utils'
2121

2222
// Define supported chain IDs to match ChainDropdown
23-
type SupportedChainId = 1 | 137 | 534351 | 5115 | 61 | 2001 | 8453;
23+
type SupportedChainId = 1 | 137 | 534351 | 5115 | 61 | 2001 | 8453 | 56;
2424

2525
// Extended vault props with price and TVL data
2626
interface ExtendedVaultProps extends vaultsProps {
@@ -464,6 +464,7 @@ export default function ExplorerVaults() {
464464
61: 'Ethereum Classic',
465465
2001: 'Milkomeda',
466466
8453: 'Base',
467+
56: 'Binance Smart Chain',
467468
}
468469
return chainNames[chainId] || `Chain ${chainId}`
469470
}

components/FavoriteVaults/FavoriteVaults.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { HodlCoinAbi } from '@/utils/contracts/HodlCoin'
2222
const ITEMS_PER_PAGE = 6
2323

2424
// Define supported chain IDs to match ChainDropdown
25-
type SupportedChainId = 1 | 137 | 534351 | 5115 | 61 | 2001 | 8453;
25+
type SupportedChainId = 1 | 137 | 534351 | 5115 | 61 | 2001 | 8453 | 56;
2626

2727
// Extended vault props with price and TVL data
2828
interface ExtendedVaultProps extends vaultsProps {
@@ -353,6 +353,7 @@ const FavoriteVaults = () => {
353353
61: 'Ethereum Classic',
354354
2001: 'Milkomeda',
355355
8453: 'Base',
356+
56: 'Binance Smart Chain',
356357
}
357358
return chainNames[chainId] || `Chain ${chainId}`
358359
}

components/MyVaults/AllVaults.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { indexedDBManager } from '@/utils/indexedDB'
2121
import { ChainDropdown } from '@/components/ChainDropdown'
2222

2323
// Define supported chain IDs to match ChainDropdown
24-
type SupportedChainId = 1 | 137 | 534351 | 5115 | 61 | 2001 | 8453;
24+
type SupportedChainId = 1 | 137 | 534351 | 5115 | 61 | 2001 | 8453 | 56;
2525

2626
// Extended vault props with price and TVL data
2727
interface ExtendedVaultProps extends vaultsProps {
@@ -125,6 +125,7 @@ const AllVaults = () => {
125125
61: 'Ethereum Classic',
126126
2001: 'Milkomeda',
127127
8453: 'Base',
128+
56: 'Binance Smart Chain',
128129
}
129130
return chainNames[chainId] || `Chain ${chainId}`
130131
}

components/Vault/HeroVault.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ export default function HeroVault({
228228
2001: 'Milkomeda',
229229
137: 'Polygon',
230230
8453: 'Base',
231+
56: 'Binance Smart Chain',
231232
}
232233
return chainNames[chainId] || `Chain ${chainId}`
233234
}
@@ -241,6 +242,7 @@ export default function HeroVault({
241242
2001: 'bg-purple-400/10 text-purple-500 border-purple-400/20',
242243
137: 'bg-violet-400/10 text-violet-500 border-violet-400/20',
243244
8453: 'bg-blue-400/10 text-blue-500 border-blue-400/20',
245+
56: 'bg-yellow-400/10 text-yellow-500 border-yellow-400/20',
244246
}
245247
return chainColors[chainId] || 'bg-gray-400/10 text-gray-500 border-gray-400/20'
246248
}
@@ -254,6 +256,7 @@ export default function HeroVault({
254256
2001: 'https://explorer-mainnet-cardano-evm.c1.milkomeda.com',
255257
137: 'https://polygonscan.com',
256258
8453: 'https://basescan.org',
259+
56: 'https://bscscan.com',
257260
}
258261
const baseUrl = explorers[chainId] || 'https://etherscan.io'
259262
return `${baseUrl}/address/${address}`

components/Vault/VaultInformation.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const BLOCK_EXPLORERS: { [key: number]: string } = {
1111
2001: 'https://explorer-mainnet-cardano-evm.c1.milkomeda.com',
1212
534351: 'https://sepolia.scrollscan.com',
1313
5115: 'https://explorer.testnet.citrea.xyz',
14+
56: 'https://bscscan.com',
1415
}
1516

1617
export default function VaultInformation({

utils/addresses.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export const HodlCoinVaultFactories = {
66
137: '0x89572326c048053fb0efa14bcc2dd4dfffdcc4a9',
77
8453: '0xa482c35b3fd47f93ae381ee3f8ca1d4d3a565194',
88
61: '0x9aA272a104d413e3702D6a28901f3998c16C802F',
9+
56: '0x9aa272a104d413e3702d6a28901f3998c16c802f',
910
} as {
1011
[key: number]: `0x${string}`
1112
}

0 commit comments

Comments
 (0)