Skip to content

Commit

Permalink
indexer: avoid panic when ethereum event has only 1 topic
Browse files Browse the repository at this point in the history
  • Loading branch information
ptisserand committed Apr 3, 2024
1 parent 3889df3 commit 0b4c90f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/indexer/src/ethereum_indexer/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ const COLLECTION_DEPOYED_FROM_L2_SIG: &str =

/// Returns storage data from the log entry.
pub fn get_store_data(log: Log) -> Result<(Option<Request>, Option<Event>, Option<CrossChainTx>)> {
if log.topics.len() < 2 {
log::debug!("not handled log\n{:?}\n", log);
return Ok((None, None, None));
}
let sig = format!("{:#64x}", log.topics[0]);
let req_hash = format!("{:#64x}", log.topics[1]);

Expand Down

0 comments on commit 0b4c90f

Please sign in to comment.