{"record":{"id":"1500097f75ef5aac","repo":"nautechsystems/nautilus_trader","slug":"missing-data-in-the-pool-created-event-log","errorCode":null,"errorMessage":"Missing data in the pool created event log","messagePattern":"Missing data in the pool created event log","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/exchanges/arbitrum/camelot_v3.rs","lineNumber":81,"sourceCode":"    let token1 = extract_address_from_topic(&log, 2, \"token1\")?;\n\n    if let Some(data) = log.data {\n        let data_bytes = data.as_ref();\n\n        // Extract pool address (only 32 bytes)\n        let pool_address = Address::from_slice(&data_bytes[12..32]);\n        let pool_identifier = PoolIdentifier::Address(Ustr::from(&pool_address.to_string()));\n        Ok(PoolCreatedEvent::new(\n            block_number,\n            token,\n            token1,\n            pool_address,\n            pool_identifier,\n            None,\n            None,\n        ))\n    } else {\n        anyhow::bail!(\"Missing data in the pool created event log\")\n    }\n}\n","sourceCodeStart":63,"sourceCodeEnd":84,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/exchanges/arbitrum/camelot_v3.rs#L63-L84","documentation":"parse_camelot_v3_pool_created_event_hypersync parses a HyperSync log for the Camelot V3 PoolCreated event and bails when required fields (e.g. decoded token0/token1/pool address components) are absent from the log. It fails closed rather than fabricating a PoolCreatedEvent with missing data.","triggerScenarios":"Feeding a HypersyncLog to the Camelot V3 pool-created parser when the log is not actually a PoolCreated event, the ABI topic doesn't match, or HyperSync returned a partial/undecoded log missing expected data fields.","commonSituations":"Broad topic filters that match non-PoolCreated logs; HyperSync schema/field-name changes for that event; indexing lag or partial log hydration; copying a parser for the wrong event signature.","solutions":["Filter logs by the exact PoolCreated event topic0 before calling the parser","Verify the HyperSync log contains all expected decoded fields (token0, token1, pool address)","Re-fetch the log range — the partial log may be a transient hydration issue","Confirm the Camelot V3 ABI/event signature used to build the parser matches the deployed contract"],"exampleFix":"// before: parse whatever arrives\nfor log in logs {\n    let ev = dex.parse_pool_created_event_hypersync(log)?;\n    ...\n}\n// after: pre-filter by topic\nlet pool_created_topic0 = camelot_v3_pool_created_topic();\nfor log in logs.iter().filter(|l| l.topics().first() == Some(&pool_created_topic0)) {\n    let ev = dex.parse_pool_created_event_hypersync(log)?;\n    ...\n}","handlingStrategy":"type-guard","validationCode":"let expected_topic0 = camelot_v3_pool_created_topic();\nif log.topics().first() != Some(&expected_topic0) || log.data_missing_fields() {\n    return Ok(None); // not a decodable PoolCreated log\n}","typeGuard":"fn is_decodable_pool_created_log(log: &HypersyncLog, topic0: &B256) -> bool {\n    log.topics().first() == Some(topic0)\n        && log.token0().is_some()\n        && log.token1().is_some()\n        && log.pool_address().is_some()\n}","tryCatchPattern":"match dex.parse_pool_created_event_hypersync(&log) {\n    Ok(ev) => Some(ev),\n    Err(e) if e.to_string().contains(\"Missing data\") => {\n        tracing::warn!(\"skipping partial PoolCreated log at block {}\", log.block_number);\n        None\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Filter HyperSync logs by the exact PoolCreated topic0 before parsing","Verify required decoded fields exist before dispatching to the parser","Keep the event signature/ABI in sync with the deployed Camelot V3 contracts"],"tags":["blockchain","hypersync","event-parsing","camelot","decoding"],"backgroundTag":"schema-validation-failed","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"}