{"record":{"id":"c39821f5b6516b8e","repo":"nautechsystems/nautilus_trader","slug":"missing-data-in-pool-created-event-log","errorCode":null,"errorMessage":"Missing data in pool created event log","messagePattern":"Missing data in pool created event log","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/exchanges/parsing/uniswap_v3/pool_created.rs","lineNumber":74,"sourceCode":"        // Extract tick_spacing (first 32 bytes)\n        let tick_spacing_bytes: [u8; 32] = data_bytes[0..32].try_into()?;\n        let tick_spacing = u32::from_be_bytes(tick_spacing_bytes[28..32].try_into()?);\n\n        // Extract pool_address (next 32 bytes)\n        let pool_address_bytes: [u8; 32] = data_bytes[32..64].try_into()?;\n        let pool_address = Address::from_slice(&pool_address_bytes[12..32]);\n\n        Ok(PoolCreatedEvent::new(\n            block_number,\n            token,\n            token1,\n            pool_address,\n            PoolIdentifier::Address(Ustr::from(&pool_address.to_string())), // For V2/V3, pool_identifier = pool_address\n            Some(fee),\n            Some(tick_spacing),\n        ))\n    } else {\n        Err(anyhow::anyhow!(\"Missing data in pool created event log\"))\n    }\n}\n\n/// Parses a pool creation 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_pool_created_event_rpc(log: &RpcLog) -> anyhow::Result<PoolCreatedEvent> {\n    rpc_log::validate_event_signature(log, POOL_CREATED_EVENT_SIGNATURE_HASH, \"PoolCreatedEvent\")?;\n\n    let block_number = rpc_log::extract_block_number(log)?;\n    let token0 = rpc_log::extract_address_from_topic(log, 1, \"token0\")?;\n    let token1 = rpc_log::extract_address_from_topic(log, 2, \"token1\")?;\n\n    // Extract fee from topic3\n    let fee_bytes = rpc_log::extract_topic_bytes(log, 3)?;\n    let fee = core::extract_u32_from_bytes(&fee_bytes)?;","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/exchanges/parsing/uniswap_v3/pool_created.rs#L56-L92","documentation":"parse_pool_created_event_hypersync throws this when the Hypersync-decoded PoolCreated event payload is None, so the fee and tick_spacing values needed to register the new V3 pool cannot be read. The parser already derived the pool address from topics but requires the decoded data for the remaining fields. Without them the pool cannot be identified with its fee tier.","triggerScenarios":"Calling parse_pool_created_event_hypersync with a log whose decoded field is None — topic0 matched the PoolCreated signature but the data section (fee, tickSpacing) was absent, truncated, or failed Hypersync decoding.","commonSituations":"Indexing factory contracts from forks that mimic the event signature; Hypersync ABI registration drift; partial log fetches for older blocks; test fixtures missing the data field.","solutions":["Verify the log's data section contains fee and tickSpacing words (correct for the canonical factory).","Check the Hypersync PoolCreated ABI registration so decoding yields Some(decoded).","Skip and warn on logs with empty data before invoking the parser.","Re-sync the affected block range after fixing ABI/client configuration."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"fn can_parse_pool_created(log: &Log) -> bool {\n    log.data.len() >= 64 // fee, tickSpacing words\n}","typeGuard":"fn has_decoded_pool_created(decoded: &Option<PoolCreatedDecoded>) -> bool {\n    decoded.is_some()\n}","tryCatchPattern":"match parse_pool_created_event_hypersync(&log) {\n    Ok(event) => handle(event),\n    Err(e) if e.to_string().contains(\"Missing data in pool created event log\") => {\n        tracing::warn!(\"skipping malformed pool-created log\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Only index PoolCreated logs from the canonical V3 factory address.","Check the data section holds fee and tickSpacing before parsing.","Verify Hypersync ABI registration after version upgrades.","Monitor skip rates to catch forked/foreign factory events."],"tags":["blockchain","uniswap-v3","log-parsing","hypersync"],"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"}