/** * Contract addresses for every Lux-network chain. * * Source of truth: ~/work/lux/standard/deployments/{mainnet,testnet,devnet}/--l1/*.json * * Inventory: 18 endpoints — 5 brand L1s × 3 envs + Lux primary C × 3 envs. * Mainnet brand chain IDs come from the 2026-06-05 network reset. * * For chains where contracts are not yet deployed, address fields are set to * `PENDING` (the zero address). The UI surfaces these as "Deploying" status. */ import type { Address } from 'viem' /** Sentinel for contracts not yet deployed on a given chain. */ export const PENDING: Address = '0x0000000000000000000000000000000000000000' /** Standard utilities — same address across every Lux-derived chain. */ const MULTICALL3: Address = '0xd25F88CBdAe3c2CCA3Bb75FC4E723b44C0Ea362F' // ───────────────────────────────────────────────────────────────────── // LUX PRIMARY C-CHAIN // ───────────────────────────────────────────────────────────────────── /** Lux Mainnet (96369) — verified on-chain. */ export const LUX_MAINNET_CONTRACTS = { WLUX: '0x4888e4a2ee0f03051c72d2bd3acf755ed3498b3e' as Address, MULTICALL: MULTICALL3, // Bridge tokens (V3 pools, MPC-verified) LETH: '0x60E0a8167FC13dE89348978860466C9ceC24B9ba' as Address, LBTC: '0x1E48D32a4F5e9f08DB9aE4959163300FaF8A6C8e' as Address, LUSD: '0x848Cff46eb323f323b6Bbe1Df274E40793d7f2c2' as Address, LSOL: '0x26B40f650156C7EbF9e087Dd0dca181Fe87625B7' as Address, LTON: '0x3141b94b89691009b950c96e97Bff48e0C543E3C' as Address, LAVAX: '0x0e4bD0DD67c15dECfBBBdbbE07FC9d51D737693D' as Address, // AMM V2 V2_FACTORY: '0xD173926A10A0C4eCd3A51B1422270b65Df0551c1' as Address, V2_ROUTER: '0xAe2cf1E403aAFE6C05A5b8Ef63EB19ba591d8511' as Address, // AMM V3 V3_FACTORY: '0x80bBc7C4C7a59C899D1B37BC14539A22D5830a84' as Address, V3_SWAP_ROUTER: '0xE8fb25086C8652c92f5AF90D730Bac7C63Fc9A58' as Address, V3_SWAP_ROUTER_02: '0x939bC0Bca6F9B9c52E6e3AD8A3C590b5d9B9D10E' as Address, V3_QUOTER: '0x12e2B76FaF4dDA5a173a4532916bb6Bfa3645275' as Address, V3_QUOTER_V2: '0x15C729fdd833Ba675edd466Dfc63E1B737925A4c' as Address, V3_NFT_POSITION_MANAGER: '0x7a4C48B9dae0b7c396569b34042fcA604150Ee28' as Address, } as const /** Lux Testnet (96368) — verified on-chain 2026-06-01. */ export const LUX_TESTNET_CONTRACTS = { WLUX: '0xf3a126C12EE4f413573B8a32a36953Bd43719E30' as Address, MULTICALL: MULTICALL3, LBTC: '0x81703A74cfcdBfB4859417761DBEa54bb6E9CfEE' as Address, LETH: '0xc8D756da46BCEaCB2c3FD05091709361886cd32E' as Address, V2_FACTORY: '0x3153c91b6b7f29Cc6BCE51FfF639dA658Bd75363' as Address, V2_ROUTER: '0xB0B3Df1E279D87e72738487Df8d7c0d7c2D1eFcE' as Address, } as const /** Lux Devnet (96367) — deployments in progress. */ export const LUX_DEVNET_CONTRACTS = { WLUX: '0xc65ea8882020Af7CDa7854d590C6Fcd34BF364ec' as Address, MULTICALL: MULTICALL3, V2_FACTORY: '0x0570b2c59976E87D37d3a9915750BFf131d295D6' as Address, V2_ROUTER: PENDING, } as const // ───────────────────────────────────────────────────────────────────── // HANZO BRAND L1 // ───────────────────────────────────────────────────────────────────── /** Hanzo Mainnet (36963) — post-2026-06-05 reset; redeploy pending. */ export const HANZO_MAINNET_CONTRACTS = { WLUX: PENDING, MULTICALL: MULTICALL3, LETH: PENDING, LBTC: PENDING, LUSD: PENDING, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const /** * Hanzo Testnet (36964) — post-2026-06-05 reset; redeploy pending. * (Pre-reset contracts on chainId 36962 are stranded after the wipe.) */ export const HANZO_TESTNET_CONTRACTS = { WLUX: PENDING, MULTICALL: MULTICALL3, LBTC: PENDING, LETH: PENDING, LUSDC: PENDING, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const /** Hanzo Devnet (36964) — post-2026-06-05 reset; redeploy pending. */ export const HANZO_DEVNET_CONTRACTS = { WLUX: PENDING, MULTICALL: MULTICALL3, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const // ───────────────────────────────────────────────────────────────────── // ZOO BRAND L1 // ───────────────────────────────────────────────────────────────────── /** Zoo Mainnet (200200) — deployed 2026-03-04; verified post-reset. */ export const ZOO_MAINNET_CONTRACTS = { WLUX: '0x5491216406daB99b7032b83765F36790E27F8A61' as Address, MULTICALL: MULTICALL3, LETH: '0x4870621EA8be7a383eFCfdA225249d35888bD9f2' as Address, LBTC: '0x6fc44509a32E513bE1aa00d27bb298e63830C6A8' as Address, LUSD: '0xb2ee1CE7b84853b83AA08702aD0aD4D79711882D' as Address, V2_FACTORY: '0xF034942c1140125b5c278aE9cEE1B488e915B2FE' as Address, V2_ROUTER: '0x2cd306913e6546C59249b48d7c786A6D1d7ebE08' as Address, } as const /** Zoo Testnet (200201) — partial deployment (WLUX + LETH live). */ export const ZOO_TESTNET_CONTRACTS = { WLUX: '0x413e4A820635702Ec199bC5B62dCbCa1749851bf' as Address, MULTICALL: MULTICALL3, LETH: '0x9378b62fC172d2A4f715d7ecF49DE0362f1BB702' as Address, LBTC: PENDING, LUSD: PENDING, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const /** Zoo Devnet (200202) — fresh post-reset chain; redeploy pending. */ export const ZOO_DEVNET_CONTRACTS = { WLUX: PENDING, MULTICALL: MULTICALL3, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const // ───────────────────────────────────────────────────────────────────── // PARS BRAND L1 // ───────────────────────────────────────────────────────────────────── /** Pars Mainnet (7070) — post-2026-06-05 reset; redeploy pending. */ export const PARS_MAINNET_CONTRACTS = { WLUX: PENDING, MULTICALL: MULTICALL3, LETH: PENDING, LBTC: PENDING, LUSD: PENDING, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const /** Pars Testnet (494950) — partial deployment (LETH, LUSDC live). */ export const PARS_TESTNET_CONTRACTS = { WLUX: PENDING, MULTICALL: MULTICALL3, LETH: '0xC64BD67b39765127ae5DBdd750Fb6a9f62c3269f' as Address, LBTC: PENDING, LUSDC: '0x45389804C25b3575b710474a948128C69e5B423f' as Address, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const /** Pars Devnet (494951) — fresh post-reset chain; redeploy pending. */ export const PARS_DEVNET_CONTRACTS = { WLUX: PENDING, MULTICALL: MULTICALL3, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const // ───────────────────────────────────────────────────────────────────── // SPC BRAND L1 // ───────────────────────────────────────────────────────────────────── /** SPC Mainnet (36911) — post-2026-06-05 reset; redeploy pending. */ export const SPC_MAINNET_CONTRACTS = { WLUX: PENDING, MULTICALL: MULTICALL3, LETH: PENDING, LBTC: PENDING, LUSD: PENDING, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const /** SPC Testnet (36910) — partial deployment (LETH live). */ export const SPC_TESTNET_CONTRACTS = { WLUX: PENDING, MULTICALL: MULTICALL3, LETH: '0x45389804C25b3575b710474a948128C69e5B423f' as Address, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const /** SPC Devnet (36912) — fresh post-reset chain; redeploy pending. */ export const SPC_DEVNET_CONTRACTS = { WLUX: PENDING, MULTICALL: MULTICALL3, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const // ───────────────────────────────────────────────────────────────────── // OSAGE BRAND L1 // ───────────────────────────────────────────────────────────────────── /** Osage Mainnet (1872) — post-2026-06-05 reset; redeploy pending. */ export const OSAGE_MAINNET_CONTRACTS = { WLUX: PENDING, MULTICALL: MULTICALL3, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const /** Osage Testnet (1871) — fresh post-reset chain; redeploy pending. */ export const OSAGE_TESTNET_CONTRACTS = { WLUX: PENDING, MULTICALL: MULTICALL3, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const /** Osage Devnet (1873) — fresh post-reset chain; redeploy pending. */ export const OSAGE_DEVNET_CONTRACTS = { WLUX: PENDING, MULTICALL: MULTICALL3, V2_FACTORY: PENDING, V2_ROUTER: PENDING, } as const // ───────────────────────────────────────────────────────────────────── // DEX PRECOMPILES (chain-independent — same address on every Lux-derived EVM) // ───────────────────────────────────────────────────────────────────── /** * DEX Precompile addresses — canonical 0x0400-0x04FF block. * See ~/work/lux/precompile/CLAUDE.md for the complete registry. */ export const DEX_PRECOMPILES = { // Core DEX (0x0400-0x040F) POOL_MANAGER: '0x0000000000000000000000000000000000000400' as Address, SWAP_ROUTER: '0x0000000000000000000000000000000000000401' as Address, HOOKS_REGISTRY: '0x0000000000000000000000000000000000000402' as Address, FLASH_LOAN: '0x0000000000000000000000000000000000000403' as Address, // Lending (0x0410-0x041F) LENDING_POOL: '0x0000000000000000000000000000000000000410' as Address, INTEREST_RATE: '0x0000000000000000000000000000000000000411' as Address, LIQUIDATOR: '0x0000000000000000000000000000000000000412' as Address, // Perpetuals (0x0420-0x042F) PERP_ENGINE: '0x0000000000000000000000000000000000000420' as Address, FUNDING_RATE: '0x0000000000000000000000000000000000000421' as Address, INSURANCE_FUND: '0x0000000000000000000000000000000000000422' as Address, // Liquid Vaults (0x0430-0x043F) LIQUID_VAULT: '0x0000000000000000000000000000000000000430' as Address, LIQUID_FX: '0x0000000000000000000000000000000000000431' as Address, LIQUID_TOKEN: '0x0000000000000000000000000000000000000432' as Address, YIELD_ROUTER: '0x0000000000000000000000000000000000000433' as Address, // Bridges (0x0440-0x044F) TELEPORT_BRIDGE: '0x0000000000000000000000000000000000000440' as Address, OMNICHAIN_ROUTER: '0x0000000000000000000000000000000000000441' as Address, } as const /** * LP-4200 unified PQCrypto precompile block. Same address across every chain. */ export const PQ_CRYPTO_PRECOMPILES = { ML_KEM: '0x0000000000000000000000000000000000012201' as Address, ML_DSA: '0x0000000000000000000000000000000000012202' as Address, SLH_DSA: '0x0000000000000000000000000000000000012203' as Address, PULSAR: '0x0000000000000000000000000000000000012204' as Address, P3Q: '0x0000000000000000000000000000000000012205' as Address, CORONA: '0x0000000000000000000000000000000000012206' as Address, MAGNETAR: '0x0000000000000000000000000000000000012207' as Address, HQC: '0x0000000000000000000000000000000000012208' as Address, } as const // ───────────────────────────────────────────────────────────────────── // LUX DEV (local anvil/--dev node) // ───────────────────────────────────────────────────────────────────── /** Lux Dev (1337) — deterministic CREATE addresses from anvil account 0. */ export const LUX_DEV_CONTRACTS = { WLUX: '0x5FbDB2315678afecb367f032d93F642f64180aa3' as Address, MULTICALL: MULTICALL3, LETH: '0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512' as Address, LBTC: '0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0' as Address, LUSD: '0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9' as Address, V2_FACTORY: '0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1' as Address, V2_ROUTER: '0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE' as Address, V3_FACTORY: '0x80bBc7C4C7a59C899D1B37BC14539A22D5830a84' as Address, V3_SWAP_ROUTER: '0xE8fb25086C8652c92f5AF90D730Bac7C63Fc9A58' as Address, V3_SWAP_ROUTER_02: '0x939bC0Bca6F9B9c52E6e3AD8A3C590b5d9B9D10E' as Address, V3_QUOTER: '0x12e2B76FaF4dDA5a173a4532916bb6Bfa3645275' as Address, V3_QUOTER_V2: '0x15C729fdd833Ba675edd466Dfc63E1B737925A4c' as Address, V3_TICK_LENS: '0x57A22965AdA0e52D785A9Aa155beF423D573b879' as Address, V3_NFT_POSITION_MANAGER: '0x7a4C48B9dae0b7c396569b34042fcA604150Ee28' as Address, V3_NFT_DESCRIPTOR: '0x53B1aAA5b6DDFD4eD00D0A7b5Ef333dc74B605b5' as Address, STAKED_LUX: '0xA51c1fc2f0D1a1b8494Ed1FE312d7C3a78Ed91C0' as Address, } as const // ───────────────────────────────────────────────────────────────────── // LOOKUP // ───────────────────────────────────────────────────────────────────── /** * Get contracts for a specific chain. * * Returns LUX_MAINNET_CONTRACTS as the fallback so existing code never sees * undefined. UIs should still gate by `chain.id in CONTRACTS_BY_CHAIN_ID` to * avoid showing addresses from the wrong chain when a user is on an unknown * chain. */ export function getContracts(chainId: number) { switch (chainId) { // Lux primary C-Chain case 96369: return LUX_MAINNET_CONTRACTS case 96368: return LUX_TESTNET_CONTRACTS case 96367: return LUX_DEVNET_CONTRACTS case 1337: return LUX_DEV_CONTRACTS // Hanzo brand L1 case 36963: return HANZO_MAINNET_CONTRACTS case 36964: return HANZO_TESTNET_CONTRACTS // also devnet (shared chainId) // Zoo brand L1 case 200200: return ZOO_MAINNET_CONTRACTS case 200201: return ZOO_TESTNET_CONTRACTS case 200202: return ZOO_DEVNET_CONTRACTS // Pars brand L1 case 7070: return PARS_MAINNET_CONTRACTS case 494950: return PARS_TESTNET_CONTRACTS case 494951: return PARS_DEVNET_CONTRACTS // SPC brand L1 case 36911: return SPC_MAINNET_CONTRACTS case 36910: return SPC_TESTNET_CONTRACTS case 36912: return SPC_DEVNET_CONTRACTS // Osage brand L1 case 1872: return OSAGE_MAINNET_CONTRACTS case 1871: return OSAGE_TESTNET_CONTRACTS case 1873: return OSAGE_DEVNET_CONTRACTS default: return LUX_MAINNET_CONTRACTS } } /** * Per-chain deployment-status flag. UIs render "Deploying" badge when a * required contract is `PENDING` on the active chain. */ export function isContractDeployed(chainId: number, key: keyof ContractAddresses): boolean { const c = getContracts(chainId) as Record const addr = c[key as string] return addr !== undefined && addr !== PENDING } export type ContractAddresses = typeof LUX_MAINNET_CONTRACTS