feat: update all chain definitions to 14 primary network chains

Add D-Chain (DexVM), G-Chain (GraphVM), I-Chain (IdentityVM),
O-Chain (OracleVM), R-Chain (RelayVM) to match ~/work/lux/node
vms_allvms.go. Fix VM names: ThresholdVM, BridgeVM, KeyVM.
Update chain count from 9 to 14 across all pages.
This commit is contained in:
2026-02-26 11:10:12 -08:00
parent 2e8885d7de
commit 8c1f6b438b
6 changed files with 145 additions and 24 deletions
+3
View File
@@ -35,6 +35,8 @@
"aatx",
"abfnrtv",
"abitype",
"AIVM",
"allvms",
"abkw",
"ACMRT",
"adbutler",
@@ -291,6 +293,7 @@
"zkevm",
"zksolc",
"zksync",
"ZKVM",
"zora"
]
}
+15 -4
View File
@@ -14,11 +14,22 @@ import PageTitle from 'ui/shared/Page/PageTitle';
const PRIMARY_NETWORK_ID = '11111111111111111111111111111111LpoYY';
// All 14 primary network chains from ~/work/lux/node/node/vms_allvms.go
const CHAIN_LABELS: Readonly<Record<string, string>> = {
C: 'C-Chain',
P: 'P-Chain',
X: 'X-Chain',
D: 'D-Chain',
A: 'A-Chain',
B: 'B-Chain',
Q: 'Q-Chain',
T: 'T-Chain',
Z: 'Z-Chain',
G: 'G-Chain',
K: 'K-Chain',
O: 'O-Chain',
R: 'R-Chain',
I: 'I-Chain',
};
const STAT_CARD_BG = { _light: 'gray.50', _dark: 'whiteAlpha.50' };
@@ -239,10 +250,10 @@ const BridgePage = () => {
Lux Network Bridge
</Text>
<Text fontSize="sm" color="text.secondary" lineHeight="1.6">
The Lux Bridge enables cross-chain asset transfers between the Primary Network
(C-Chain, X-Chain, P-Chain) and L1 subnet chains. Atomic swaps between Primary
Network chains are currently active. Teleporter-based transfers to L1 subnets
(Zoo, Hanzo, SPC, Pars) are coming soon via the B-Chain bridge relay.
The Lux Bridge enables cross-chain asset transfers between the 14 Primary Network
chains and L1 subnet chains. Atomic swaps between core chains (C, P, X) are
currently active. Teleporter-based transfers to L1 subnets (Zoo, Hanzo, SPC, Pars)
are coming soon via the B-Chain bridge relay.
</Text>
</Box>
</>
+80 -1
View File
@@ -19,7 +19,9 @@ const LUX_DECIMALS = 9;
const INFO_ROW_BG = { _light: 'gray.50', _dark: 'whiteAlpha.50' };
// Primary chain metadata that can be resolved from slug
// All 14 primary network chains from ~/work/lux/node/node/vms_allvms.go
// Core: C (EVM), P (PlatformVM), X (ExchangeVM)
// Extended (allvms build): A, B, D, G, I, K, O, Q, R, T, Z
const PRIMARY_CHAIN_META: Readonly<Record<string, {
readonly name: string;
readonly fullName: string;
@@ -48,6 +50,83 @@ const PRIMARY_CHAIN_META: Readonly<Record<string, {
vmId: 'jvYyfQTxGMJLuGWa55kdP2p2zSUYsQ5Raupu4TW34ZAUBAbtq',
description: 'The X-Chain is a DAG-based chain for creating and exchanging digital assets on the Lux Network.',
},
'd-chain': {
name: 'D-Chain',
fullName: 'DEX Chain',
vm: 'DexVM',
vmId: '',
description: 'The D-Chain is a decentralized exchange chain on the Lux Network for on-chain order books and token swaps.',
},
'a-chain': {
name: 'A-Chain',
fullName: 'AI Chain',
vm: 'AIVM',
vmId: '',
description: 'The A-Chain powers AI workloads on the Lux Network, providing decentralized inference and model serving.',
},
'b-chain': {
name: 'B-Chain',
fullName: 'Bridge Chain',
vm: 'BridgeVM',
vmId: '',
description: 'The B-Chain is the bridge relay chain on the Lux Network, enabling cross-chain asset transfers via Teleporter.',
},
'q-chain': {
name: 'Q-Chain',
fullName: 'Quantum Chain',
vm: 'QuantumVM',
vmId: '',
description: 'The Q-Chain provides post-quantum cryptographic primitives and quantum-resistant operations on the Lux Network.',
},
't-chain': {
name: 'T-Chain',
fullName: 'Threshold Chain',
vm: 'ThresholdVM',
vmId: '',
description: 'The T-Chain enables threshold signature schemes and distributed key generation on the Lux Network.',
},
'z-chain': {
name: 'Z-Chain',
fullName: 'ZK Chain',
vm: 'ZKVM',
vmId: '',
description: 'The Z-Chain handles zero-knowledge proof generation and verification on the Lux Network.',
},
'g-chain': {
name: 'G-Chain',
fullName: 'Graph Chain',
vm: 'GraphVM',
vmId: '',
description: 'The G-Chain provides decentralized graph indexing and query services on the Lux Network.',
},
'k-chain': {
name: 'K-Chain',
fullName: 'Key Chain',
vm: 'KeyVM',
vmId: '',
description: 'The K-Chain provides decentralized key management and custody services on the Lux Network.',
},
'o-chain': {
name: 'O-Chain',
fullName: 'Oracle Chain',
vm: 'OracleVM',
vmId: '',
description: 'The O-Chain provides decentralized oracle services, bringing off-chain data on-chain for the Lux Network.',
},
'r-chain': {
name: 'R-Chain',
fullName: 'Relay Chain',
vm: 'RelayVM',
vmId: '',
description: 'The R-Chain handles cross-chain message relay and interoperability routing on the Lux Network.',
},
'i-chain': {
name: 'I-Chain',
fullName: 'Identity Chain',
vm: 'IdentityVM',
vmId: '',
description: 'The I-Chain manages decentralized identity, DIDs, and verifiable credentials on the Lux Network.',
},
};
const SUBNET_CHAIN_IDS: Readonly<Record<string, number>> = {
+14 -6
View File
@@ -14,16 +14,24 @@ import ChainRow from './ChainRow';
const PRIMARY_NETWORK_ID = '11111111111111111111111111111111LpoYY' as const;
// All 14 primary network chains from ~/work/lux/node/node/vms_allvms.go
// Core: C (EVM), P (PlatformVM), X (ExchangeVM)
// Extended (allvms build): A, B, D, G, I, K, O, Q, R, T, Z
const PRIMARY_CHAINS = [
{ name: 'C-Chain', fullName: 'Contract Chain', vm: 'EVM', chainId: 96369, slug: 'c-chain' },
{ name: 'P-Chain', fullName: 'Platform Chain', vm: 'PVM', chainId: null, slug: 'p-chain' },
{ name: 'X-Chain', fullName: 'Exchange Chain', vm: 'AVM', chainId: null, slug: 'x-chain' },
{ name: 'A-Chain', fullName: 'AI Chain', vm: 'AVM', chainId: null, slug: 'a-chain' },
{ name: 'B-Chain', fullName: 'Bridge Chain', vm: 'BVM', chainId: null, slug: 'b-chain' },
{ name: 'Q-Chain', fullName: 'Quantum Chain', vm: 'QVM', chainId: null, slug: 'q-chain' },
{ name: 'T-Chain', fullName: 'Teleport Chain', vm: 'MPC', chainId: null, slug: 't-chain' },
{ name: 'Z-Chain', fullName: 'ZK Chain', vm: 'ZVM', chainId: null, slug: 'z-chain' },
{ name: 'K-Chain', fullName: 'KMS Chain', vm: 'KVM', chainId: null, slug: 'k-chain' },
{ name: 'D-Chain', fullName: 'DEX Chain', vm: 'DexVM', chainId: null, slug: 'd-chain' },
{ name: 'A-Chain', fullName: 'AI Chain', vm: 'AIVM', chainId: null, slug: 'a-chain' },
{ name: 'B-Chain', fullName: 'Bridge Chain', vm: 'BridgeVM', chainId: null, slug: 'b-chain' },
{ name: 'Q-Chain', fullName: 'Quantum Chain', vm: 'QuantumVM', chainId: null, slug: 'q-chain' },
{ name: 'T-Chain', fullName: 'Threshold Chain', vm: 'ThresholdVM', chainId: null, slug: 't-chain' },
{ name: 'Z-Chain', fullName: 'ZK Chain', vm: 'ZKVM', chainId: null, slug: 'z-chain' },
{ name: 'G-Chain', fullName: 'Graph Chain', vm: 'GraphVM', chainId: null, slug: 'g-chain' },
{ name: 'K-Chain', fullName: 'Key Chain', vm: 'KeyVM', chainId: null, slug: 'k-chain' },
{ name: 'O-Chain', fullName: 'Oracle Chain', vm: 'OracleVM', chainId: null, slug: 'o-chain' },
{ name: 'R-Chain', fullName: 'Relay Chain', vm: 'RelayVM', chainId: null, slug: 'r-chain' },
{ name: 'I-Chain', fullName: 'Identity Chain', vm: 'IdentityVM', chainId: null, slug: 'i-chain' },
] as const;
const SUBNET_CHAIN_IDS: Readonly<Record<string, number>> = {
+32 -12
View File
@@ -22,16 +22,24 @@ import Transactions from 'ui/home/Transactions';
const PRIMARY_NETWORK_ID = '11111111111111111111111111111111LpoYY';
const LUX_DECIMALS = 9;
// All 14 primary network chains from ~/work/lux/node/node/vms_allvms.go
// Core chains (always active): C, P, X
// Extended chains (allvms build): A, B, D, G, I, K, O, Q, R, T, Z
const PRIMARY_CHAINS = [
{ id: 'C', name: 'C-Chain', fullName: 'Contract Chain', vm: 'EVM', href: '/', explorerUrl: undefined },
{ id: 'P', name: 'P-Chain', fullName: 'Platform Chain', vm: 'PVM', href: '/validators', explorerUrl: undefined },
{ id: 'X', name: 'X-Chain', fullName: 'Exchange Chain', vm: 'AVM', href: undefined, explorerUrl: undefined },
{ id: 'A', name: 'A-Chain', fullName: 'AI Chain', vm: 'AVM', href: undefined, explorerUrl: undefined },
{ id: 'B', name: 'B-Chain', fullName: 'Bridge Chain', vm: 'BVM', href: '/bridge', explorerUrl: undefined },
{ id: 'Q', name: 'Q-Chain', fullName: 'Quantum Chain', vm: 'QVM', href: undefined, explorerUrl: undefined },
{ id: 'T', name: 'T-Chain', fullName: 'Teleport Chain', vm: 'MPC', href: undefined, explorerUrl: undefined },
{ id: 'Z', name: 'Z-Chain', fullName: 'ZK Chain', vm: 'ZVM', href: undefined, explorerUrl: undefined },
{ id: 'K', name: 'K-Chain', fullName: 'KMS Chain', vm: 'KVM', href: undefined, explorerUrl: undefined },
{ id: 'C', name: 'C-Chain', fullName: 'Contract Chain', vm: 'EVM', href: '/' },
{ id: 'P', name: 'P-Chain', fullName: 'Platform Chain', vm: 'PVM', href: '/validators' },
{ id: 'X', name: 'X-Chain', fullName: 'Exchange Chain', vm: 'AVM', href: undefined },
{ id: 'D', name: 'D-Chain', fullName: 'DEX Chain', vm: 'DexVM', href: undefined },
{ id: 'A', name: 'A-Chain', fullName: 'AI Chain', vm: 'AIVM', href: undefined },
{ id: 'B', name: 'B-Chain', fullName: 'Bridge Chain', vm: 'BridgeVM', href: '/bridge' },
{ id: 'Q', name: 'Q-Chain', fullName: 'Quantum Chain', vm: 'QuantumVM', href: undefined },
{ id: 'T', name: 'T-Chain', fullName: 'Threshold Chain', vm: 'ThresholdVM', href: undefined },
{ id: 'Z', name: 'Z-Chain', fullName: 'ZK Chain', vm: 'ZKVM', href: undefined },
{ id: 'G', name: 'G-Chain', fullName: 'Graph Chain', vm: 'GraphVM', href: undefined },
{ id: 'K', name: 'K-Chain', fullName: 'Key Chain', vm: 'KeyVM', href: undefined },
{ id: 'O', name: 'O-Chain', fullName: 'Oracle Chain', vm: 'OracleVM', href: undefined },
{ id: 'R', name: 'R-Chain', fullName: 'Relay Chain', vm: 'RelayVM', href: undefined },
{ id: 'I', name: 'I-Chain', fullName: 'Identity Chain', vm: 'IdentityVM', href: undefined },
] as const;
const L1_EXPLORER_URLS: Readonly<Record<string, string>> = {
@@ -196,11 +204,23 @@ const NetworkOverview = () => {
<Box w="1px" h="32px" bgColor="border.divider" display={{ base: 'none', lg: 'block' }}/>
<NetworkStat label="Validators" value={ String(stats.validatorCount) } isLoading={ isLoading }/>
<Box w="1px" h="32px" bgColor="border.divider" display={{ base: 'none', lg: 'block' }}/>
<NetworkStat label="Total Stake" value={ `${ formatStake(stats.totalStake) } LUX` } isLoading={ isLoading }/>
<NetworkStat
label="Total Stake"
value={ `${ formatStake(stats.totalStake) } LUX` }
isLoading={ isLoading }
/>
<Box w="1px" h="32px" bgColor="border.divider" display={{ base: 'none', lg: 'block' }}/>
<NetworkStat label="Avg Uptime" value={ `${ stats.averageUptime.toFixed(1) }%` } isLoading={ isLoading }/>
<NetworkStat
label="Avg Uptime"
value={ `${ stats.averageUptime.toFixed(1) }%` }
isLoading={ isLoading }
/>
<Box w="1px" h="32px" bgColor="border.divider" display={{ base: 'none', lg: 'block' }}/>
<NetworkStat label="Connected" value={ `${ stats.connectedCount }/${ stats.validatorCount }` } isLoading={ isLoading }/>
<NetworkStat
label="Connected"
value={ `${ stats.connectedCount }/${ stats.validatorCount }` }
isLoading={ isLoading }
/>
</Flex>
{ /* Blockscout stats + Latest blocks/txs */ }
+1 -1
View File
@@ -10,7 +10,7 @@ import { Skeleton } from 'toolkit/chakra/skeleton';
// ── Constants ──
const PRIMARY_NETWORK_ID = '11111111111111111111111111111111LpoYY';
const PRIMARY_CHAIN_COUNT = 9;
const PRIMARY_CHAIN_COUNT = 14;
const LUX_DECIMALS = 9;
const STAT_BG = { _light: 'gray.50', _dark: 'whiteAlpha.50' };