Problem
Explorer.Market.Fetcher.TokenList reads the chain ID from:
chain_id: [:explorer, :chain_id]
but config/runtime.exs currently assigns CHAIN_ID only to :block_scout_web and :indexer. It does not set config :explorer, chain_id: ....
As a result, a deployment with both CHAIN_ID and TOKEN_LIST_URL set logs:
Token list: CHAIN_ID is not set, importing all tokens from the list
and skips the intended chainId filter.
Live evidence
Robinhood Chain has CHAIN_ID=4663 and imported CoinGecko’s chain-specific list successfully, but the warning was emitted at startup. The current URL contains only chain 4663, so production data is correct; a multi-chain token list could import unrelated contracts.
Suggested fix
Expose the existing CHAIN_ID value under the Explorer application runtime config, for example:
config :explorer, chain_id: System.get_env("CHAIN_ID")
Keep the existing token-list tests and add a runtime configuration assertion or test that proves CHAIN_ID reaches Explorer.Market.Fetcher.TokenList.
Problem
Explorer.Market.Fetcher.TokenListreads the chain ID from:but
config/runtime.exscurrently assignsCHAIN_IDonly to:block_scout_weband:indexer. It does not setconfig :explorer, chain_id: ....As a result, a deployment with both
CHAIN_IDandTOKEN_LIST_URLset logs:and skips the intended
chainIdfilter.Live evidence
Robinhood Chain has
CHAIN_ID=4663and imported CoinGecko’s chain-specific list successfully, but the warning was emitted at startup. The current URL contains only chain 4663, so production data is correct; a multi-chain token list could import unrelated contracts.Suggested fix
Expose the existing
CHAIN_IDvalue under the Explorer application runtime config, for example:Keep the existing token-list tests and add a runtime configuration assertion or test that proves
CHAIN_IDreachesExplorer.Market.Fetcher.TokenList.