nautechsystems/nautilus_trader · error
Missing data in collect event log
Error message
Missing data in collect event log
What it means
parse_collect_event_hypersync throws this when the Hypersync-decoded Collect event payload is None, so amount0/amount1 and position tick data cannot be assembled into a Collect event. The parser refuses to emit a collect event with missing monetary amounts because those are required domain values. It mirrors the guard pattern used by the other uniswap_v3 event parsers.
Source
Thrown at crates/adapters/blockchain/src/exchanges/parsing/uniswap_v3/collect.rs:117
.as_ref(),
);
let pool_identifier = PoolIdentifier::Address(Ustr::from(&pool_address.to_string()));
Ok(CollectEvent::new(
dex,
pool_identifier,
extract_block_number(log)?,
extract_transaction_hash(log)?,
extract_transaction_index(log)?,
extract_log_index(log)?,
owner,
decoded.recipient,
tick_lower,
tick_upper,
decoded.amount0,
decoded.amount1,
))
} else {
Err(anyhow::anyhow!("Missing data in collect event log"))
}
}
/// Parses a collect event from an RPC log.
///
/// # Errors
///
/// Returns an error if the log parsing fails or if the event data is invalid.
pub fn parse_collect_event_rpc(dex: SharedDex, log: &RpcLog) -> anyhow::Result<CollectEvent> {
rpc_log::validate_event_signature(log, COLLECT_EVENT_SIGNATURE_HASH, "Collect")?;
let owner = rpc_log::extract_address_from_topic(log, 1, "owner")?;
// Extract int24 tickLower from topic2 (stored as a 32-byte padded value)
let tick_lower_bytes = rpc_log::extract_topic_bytes(log, 2)?;
let tick_lower = i32::from_be_bytes(tick_lower_bytes[28..32].try_into()?);
// Extract int24 tickUpper from topic3 (stored as a 32-byte padded value)View on GitHub (pinned to 18893faf8b)
Solutions
- Confirm the source contract is the canonical Uniswap V3 NonfungiblePositionManager and the log data section is present and correctly sized.
- Re-check the Hypersync event/ABI registration for Collect so decoding yields Some(decoded).
- Filter out logs with empty data before calling the parser, logging them for investigation instead of failing the batch.
- Align adapter and Hypersync client versions, then re-fetch the affected block range.
Example fix
// before
let event = parse_collect_event_hypersync(&log)?;
// after
if log.data.is_empty() {
tracing::warn!(tx = ?log.transaction_hash, "collect log has no data; skipping");
return Ok(None);
}
let event = parse_collect_event_hypersync(&log)?; Defensive patterns
Strategy: validation
Validate before calling
fn can_parse_collect(log: &Log) -> bool {
log.data.len() >= 64 // amount0, amount1 words
} Type guard
fn has_decoded_collect(decoded: &Option<CollectDecoded>) -> bool {
decoded.is_some()
} Try / catch
match parse_collect_event_hypersync(&log) {
Ok(event) => handle(event),
Err(e) if e.to_string().contains("Missing data in collect event log") => {
tracing::warn!("skipping malformed collect log");
}
Err(e) => return Err(e),
} Prevention
- Verify logs come from the canonical NonfungiblePositionManager.
- Filter empty-data logs before parsing.
- Re-sync ranges after Hypersync ABI or client updates.
- Track skipped events in metrics to detect ABI drift early.
When it happens
Trigger: Calling parse_collect_event_hypersync with a log whose decoded field is None — topic0 matched the Collect signature but the data section was missing/truncated or Hypersync could not decode it into the expected Collect struct.
Common situations: Indexing NonfungiblePositionManager logs where an ABI update changed the expected Collect layout; non-standard fork contracts emitting Collect-like topic0 with no data; partially indexed blocks from Hypersync during reorgs; stale test fixtures.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Missing data in burn event log
- Missing data in initialize event log
- Missing data in mint event log
- Missing data in pool created event log
- Missing data in swap event log
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/b1399fae436388d3.
Report an issue: GitHub.