From 825d58bb16b688a39de70afa7643b4148c55d36f Mon Sep 17 00:00:00 2001 From: crisog Date: Thu, 1 Aug 2024 16:15:54 -0400 Subject: [PATCH] feat: hydrate event context block --- ghost-crab/src/event_handler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghost-crab/src/event_handler.rs b/ghost-crab/src/event_handler.rs index bd2f75b..1a9bab6 100644 --- a/ghost-crab/src/event_handler.rs +++ b/ghost-crab/src/event_handler.rs @@ -21,11 +21,11 @@ pub struct EventContext { } impl EventContext { - pub async fn block(&self) -> Result, TransportError> { + pub async fn block(&self, hydrate: bool) -> Result, TransportError> { match self.log.block_number { Some(block_number) => { self.provider - .get_block_by_number(BlockNumberOrTag::Number(block_number), false) + .get_block_by_number(BlockNumberOrTag::Number(block_number), hydrate) .await } None => Err(TransportError::local_usage_str("Error occurred while fetching the current block number within an EventHandler. The log.block_number value is None.")),