{"record":{"id":"2ffe59e9bc1d28a7","repo":"nautechsystems/nautilus_trader","slug":"deployment-manifest-pool-quote-contract-is-invalid","errorCode":null,"errorMessage":"Deployment manifest pool quote contract is invalid","messagePattern":"Deployment manifest pool quote contract is invalid","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":470,"sourceCode":"        }\n\n        for limit in config.quote_spend_limits.as_deref().unwrap_or_default() {\n            let spend_token = validate_address(&limit.spend_token)?;\n            anyhow::ensure!(\n                token_decimals.get(&spend_token) == Some(&limit.spend_token_decimals),\n                \"Quote spend limit decimals do not match the deployment manifest\"\n            );\n        }\n\n        let pool_contracts = role_addresses(BlockchainContractRole::Pool)?;\n\n        for pool in &manifest.pools {\n            let pool_address = Address::from_str(&pool.address)\n                .map_err(|_| anyhow::anyhow!(\"Deployment manifest pool address is invalid\"))?;\n            let pool_factory = Address::from_str(&pool.factory)\n                .map_err(|_| anyhow::anyhow!(\"Deployment manifest pool factory is invalid\"))?;\n            let pool_quote = Address::from_str(&pool.quote_contract).map_err(|_| {\n                anyhow::anyhow!(\"Deployment manifest pool quote contract is invalid\")\n            })?;\n            anyhow::ensure!(\n                pool_contracts.contains(&pool_address)\n                    && pool_factory == factory\n                    && pool_quote == quote_contract,\n                \"Deployment manifest pool does not use the pinned pool, factory, and quote identities\"\n            );\n        }\n        Ok(())\n    }\n\n    async fn fetch_native_currency_balance(&self) -> anyhow::Result<Money> {\n        let balance_u256 = self\n            .http_rpc_client\n            .get_balance_with_timeout(&self.wallet_address, None, Some(EXECUTION_RPC_TIMEOUT_SECS))\n            .await?;\n\n        let native_currency = self.chain.native_currency();","sourceCodeStart":452,"sourceCodeEnd":488,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L452-L488","documentation":"validate_manifest_contracts found a pool in the deployment manifest whose configured quote contract does not resolve to a valid address under the expected contract role; the manifest and on-chain role assignment disagree, so contract validation fails before the client will operate.","triggerScenarios":"Calling preflight/validate_manifest_contracts where a manifest.pools[].quote_contract string fails Address::from_str.","commonSituations":"Malformed or placeholder quote-contract address in the manifest; copy-paste truncation; quote contract field left empty after scaffold generation.","solutions":["Correct pool.quote_contract in the manifest to a valid hex address","Populate from the pinned quote contract deployment record","Add a pre-commit lint that validates all manifest addresses"],"exampleFix":"// before\nquote_contract = \"0xQUOTE\"\n// after\nquote_contract = \"0xabcdefabcdefabcdefabcdefabcdefabcdefabcd\"","handlingStrategy":"validation","validationCode":"assert!(is_valid_address(&pool.quote_contract), \"invalid quote contract address in manifest\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Populate quote_contract from deployment records programmatically","Add manifest schema validation (regex for address fields) in CI","Never leave placeholder strings in shipped manifests"],"tags":["validation","manifest","address"],"backgroundTag":"invalid-argument-format","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}