nautechsystems/nautilus_trader · error · anyhow::Error

No registered Uniswap V3 deployment for chain {}

Error message

No registered Uniswap V3 deployment for chain {}

What it means

The validator looks up the registered Uniswap V3 deployment for the configured chain via `crate::exchanges::get_dex_extended(config.chain.name, &DexType::UniswapV3)` and maps `None` to this error. It means the chain named in the config has no known Uniswap V3 deployment registered in the library's exchange registry, so there is no factory to validate the manifest against.

Source

Thrown at crates/adapters/blockchain/src/execution/client.rs:407

            );
            Ok(*addresses.iter().next().expect("singleton role address"))
        };

        let configured_routers = routers.iter().copied().collect::<HashSet<_>>();
        anyhow::ensure!(
            role_addresses(BlockchainContractRole::Router)? == configured_routers,
            "Deployment manifest router set does not match `router_addresses`"
        );
        anyhow::ensure!(
            singleton(BlockchainContractRole::WrappedNative, "wrapped native")? == weth,
            "Deployment manifest wrapped native contract does not match `weth_address`"
        );
        let factory = singleton(BlockchainContractRole::Factory, "factory")?;
        let registered_factory =
            crate::exchanges::get_dex_extended(config.chain.name, &DexType::UniswapV3)
                .map(|dex| dex.factory)
                .ok_or_else(|| {
                    anyhow::anyhow!(
                        "No registered Uniswap V3 deployment for chain {}",
                        config.chain.name
                    )
                })?;
        anyhow::ensure!(
            factory == registered_factory,
            "Deployment manifest factory does not match the registered Uniswap V3 factory"
        );
        let quote_contract = singleton(BlockchainContractRole::Quote, "quote")?;

        let mut token_decimals = HashMap::new();

        for token in &manifest.tokens {
            let address = Address::from_str(&token.address)
                .map_err(|_| anyhow::anyhow!("Deployment manifest token address is invalid"))?;
            anyhow::ensure!(
                token_decimals.insert(address, token.decimals).is_none(),
                "Deployment manifest contains a duplicate token identity"

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Correct `config.chain.name` to a supported chain name registered in the exchange registry
  2. Upgrade the library/adapters crate to a version that registers Uniswap V3 support for the target chain
  3. Register or extend the DEX deployment entry for the chain if the registry is locally extensible

Example fix

// before
chain.name = "etherum"
// after
chain.name = "ethereum"
Defensive patterns

Strategy: validation

Validate before calling

// Before constructing the client, check registry support:
assert!(crate::exchanges::get_dex_extended(config.chain.name, &DexType::UniswapV3).is_some(),
        "chain {} has no registered Uniswap V3 deployment", config.chain.name);

Prevention

When it happens

Trigger: Running `validate_manifest_contracts` with a `config.chain.name` that is misspelled, unsupported, or absent from the exchange registry — `get_dex_extended` returns `None` and `ok_or_else` produces this error.

Common situations: Typo in the chain name in config (e.g. 'etherum'); using a brand-new or private L2 chain the adapter has not registered; a version of the library that predates support for the target chain; using a chain alias the registry does not recognize.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/af6e27d2e4407d13. Report an issue: GitHub.