mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
Restore the chain prefix the running nodes answer
The rename to /v1/chain is real in luxd source, but the deployed fleet has not taken it yet: probed just now, api.lux.network, api.lux-test.network, api.zoo.network and api.hanzo.network each answer 200 on /v1/bc/C/rpc and 404 on /v1/chain/C/rpc. Composing /v1/chain against those hosts reaches nothing, which is the failure the rename set out to prevent. The move belongs with the node redeploy, not ahead of it.
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ NEXT_PUBLIC_NETWORK_ID=96369
|
||||
NEXT_PUBLIC_NETWORK_CURRENCY_NAME=LUX
|
||||
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=LUX
|
||||
NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS=18
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL=https://api.lux.network/v1/chain/C/rpc
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL=https://api.lux.network/v1/bc/C/rpc
|
||||
|
||||
# API
|
||||
NEXT_PUBLIC_API_HOST=api-explore.lux.network
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=wss
|
||||
NEXT_PUBLIC_APP_HOST=explore.lux.network
|
||||
NEXT_PUBLIC_APP_PROTOCOL=https
|
||||
NEXT_PUBLIC_IS_TESTNET=false
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL=https://api.lux.network/v1/chain/C/rpc
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL=https://api.lux.network/v1/bc/C/rpc
|
||||
|
||||
# Branding — intentionally left unset for multi-tenant.
|
||||
# Each chain uses text-based branding from chainRegistry.ts.
|
||||
|
||||
+3
-3
@@ -34,9 +34,9 @@ services:
|
||||
environment:
|
||||
DATABASE_URL: postgresql://blockscout:blockscout@postgres:5432/blockscout
|
||||
REDIS_URL: redis://redis:6379
|
||||
ETHEREUM_JSONRPC_HTTP_URL: http://127.0.0.1:9650/v1/chain/dnmzhuf6poM6PUNQCe7MWWfBdTJEnddhHRNXz2x7H6qSmyBEJ/rpc
|
||||
ETHEREUM_JSONRPC_TRACE_URL: http://127.0.0.1:9650/v1/chain/dnmzhuf6poM6PUNQCe7MWWfBdTJEnddhHRNXz2x7H6qSmyBEJ/rpc
|
||||
ETHEREUM_JSONRPC_WS_URL: ws://127.0.0.1:9650/v1/chain/dnmzhuf6poM6PUNQCe7MWWfBdTJEnddhHRNXz2x7H6qSmyBEJ/ws
|
||||
ETHEREUM_JSONRPC_HTTP_URL: http://127.0.0.1:9650/v1/bc/dnmzhuf6poM6PUNQCe7MWWfBdTJEnddhHRNXz2x7H6qSmyBEJ/rpc
|
||||
ETHEREUM_JSONRPC_TRACE_URL: http://127.0.0.1:9650/v1/bc/dnmzhuf6poM6PUNQCe7MWWfBdTJEnddhHRNXz2x7H6qSmyBEJ/rpc
|
||||
ETHEREUM_JSONRPC_WS_URL: ws://127.0.0.1:9650/v1/bc/dnmzhuf6poM6PUNQCe7MWWfBdTJEnddhHRNXz2x7H6qSmyBEJ/ws
|
||||
CHAIN_ID: 96369
|
||||
COIN: LUX
|
||||
NETWORK: LUX Network
|
||||
|
||||
@@ -79,7 +79,7 @@ export interface ChainEntry {
|
||||
readonly apiUrl: string;
|
||||
|
||||
/**
|
||||
* Origin of the chain's own node API, where `<origin>/v1/chain/P` answers
|
||||
* Origin of the chain's own node API, where `<origin>/v1/bc/P` answers
|
||||
* platform.* — NOT the indexer at `apiUrl`. Every sovereign L1 runs its own
|
||||
* P-Chain and its own validator set, so this is what makes a validator count
|
||||
* readable per chain.
|
||||
|
||||
@@ -28,7 +28,7 @@ data:
|
||||
NEXT_PUBLIC_IS_TESTNET: "false"
|
||||
NEXT_PUBLIC_API_HOST: api-explore.lux.network
|
||||
NEXT_PUBLIC_APP_HOST: explore.lux.network
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.lux.network/v1/chain/C/rpc
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.lux.network/v1/bc/C/rpc
|
||||
NEXT_PUBLIC_STATS_API_HOST: https://api-explore.lux.network
|
||||
NEXT_PUBLIC_VISUALIZE_API_HOST: https://api-explore.lux.network
|
||||
NEXT_PUBLIC_CONTRACT_INFO_API_HOST: https://api-explore.lux.network
|
||||
@@ -70,7 +70,7 @@ data:
|
||||
NEXT_PUBLIC_IS_TESTNET: "false"
|
||||
NEXT_PUBLIC_API_HOST: api-explore.zoo.network
|
||||
NEXT_PUBLIC_APP_HOST: explore.zoo.network
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.zoo.network/v1/chain/C/rpc
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.zoo.network/v1/bc/C/rpc
|
||||
NEXT_PUBLIC_STATS_API_HOST: https://api-explore.zoo.network
|
||||
NEXT_PUBLIC_VISUALIZE_API_HOST: https://api-explore.zoo.network
|
||||
NEXT_PUBLIC_CONTRACT_INFO_API_HOST: https://api-explore.zoo.network
|
||||
@@ -105,7 +105,7 @@ data:
|
||||
NEXT_PUBLIC_IS_TESTNET: "false"
|
||||
NEXT_PUBLIC_API_HOST: api-explore.hanzo.network
|
||||
NEXT_PUBLIC_APP_HOST: explore.hanzo.network
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.hanzo.network/v1/chain/C/rpc
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.hanzo.network/v1/bc/C/rpc
|
||||
NEXT_PUBLIC_STATS_API_HOST: https://api-explore.hanzo.network
|
||||
NEXT_PUBLIC_VISUALIZE_API_HOST: https://api-explore.hanzo.network
|
||||
NEXT_PUBLIC_CONTRACT_INFO_API_HOST: https://api-explore.hanzo.network
|
||||
@@ -139,7 +139,7 @@ data:
|
||||
NEXT_PUBLIC_IS_TESTNET: "false"
|
||||
NEXT_PUBLIC_API_HOST: api-explore.pars.network
|
||||
NEXT_PUBLIC_APP_HOST: explore.pars.network
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.pars.network/v1/chain/C/rpc
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.pars.network/v1/bc/C/rpc
|
||||
NEXT_PUBLIC_STATS_API_HOST: https://api-explore.pars.network
|
||||
NEXT_PUBLIC_VISUALIZE_API_HOST: https://api-explore.pars.network
|
||||
NEXT_PUBLIC_CONTRACT_INFO_API_HOST: https://api-explore.pars.network
|
||||
|
||||
@@ -13,7 +13,7 @@ data:
|
||||
NEXT_PUBLIC_IS_TESTNET: "true"
|
||||
NEXT_PUBLIC_API_HOST: api-explorer.lux-test.network
|
||||
NEXT_PUBLIC_APP_HOST: explorer.lux-test.network
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.lux-test.network/v1/chain/C/rpc
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.lux-test.network/v1/bc/C/rpc
|
||||
NEXT_PUBLIC_STATS_API_HOST: https://api-explorer.lux-test.network
|
||||
NEXT_PUBLIC_VISUALIZE_API_HOST: https://api-explorer.lux-test.network
|
||||
NEXT_PUBLIC_CONTRACT_INFO_API_HOST: https://api-explorer.lux-test.network
|
||||
@@ -30,7 +30,7 @@ data:
|
||||
NEXT_PUBLIC_IS_TESTNET: "true"
|
||||
NEXT_PUBLIC_API_HOST: api-explorer.zoo-test.network
|
||||
NEXT_PUBLIC_APP_HOST: explorer.zoo-test.network
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.zoo-test.network/v1/chain/C/rpc
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.zoo-test.network/v1/bc/C/rpc
|
||||
NEXT_PUBLIC_STATS_API_HOST: https://api-explorer.zoo-test.network
|
||||
NEXT_PUBLIC_VISUALIZE_API_HOST: https://api-explorer.zoo-test.network
|
||||
NEXT_PUBLIC_CONTRACT_INFO_API_HOST: https://api-explorer.zoo-test.network
|
||||
@@ -50,7 +50,7 @@ data:
|
||||
NEXT_PUBLIC_IS_TESTNET: "true"
|
||||
NEXT_PUBLIC_API_HOST: api-explorer.hanzo-test.network
|
||||
NEXT_PUBLIC_APP_HOST: explorer.hanzo-test.network
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.hanzo-test.network/v1/chain/C/rpc
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.hanzo-test.network/v1/bc/C/rpc
|
||||
NEXT_PUBLIC_STATS_API_HOST: https://api-explorer.hanzo-test.network
|
||||
NEXT_PUBLIC_VISUALIZE_API_HOST: https://api-explorer.hanzo-test.network
|
||||
NEXT_PUBLIC_CONTRACT_INFO_API_HOST: https://api-explorer.hanzo-test.network
|
||||
@@ -69,7 +69,7 @@ data:
|
||||
NEXT_PUBLIC_IS_TESTNET: "true"
|
||||
NEXT_PUBLIC_API_HOST: api-explorer.pars-test.network
|
||||
NEXT_PUBLIC_APP_HOST: explorer.pars-test.network
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.pars-test.network/v1/chain/C/rpc
|
||||
NEXT_PUBLIC_NETWORK_RPC_URL: https://api.pars-test.network/v1/bc/C/rpc
|
||||
NEXT_PUBLIC_STATS_API_HOST: https://api-explorer.pars-test.network
|
||||
NEXT_PUBLIC_VISUALIZE_API_HOST: https://api-explorer.pars-test.network
|
||||
NEXT_PUBLIC_CONTRACT_INFO_API_HOST: https://api-explorer.pars-test.network
|
||||
|
||||
@@ -50,7 +50,7 @@ spec:
|
||||
- name: NEXT_PUBLIC_IS_TESTNET
|
||||
value: "true"
|
||||
- name: NEXT_PUBLIC_NETWORK_RPC_URL
|
||||
value: "https://api.lux-dev.network/v1/chain/C/rpc"
|
||||
value: "https://api.lux-dev.network/v1/bc/C/rpc"
|
||||
- name: NEXT_PUBLIC_COLOR_THEME_DEFAULT
|
||||
value: "dark"
|
||||
- name: NEXT_PUBLIC_HOMEPAGE_CHARTS
|
||||
|
||||
@@ -50,7 +50,7 @@ spec:
|
||||
- name: NEXT_PUBLIC_IS_TESTNET
|
||||
value: "true"
|
||||
- name: NEXT_PUBLIC_NETWORK_RPC_URL
|
||||
value: "https://api.lux-test.network/v1/chain/C/rpc"
|
||||
value: "https://api.lux-test.network/v1/bc/C/rpc"
|
||||
- name: NEXT_PUBLIC_COLOR_THEME_DEFAULT
|
||||
value: "dark"
|
||||
- name: NEXT_PUBLIC_HOMEPAGE_CHARTS
|
||||
|
||||
@@ -41,7 +41,7 @@ NETWORK_SHORT_NAME=LUX
|
||||
NETWORK_ID=96369
|
||||
NETWORK_CURRENCY_NAME=LUX
|
||||
NETWORK_CURRENCY_SYMBOL=LUX
|
||||
NETWORK_RPC_URL=https://api.lux.network/v1/chain/C/rpc
|
||||
NETWORK_RPC_URL=https://api.lux.network/v1/bc/C/rpc
|
||||
API_HOST=api-explore.lux.network
|
||||
APP_HOST=explore.lux.network
|
||||
NETWORK_ORG_NAME=Lux Industries Inc.
|
||||
@@ -61,7 +61,7 @@ NETWORK_SHORT_NAME=LUX
|
||||
NETWORK_ID=96368
|
||||
NETWORK_CURRENCY_NAME=LUX
|
||||
NETWORK_CURRENCY_SYMBOL=LUX
|
||||
NETWORK_RPC_URL=https://api.lux-test.network/v1/chain/C/rpc
|
||||
NETWORK_RPC_URL=https://api.lux-test.network/v1/bc/C/rpc
|
||||
API_HOST=api-explorer.lux-test.network
|
||||
APP_HOST=explorer.lux-test.network
|
||||
NETWORK_ORG_NAME=Lux Industries Inc.
|
||||
@@ -81,7 +81,7 @@ NETWORK_SHORT_NAME=ZOO
|
||||
NETWORK_ID=200200
|
||||
NETWORK_CURRENCY_NAME=Zoo
|
||||
NETWORK_CURRENCY_SYMBOL=ZOO
|
||||
NETWORK_RPC_URL=https://api.zoo.network/v1/chain/C/rpc
|
||||
NETWORK_RPC_URL=https://api.zoo.network/v1/bc/C/rpc
|
||||
API_HOST=api-explore.zoo.network
|
||||
APP_HOST=explore.zoo.network
|
||||
NETWORK_ORG_NAME=Zoo Labs Foundation
|
||||
@@ -101,7 +101,7 @@ NETWORK_SHORT_NAME=ZOO
|
||||
NETWORK_ID=200201
|
||||
NETWORK_CURRENCY_NAME=Zoo
|
||||
NETWORK_CURRENCY_SYMBOL=ZOO
|
||||
NETWORK_RPC_URL=https://api.zoo-test.network/v1/chain/C/rpc
|
||||
NETWORK_RPC_URL=https://api.zoo-test.network/v1/bc/C/rpc
|
||||
API_HOST=api-explorer.zoo-test.network
|
||||
APP_HOST=explorer.zoo-test.network
|
||||
NETWORK_ORG_NAME=Zoo Labs Foundation
|
||||
@@ -121,7 +121,7 @@ NETWORK_SHORT_NAME=AI
|
||||
NETWORK_ID=36963
|
||||
NETWORK_CURRENCY_NAME=AI
|
||||
NETWORK_CURRENCY_SYMBOL=AI
|
||||
NETWORK_RPC_URL=https://api.hanzo.network/v1/chain/C/rpc
|
||||
NETWORK_RPC_URL=https://api.hanzo.network/v1/bc/C/rpc
|
||||
API_HOST=api-explore.hanzo.network
|
||||
APP_HOST=explore.hanzo.network
|
||||
NETWORK_ORG_NAME=Hanzo AI Inc.
|
||||
@@ -141,7 +141,7 @@ NETWORK_SHORT_NAME=AI
|
||||
NETWORK_ID=36962
|
||||
NETWORK_CURRENCY_NAME=AI
|
||||
NETWORK_CURRENCY_SYMBOL=AI
|
||||
NETWORK_RPC_URL=https://api.hanzo-test.network/v1/chain/C/rpc
|
||||
NETWORK_RPC_URL=https://api.hanzo-test.network/v1/bc/C/rpc
|
||||
API_HOST=api-explorer.hanzo-test.network
|
||||
APP_HOST=explorer.hanzo-test.network
|
||||
NETWORK_ORG_NAME=Hanzo AI Inc.
|
||||
@@ -161,7 +161,7 @@ NETWORK_SHORT_NAME=PARS
|
||||
NETWORK_ID=494949
|
||||
NETWORK_CURRENCY_NAME=Pars
|
||||
NETWORK_CURRENCY_SYMBOL=PARS
|
||||
NETWORK_RPC_URL=https://api.pars.network/v1/chain/C/rpc
|
||||
NETWORK_RPC_URL=https://api.pars.network/v1/bc/C/rpc
|
||||
API_HOST=api-explore.pars.network
|
||||
APP_HOST=explore.pars.network
|
||||
NETWORK_ORG_NAME=Pars DAO
|
||||
@@ -181,7 +181,7 @@ NETWORK_SHORT_NAME=PARS
|
||||
NETWORK_ID=494950
|
||||
NETWORK_CURRENCY_NAME=Pars
|
||||
NETWORK_CURRENCY_SYMBOL=PARS
|
||||
NETWORK_RPC_URL=https://api.pars-test.network/v1/chain/C/rpc
|
||||
NETWORK_RPC_URL=https://api.pars-test.network/v1/bc/C/rpc
|
||||
API_HOST=api-explorer.pars-test.network
|
||||
APP_HOST=explorer.pars-test.network
|
||||
NETWORK_ORG_NAME=Pars DAO
|
||||
|
||||
@@ -9,7 +9,7 @@ const HEIGHTS_QUERY_KEY = 'pchain:chainHeights' as const;
|
||||
|
||||
async function fetchChainHeights(): Promise<{ pChain: number; cChain: number }> {
|
||||
// NEXT_PUBLIC_NETWORK_RPC_URL IS the C-chain EVM RPC endpoint (canonical
|
||||
// `/v1/chain/C/rpc` on the gateway). Dial it directly — no path rewriting — so
|
||||
// `/v1/bc/C/rpc` on the gateway). Dial it directly — no path rewriting — so
|
||||
// the C-chain height works regardless of the gateway path scheme.
|
||||
const cChainRpcUrl = getEnvValue('NEXT_PUBLIC_NETWORK_RPC_URL') ?? '';
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export function app(isPrivateMode = false): CspDev.DirectiveDescriptor {
|
||||
...Object.values(config.apis).filter(Boolean).map((api) => api.endpoint),
|
||||
...Object.values(config.apis).filter(Boolean).map((api) => api.socketEndpoint),
|
||||
|
||||
// chain RPC server (full URLs + base origins for SDK calls to other paths like /v1/chain/P)
|
||||
// chain RPC server (full URLs + base origins for SDK calls to other paths like /v1/bc/P)
|
||||
...config.chain.rpcUrls,
|
||||
...config.chain.rpcUrls.map((url) => {
|
||||
try {
|
||||
|
||||
@@ -28,7 +28,7 @@ const PATHS: Readonly<Record<string, string>> = {
|
||||
info: '/v1/info',
|
||||
...Object.fromEntries(PRIMARY_VMS.map((vm) => [
|
||||
vm.slug,
|
||||
`/v1/chain/${ vm.slug.charAt(0).toUpperCase() }${ vm.view === 'evm' || vm.view === 'dex' ? '/rpc' : '' }`,
|
||||
`/v1/bc/${ vm.slug.charAt(0).toUpperCase() }${ vm.view === 'evm' || vm.view === 'dex' ? '/rpc' : '' }`,
|
||||
])),
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@ function getChainBase(name: string): string | undefined {
|
||||
}
|
||||
|
||||
// The node's API origin, derived from the chain RPC URL. That URL points at a
|
||||
// specific EVM chain (canonical `…/v1/chain/C/rpc`), so it must be reduced to
|
||||
// specific EVM chain (canonical `…/v1/bc/C/rpc`), so it must be reduced to
|
||||
// scheme+host — concatenating onto the full RPC path produced a malformed URL,
|
||||
// an HTML 404, and "Unexpected non-whitespace character after JSON" on every
|
||||
// non-C-chain brand.
|
||||
|
||||
@@ -116,7 +116,7 @@ def check_port_in_use(port):
|
||||
|
||||
def get_rpc_url(local_port, blockchain_id):
|
||||
"""Build the RPC URL for a chain."""
|
||||
return f"http://localhost:{local_port}/v1/chain/{blockchain_id}/rpc"
|
||||
return f"http://localhost:{local_port}/v1/bc/{blockchain_id}/rpc"
|
||||
|
||||
|
||||
def send_transactions(network_name, net_config, account, tx_count):
|
||||
|
||||
Reference in New Issue
Block a user