{"record":{"id":"b612f8b01ef79bc9","repo":"nautechsystems/nautilus_trader","slug":"cached-token-does-not-match-its-deployment-mani","errorCode":null,"errorMessage":"Cached token {} does not match its deployment manifest identity","messagePattern":"Cached token (.+?) does not match its deployment manifest identity","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":4156,"sourceCode":"            && pool.fee == plan.pool.fee.expect(\"validated pool fee\")\n            && factory == plan.factory,\n        \"Cached pool {} does not match its deployment manifest identity\",\n        plan.pool_address\n    );\n\n    for token in [&plan.pool.token0, &plan.pool.token1] {\n        let identities = manifest\n            .tokens\n            .iter()\n            .filter(|identity| Address::from_str(&identity.address).ok() == Some(token.address))\n            .collect::<Vec<_>>();\n        anyhow::ensure!(\n            identities.len() == 1,\n            \"Token {} does not have exactly one deployment manifest identity\",\n            token.address\n        );\n        let identity = identities[0];\n        anyhow::ensure!(\n            identity.name == token.name\n                && identity.symbol == token.symbol\n                && identity.decimals == token.decimals,\n            \"Cached token {} does not match its deployment manifest identity\",\n            token.address\n        );\n        let expected_role = if token.address == plan.pool.get_base_token().address {\n            \"base\"\n        } else {\n            \"quote\"\n        };\n        anyhow::ensure!(\n            matches!(identity.asset_role.as_str(), \"both\") || identity.asset_role == expected_role,\n            \"Token {} is not permitted as the pool {expected_role} asset\",\n            token.address\n        );\n    }\n    Ok(quote_contract)","sourceCodeStart":4138,"sourceCodeEnd":4174,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L4138-L4174","documentation":"Pre-trade plan validation: a token cached in the local pool plan no longer matches the deployment manifest's identity (name/symbol/decimals) for that address, indicating stale or tampered cache state; the plan is rejected.","triggerScenarios":"Thrown at crates/adapters/blockchain/src/execution/client.rs:4156 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Refresh the cached token from the manifest values","Correct whichever source is wrong and re-sync"],"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-14T00:17:10.932Z"}