{"record":{"id":"d7d2bae843fba485","repo":"nautechsystems/nautilus_trader","slug":"deployment-manifest-address-is-invalid","errorCode":null,"errorMessage":"Deployment manifest address is invalid","messagePattern":"Deployment manifest address is invalid","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":380,"sourceCode":"    }\n\n    fn validate_manifest_contracts(\n        config: &BlockchainExecutionClientConfig,\n        routers: &[Address],\n        weth: Address,\n    ) -> anyhow::Result<()> {\n        let verification = config.verification.as_ref().ok_or_else(|| {\n            anyhow::anyhow!(\"Independent Blockchain execution verification is required\")\n        })?;\n        let manifest = &verification.deployment_manifest;\n        let role_addresses = |role| {\n            manifest\n                .contracts\n                .iter()\n                .filter(|contract| contract.role == role)\n                .map(|contract| {\n                    Address::from_str(&contract.address)\n                        .map_err(|_| anyhow::anyhow!(\"Deployment manifest address is invalid\"))\n                })\n                .collect::<anyhow::Result<HashSet<_>>>()\n        };\n        let singleton = |role, description: &str| {\n            let addresses = role_addresses(role)?;\n            anyhow::ensure!(\n                addresses.len() == 1,\n                \"Deployment manifest must contain exactly one {description} contract\"\n            );\n            Ok(*addresses.iter().next().expect(\"singleton role address\"))\n        };\n\n        let configured_routers = routers.iter().copied().collect::<HashSet<_>>();\n        anyhow::ensure!(\n            role_addresses(BlockchainContractRole::Router)? == configured_routers,\n            \"Deployment manifest router set does not match `router_addresses`\"\n        );\n        anyhow::ensure!(","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L362-L398","documentation":"This error is thrown by `validate_manifest_contracts` when a contract address in the deployment manifest cannot be parsed into an `alloy_primitives::Address` via `Address::from_str`. The library requires all manifest contract addresses to be well-formed 20-byte Ethereum addresses (typically 0x-prefixed hex, checksum-sensitive for `Address::from_str` which requires exactly 40 hex chars). It aborts validation early so a malformed manifest never reaches contract binding.","triggerScenarios":"Calling the client initialization path that runs `validate_manifest_contracts` (e.g. building the blockchain execution client from a deployment manifest) where any entry in `manifest.contracts` has an `address` string that `Address::from_str` rejects: empty string, missing `0x` prefix, wrong length, non-hex characters, or wrong checksum casing.","commonSituations":"Hand-edited deployment manifest JSON with a typo in a contract address; copying an address from a different chain's deployment; truncating or padding an address; using a placeholder like `<ROUTER_ADDRESS>`; addresses stored without the 0x prefix or with EIP-55 checksum case mixed incorrectly.","solutions":["Open the deployment manifest and fix the malformed `contracts[].address` so it is a valid 0x-prefixed 40-hex-character Ethereum address","Regenerate the deployment manifest from the authoritative deployment output instead of hand-editing it","Validate every address with `Address::from_str` (or a checksum tool) before loading the manifest"],"exampleFix":"// before (manifest.contracts)\n{\"role\": \"Router\", \"address\": \"0xabc123\"}\n// after\n{\"role\": \"Router\", \"address\": \"0xE592427A0AEce92De3Edee1F18E0157C05861564\"}","handlingStrategy":"validation","validationCode":"use alloy_primitives::Address;\nuse std::str::FromStr;\nfn valid_manifest_addresses(contracts: &[ContractEntry]) -> Result<(), String> {\n    for c in contracts {\n        Address::from_str(&c.address).map_err(|e| format!(\"invalid contract address {:?}: {e}\", c.address))?;\n    }\n    Ok(())\n}","typeGuard":"fn is_valid_address(s: &str) -> bool { Address::from_str(s).is_ok() }","tryCatchPattern":null,"preventionTips":["Keep addresses 0x-prefixed, 40 hex characters, correct EIP-55 checksum","Regenerate manifests from deployment tooling, never hand-edit addresses","Run Address::from_str over the whole manifest in tests/CI before deployment"],"tags":["rust","config","ethereum","validation"],"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-14T00:17:10.932Z"}