{"record":{"id":"16f86b886749120e","repo":"nautechsystems/nautilus_trader","slug":"missing-data-in-flash-event-log","errorCode":null,"errorMessage":"Missing data in flash event log","messagePattern":"Missing data in flash event log","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/exchanges/parsing/uniswap_v3/flash.rs","lineNumber":102,"sourceCode":"        );\n        let pool_identifier = PoolIdentifier::Address(Ustr::from(&pool_address.to_string()));\n\n        Ok(FlashEvent::new(\n            dex,\n            pool_identifier,\n            extract_block_number(log)?,\n            extract_transaction_hash(log)?,\n            extract_transaction_index(log)?,\n            extract_log_index(log)?,\n            sender,\n            recipient,\n            decoded.amount0,\n            decoded.amount1,\n            decoded.paid0,\n            decoded.paid1,\n        ))\n    } else {\n        anyhow::bail!(\"Missing data in flash event log\");\n    }\n}\n\n/// Parses a flash event from an RPC log.\n///\n/// # Errors\n///\n/// Returns an error if the log parsing fails or if the event data is invalid.\npub fn parse_flash_event_rpc(dex: SharedDex, log: &RpcLog) -> anyhow::Result<FlashEvent> {\n    rpc_log::validate_event_signature(log, FLASH_EVENT_SIGNATURE_HASH, \"Flash\")?;\n\n    let sender = rpc_log::extract_address_from_topic(log, 1, \"sender\")?;\n    let recipient = rpc_log::extract_address_from_topic(log, 2, \"recipient\")?;\n\n    let data_bytes = rpc_log::extract_data_bytes(log)?;\n\n    // Validate if data contains 4 parameters of 32 bytes each\n    if data_bytes.len() < 4 * 32 {","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/exchanges/parsing/uniswap_v3/flash.rs#L84-L120","documentation":"Thrown by parse_flash_event_hypersync when the hypersync log's data field is None. A Flash event always carries four non-indexed parameters in data, so a log without data cannot be parsed and the parser bails instead of decoding.","triggerScenarios":"log.data is None when the parser reaches the else branch — the hypersync query omitted the data field, or the log matched only on address/topics.","commonSituations":"Hypersync query field selection missing log.data; events from the same pool address that are not Flash; fixtures without data in test_parse_flash_event_hypersync.","solutions":["Include the data field in the hypersync log query selection.","Filter by the Flash topic0 so only events that must carry data are parsed.","Skip logs with log.data.is_none() before invoking the parser.","Update fixtures to include 128 bytes of data."],"exampleFix":"// before\nparse_flash_event_hypersync(dex, log)?;\n// after\nif log.data.is_none() {\n    continue; // skip dataless logs\n}\nparse_flash_event_hypersync(dex, log)?;","handlingStrategy":"type-guard","validationCode":"if log.data.is_none() {\n    return Ok(None); // skip dataless logs\n}","typeGuard":"fn has_data(log: &HypersyncLog) -> bool {\n    log.data.as_ref().map(|d| !d.is_empty()).unwrap_or(false)\n}","tryCatchPattern":"match parse_flash_event_hypersync(dex, &log) {\n    Ok(event) => handle(event),\n    Err(e) if e.to_string().contains(\"Missing data in flash event log\") => Ok(None),\n    Err(e) => return Err(e),\n}","preventionTips":["Request the data field in every hypersync log query","Filter by the Flash topic0 — Flash events always carry data","Drop dataless logs at ingestion before parsing","Include data payloads in test fixtures"],"tags":["blockchain","uniswap-v3","hypersync","missing-data"],"backgroundTag":"missing-required-argument","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"}