{"record":{"id":"b17931480046b3ec","repo":"nautechsystems/nautilus_trader","slug":"deployment-manifest-contains-a-duplicate-contract","errorCode":null,"errorMessage":"Deployment manifest contains a duplicate contract address","messagePattern":"Deployment manifest contains a duplicate contract address","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/rpc/verification.rs","lineNumber":1266,"sourceCode":"        \"Deployment manifest chain identity does not match the chain anchor\"\n    );\n    let canonical_manifest = serde_json::to_vec(manifest)\n        .map_err(|_| anyhow::anyhow!(\"Failed to serialize the deployment manifest\"))?;\n    anyhow::ensure!(\n        keccak256(canonical_manifest) == manifest_digest,\n        \"Deployment manifest digest does not match its canonical content\"\n    );\n    anyhow::ensure!(\n        !manifest.contracts.is_empty() && !manifest.tokens.is_empty() && !manifest.pools.is_empty(),\n        \"Deployment manifest contracts, tokens, and pools are required\"\n    );\n    let mut contract_addresses = HashSet::new();\n    let mut roles = HashSet::new();\n\n    for contract in &manifest.contracts {\n        let address = Address::from_str(&contract.address)\n            .map_err(|_| anyhow::anyhow!(\"Deployment manifest contains an invalid address\"))?;\n        anyhow::ensure!(\n            contract_addresses.insert(address),\n            \"Deployment manifest contains a duplicate contract address\"\n        );\n        roles.insert(contract.role);\n        let code_hash = B256::from_str(&contract.runtime_code_hash)\n            .map_err(|_| anyhow::anyhow!(\"Deployment manifest contains an invalid code hash\"))?;\n        anyhow::ensure!(\n            code_hash != B256::ZERO,\n            \"Manifest code hashes must be nonzero\"\n        );\n        anyhow::ensure!(\n            matches!(contract.role, BlockchainContractRole::Implementation)\n                || !contract.probes.is_empty(),\n            \"Every deployed contract role requires at least one identity probe\"\n        );\n\n        if let Some(proxy) = &contract.proxy {\n            anyhow::ensure!(","sourceCodeStart":1248,"sourceCodeEnd":1284,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/rpc/verification.rs#L1248-L1284","documentation":"Deployment manifest verification found the same contract address listed more than once; each deployed contract must be unique, so the duplicate breaks the manifest's integrity guarantee and verification aborts.","triggerScenarios":"Thrown at crates/adapters/blockchain/src/rpc/verification.rs:1266 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Deduplicate the contract entries in the manifest","Regenerate the manifest without duplicate contracts"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}