Files
zeekayandHanzo Dev 7d293212cb refactor: web/ is now console/ — bootnode/bootnode is the backend, bootnode/console the frontend
Names the two halves for what they are. The repo already holds both (12407e9 merged
bootnode/bootnode into this history); this makes the frontend directory say so, so the layout
reads the way the owner describes the system: backend and frontend separate, one repo.

git mv throughout — 187 renames, history preserved. Every path reference follows: hanzo.yml
build context and dockerfile, compose.yml, compose.prod.yml, start.sh, LLM.md,
infra/k8s/web-deployments.yaml, infra/cloud/deploy.sh, and the Dockerfile's own COPY paths.
Image and container names (bootnode-web, the -web tag suffix) are deliberately NOT renamed here:
those are a deploy contract the App CR and ingress bind to on port 3001, and breaking them is a
separate, staged change.

Console builds green after the move; the Go tree builds.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-26 17:47:51 -07:00

97 lines
2.6 KiB
TypeScript

// Chain icon mapping - maps chain IDs to their PNG icon paths in /public/chains/
// For chains without dedicated icons, we use a color + initial fallback
/** Chains that have a real PNG/SVG icon in /public/chains/ */
export const CHAIN_ICON_MAP: Record<string, string> = {
ethereum: "/chains/ethereum.png",
solana: "/chains/solana.png",
arbitrum: "/chains/arbitrum.png",
avalanche: "/chains/avalanche.png",
base: "/chains/base.png",
bnb: "/chains/bnb.png",
bsc: "/chains/bnb.png",
blast: "/chains/blast.png",
celo: "/chains/celo.png",
lux: "/chains/lux.png",
monad: "/chains/monad.png",
optimism: "/chains/optimism.png",
polygon: "/chains/polygon.png",
zksync: "/chains/zksync.png",
zora: "/chains/zora.png",
soneium: "/chains/soneium.png",
worldchain: "/chains/worldchain.png",
}
/** Fallback colors for chains without dedicated icons */
export const CHAIN_COLORS: Record<string, string> = {
bitcoin: "#F7931A",
cosmos: "#2E3148",
polkadot: "#E6007A",
cardano: "#0033AD",
near: "#000000",
tron: "#FF0013",
ton: "#0088CC",
hedera: "#222222",
filecoin: "#0090FF",
xrpl: "#23292F",
fantom: "#1969FF",
cronos: "#002D74",
gnosis: "#04795B",
moonbeam: "#53CBC9",
sei: "#9B1C1C",
sui: "#4DA2FF",
aptos: "#000000",
linea: "#121212",
scroll: "#FFEEDA",
mantle: "#000000",
starknet: "#EC796B",
tezos: "#2C7DF7",
algorand: "#000000",
injective: "#00F2FE",
celestia: "#7B2BF9",
aleo: "#00C0F9",
bittensor: "#000000",
zoo: "#F59E0B",
pars: "#8B5CF6",
hanzo: "#EF4444",
dydx: "#6966FF",
osmosis: "#750BBB",
kava: "#FF564F",
akash: "#FF414C",
zetachain: "#00BC8D",
axelar: "#FFFFFF",
iota: "#131F37",
stacks: "#5546FF",
secret: "#1B1B1B",
harmony: "#00AEE9",
radix: "#060F8F",
waves: "#0055FF",
skale: "#000000",
avail: "#2B60DE",
casper: "#FF473E",
fetch: "#1D1D3F",
livepeer: "#00EB88",
multiversx: "#000000",
band: "#516AFF",
}
/** Get icon src for a chain, or null if no icon available (use fallback) */
export function getChainIcon(chainId: string): string | null {
return CHAIN_ICON_MAP[chainId.toLowerCase()] ?? null
}
/** Get fallback color for a chain without an icon */
export function getChainColor(chainId: string): string {
return CHAIN_COLORS[chainId.toLowerCase()] ?? "#6B7280"
}
/** Get the first letter(s) for a chain to show in the fallback circle */
export function getChainInitial(chainId: string, chainName?: string): string {
const name = chainName || chainId
// Special cases
if (chainId === "bsc" || chainId === "bnb") return "B"
if (chainId === "xrpl") return "X"
if (chainId === "zksync") return "zk"
return name.charAt(0).toUpperCase()
}