nautechsystems/nautilus_trader · error · anyhow::Error

Configured token has no deployment manifest identity

Error message

Configured token {address} has no deployment manifest identity

What it means

When `config.tokens` is set, the validator resolves each configured token address and checks it against the manifest's token table with `token_decimals.contains_key(&address)`. This error means a token configured on the client has no corresponding entry in the deployment manifest, so the library cannot know its decimals or identity and refuses to start.

Solutions

  1. Add the missing token (address and decimals) to the deployment manifest's `tokens` array
  2. Remove the token from `config.tokens` if it is not part of this deployment
  3. Regenerate both config and manifest from the same deployment to keep them in sync

Example fix

// before: config.tokens includes 0xNEW... but manifest.tokens does not
// after: add to manifest.tokens
{"symbol": "NEW", "address": "0xNEW...", "decimals": 18}
Defensive patterns

Strategy: validation

Validate before calling

let manifest_addrs: HashSet<Address> = manifest.tokens.iter()
    .filter_map(|t| Address::from_str(&t.address).ok())
    .collect();
for t in config.tokens.iter().flatten() {
    let a = validate_address(t)?;
    if !manifest_addrs.contains(&a) { return Err(format!("token {a} missing from manifest")); }
}

Prevention

When it happens

Trigger: Client initialization with `config.tokens` containing an address (validated by `validate_address`) that is absent from `manifest.tokens` — e.g. a token added to config but not the deployment manifest.

Common situations: Adding a newly listed token to the client config without updating the deployment manifest; a config from a different deployment/chain than the manifest; a typo causing the configured address to differ slightly from the manifest entry.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


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

Appendix: source

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

        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"
            );
        }
        anyhow::ensure!(
            token_decimals.contains_key(&weth),
            "Deployment manifest has no wrapped native token identity"
        );

        if let Some(tokens) = &config.tokens {
            for token in tokens {
                let address = validate_address(token)?;
                anyhow::ensure!(
                    token_decimals.contains_key(&address),
                    "Configured token {address} has no deployment manifest identity"
                );
            }
        }

        for (token_in, token_out) in config.allowed_token_pairs.as_deref().unwrap_or_default() {
            let token_in = validate_address(token_in)?;
            let token_out = validate_address(token_out)?;
            anyhow::ensure!(
                token_in != token_out
                    && token_decimals.contains_key(&token_in)
                    && token_decimals.contains_key(&token_out),
                "Allowed token pair {token_in} -> {token_out} is not fully pinned by the deployment manifest"
            );
        }

        for limit in config.quote_spend_limits.as_deref().unwrap_or_default() {

View on GitHub (pinned to 18893faf8b)