{"record":{"id":"aebd7e39d5a22791","repo":"nautechsystems/nautilus_trader","slug":"token-manifest-address-has-no-contract-identity","errorCode":null,"errorMessage":"Token manifest address has no contract identity","messagePattern":"Token manifest address has no contract identity","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/rpc/verification.rs","lineNumber":1356,"sourceCode":"\n    for required in [\n        BlockchainContractRole::Router,\n        BlockchainContractRole::Factory,\n        BlockchainContractRole::WrappedNative,\n        BlockchainContractRole::Quote,\n        BlockchainContractRole::Token,\n        BlockchainContractRole::Pool,\n    ] {\n        anyhow::ensure!(\n            roles.contains(&required),\n            \"Deployment manifest is missing a required role\"\n        );\n    }\n\n    for token in &manifest.tokens {\n        let address = Address::from_str(&token.address)\n            .map_err(|_| anyhow::anyhow!(\"Token manifest address is invalid\"))?;\n        anyhow::ensure!(\n            contract_addresses.contains(&address),\n            \"Token manifest address has no contract identity\"\n        );\n        anyhow::ensure!(\n            !token.name.trim().is_empty()\n                && !token.symbol.trim().is_empty()\n                && matches!(token.asset_role.as_str(), \"base\" | \"quote\" | \"both\"),\n            \"Token manifest identity or asset role is invalid\"\n        );\n    }\n\n    for pool in &manifest.pools {\n        for address in [\n            &pool.address,\n            &pool.token0,\n            &pool.token1,\n            &pool.factory,\n            &pool.quote_contract,","sourceCodeStart":1338,"sourceCodeEnd":1374,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/rpc/verification.rs#L1338-L1374","documentation":"After parsing, the validator requires every manifest token's address to appear in the set of addresses pinned by manifest.contracts — tokens must reference an actual contract entry with a runtime code hash. This error means the token's address parses but has no matching contract entry, so its deployed code is not verified.","triggerScenarios":"Manifest verification where manifest.tokens lists an address absent from manifest.contracts — e.g. adding a token entry without adding its contract entry, or the token contract entry uses a different (typo'd/checksummed differently) address string.","commonSituations":"Hand-adding a new token to the manifest without pinning its contract; address copied with different casing/typo between tokens[] and contracts[]; token address pointing at the wrapper or router rather than the token contract itself.","solutions":["Add a contract entry for the token address with role Token (or the appropriate role) and its runtime_code_hash","Make the token address byte-identical to the address in its contract entry (compare lowercase hex)","Regenerate the manifest programmatically so tokens and contracts are emitted from one source"],"exampleFix":"// before\n\"tokens\": [{\"address\": \"0xabc...\"}], \"contracts\": [/* no 0xabc... */]\n// after\n\"tokens\": [{\"address\": \"0xabc...\"}], \"contracts\": [{\"address\": \"0xabc...\", \"role\": \"token\", \"runtime_code_hash\": \"0x...\"}]","handlingStrategy":"validation","validationCode":"fn tokens_pinned(manifest: &Manifest) -> bool {\n    let pinned: HashSet<Address> = manifest.contracts.iter()\n        .filter_map(|c| Address::from_str(&c.address).ok()).collect();\n    manifest.tokens.iter().all(|t| Address::from_str(&t.address).map(|a| pinned.contains(&a)).unwrap_or(false))\n}","typeGuard":null,"tryCatchPattern":"match validate_manifest(&config) {\n    Err(e) if e.to_string().contains(\"no contract identity\") => {\n        eprintln!(\"add a contract entry for the token address: {e}\");\n    }\n    Err(e) => return Err(e),\n    Ok(v) => v,\n}","preventionTips":["Add the matching contract entry whenever you add a token entry","Compare addresses in lowercase when cross-referencing tokens and contracts","Emit tokens and contracts from a single generation source so they cannot diverge"],"tags":["validation","manifest","consistency"],"backgroundTag":"resource-not-found","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"}