{"record":{"id":"1fcf75d10b38e6b5","repo":"nautechsystems/nautilus_trader","slug":"deployment-manifest-has-no-wrapped-native-token-id","errorCode":null,"errorMessage":"Deployment manifest has no wrapped native token identity","messagePattern":"Deployment manifest has no wrapped native token identity","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":428,"sourceCode":"                    )\n                })?;\n        anyhow::ensure!(\n            factory == registered_factory,\n            \"Deployment manifest factory does not match the registered Uniswap V3 factory\"\n        );\n        let quote_contract = singleton(BlockchainContractRole::Quote, \"quote\")?;\n\n        let mut token_decimals = HashMap::new();\n\n        for token in &manifest.tokens {\n            let address = Address::from_str(&token.address)\n                .map_err(|_| anyhow::anyhow!(\"Deployment manifest token address is invalid\"))?;\n            anyhow::ensure!(\n                token_decimals.insert(address, token.decimals).is_none(),\n                \"Deployment manifest contains a duplicate token identity\"\n            );\n        }\n        anyhow::ensure!(\n            token_decimals.contains_key(&weth),\n            \"Deployment manifest has no wrapped native token identity\"\n        );\n\n        if let Some(tokens) = &config.tokens {\n            for token in tokens {\n                let address = validate_address(token)?;\n                anyhow::ensure!(\n                    token_decimals.contains_key(&address),\n                    \"Configured token {address} has no deployment manifest identity\"\n                );\n            }\n        }\n\n        for (token_in, token_out) in config.allowed_token_pairs.as_deref().unwrap_or_default() {\n            let token_in = validate_address(token_in)?;\n            let token_out = validate_address(token_out)?;\n            anyhow::ensure!(","sourceCodeStart":410,"sourceCodeEnd":446,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L410-L446","documentation":"After building the token table, `validate_manifest_contracts` checks `token_decimals.contains_key(&weth)` and fails with this error when the wrapped-native token address (resolved from the `WrappedNative` role / `weth_address`) is not present among the manifest's token identities. The library requires decimals for the wrapped native token because routing and pricing math depends on it.","triggerScenarios":"Client validation where the manifest's `tokens` array has no entry whose address equals the configured wrapped-native (`weth`) address — the contract entry exists under `contracts` but the corresponding token identity with decimals is missing.","commonSituations":"Creating a manifest for a new chain and forgetting to add WETH/WMATIC to the tokens list; deleting the wrapped-native token row while trimming the manifest; a mismatch where `weth_address` points to a different token than the one listed in `tokens`.","solutions":["Add a `tokens` entry for the wrapped-native address with its correct decimals (18 for WETH on most chains)","Regenerate the manifest so wrapped native is included in the token identities","Verify `weth_address` matches the wrapped-native token actually listed in the manifest"],"exampleFix":"// before: manifest.tokens lacks WETH\n// after\n{\"symbol\": \"WETH\", \"address\": \"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\", \"decimals\": 18}","handlingStrategy":"validation","validationCode":"let weth = config.weth_address;\nassert!(manifest.tokens.iter().any(|t| Address::from_str(&t.address).map(|a| a == weth).unwrap_or(false)),\n        \"manifest.tokens must include the wrapped native token {weth}\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Include wrapped native in the token list template for every chain manifest","Check that weth_address appears in manifest.tokens whenever either changes","Keep wrapped-native decimals (usually 18) in a shared constant table"],"tags":["rust","config","ethereum","validation"],"backgroundTag":"missing-required-config-field","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}