Skip to content

Commit

Permalink
fix(indexer): handle unexpected starknet event (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptisserand authored Apr 23, 2024
1 parent 46446e2 commit 89eb1d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/indexer/src/starknet_indexer/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ pub fn get_store_data(
if event.keys[0] == selector!("CollectionDeployedFromL1") {
return Ok((None, None, None));
}
if event.keys.len() < 4 || event.data.is_empty() {
log::debug!("not handled event: {:?}", event.keys);
return Ok((None, None, None));
}

let hash = u256_to_hex(&event.keys[1..])?;
let block_timestamp = event.keys[3];
Expand Down

0 comments on commit 89eb1d8

Please sign in to comment.