diff --git a/pyproject.toml b/pyproject.toml index 238e4da..f29d9ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sw-utils" -version = "0.3.26" +version = "0.3.27" description = "StakeWise Python utils" authors = ["StakeWise Labs "] license = "GPL-3.0-or-later" diff --git a/sw_utils/event_scanner.py b/sw_utils/event_scanner.py index 80faeb5..af07da5 100644 --- a/sw_utils/event_scanner.py +++ b/sw_utils/event_scanner.py @@ -30,7 +30,7 @@ async def get_from_block() -> BlockNumber: @staticmethod @abstractmethod - async def process_events(events: list[EventData]) -> None: + async def process_events(events: list[EventData], to_block: BlockNumber) -> None: """Process incoming events. This function takes raw events from Web3, transforms them to application's internal format, then saves it in a database. @@ -70,7 +70,7 @@ async def process_new_events(self, to_block: BlockNumber) -> None: current_to_block, new_events = await self._scan_chunk( current_from_block, estimated_end_block ) - await self.processor.process_events(new_events) + await self.processor.process_events(new_events, to_block=to_block) if new_events: logger.info(