From 151b4e867ee0e9e8b38ec4d73edd29fbea35cf2a Mon Sep 17 00:00:00 2001 From: Timothy Carstens Date: Tue, 21 Nov 2023 15:33:05 -0800 Subject: [PATCH] Fix parsing of from and to fields for deposits --- lib/src/optimism/deposits.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/optimism/deposits.rs b/lib/src/optimism/deposits.rs index d513f965..47aa78ad 100644 --- a/lib/src/optimism/deposits.rs +++ b/lib/src/optimism/deposits.rs @@ -103,10 +103,10 @@ fn to_deposit_transaction( log_index: usize, log: &Log, ) -> anyhow::Result> { - let from = U160::try_from_be_slice(log.topics[1].as_slice()) + let from = U160::try_from_be_slice(&log.topics[1][12..]) .context("invalid from")? .into(); - let to = U160::try_from_be_slice(log.topics[2].as_slice()) + let to = U160::try_from_be_slice(&log.topics[2][12..]) .context("invalid to")? .into();