55from apibara .starknet .cursor import starknet_cursor
66from apibara .starknet .proto .starknet_pb2 import Block
77from loguru import logger
8- from pydantic import ValidationError
98
109from spherre .indexer .config import NETWORK , SPHERRE_CONTRACT_ADDRESS
1110from spherre .indexer .service .event_handlers import DATA_HANDLERS
1211from spherre .indexer .service .types import (
1312 EVENT_SELECTORS ,
14- AccountCreationEvent ,
1513 EventEnum ,
1614)
1715from spherre .indexer .service .utils import DATA_TRANSFORMERS
@@ -60,11 +58,17 @@ async def handle_data(self, info: Info, data: Block):
6058 if transformed_data :
6159 DATA_HANDLERS [event_enum ](transformed_data )
6260 logger .info (
63- f"Event with type '{ event_type } ' from address '{ event_address } ' handled"
61+ (
62+ f"Event with type '{ event_type } ' from address"
63+ f"'{ event_address } ' handled"
64+ )
6465 )
6566 else :
6667 logger .error (
67- f"Failed to handle event of type '{ event_type } ' from address '{ event_address } '"
68+ (
69+ f"Failed to handle event of type '{ event_type } '"
70+ f"from address '{ event_address } '"
71+ )
6872 )
6973 else :
7074 event_type = event .keys
@@ -76,12 +80,18 @@ async def handle_data(self, info: Info, data: Block):
7680 DATA_HANDLERS [EventEnum .ACCOUNT_CREATION ](transformed_data )
7781 self .start_account_indexer (transformed_data .account_address )
7882 logger .info (
79- f"Account created for address '{ transformed_data .account_address } '"
83+ (
84+ "Account created for address "
85+ f"'{ transformed_data .account_address } '"
86+ )
8087 )
8188 else :
8289 account_address = felt .to_hex (event .data [0 ])
8390 logger .error (
84- f"Failed to handle account creation event of address '{ account_address } '"
91+ (
92+ "Failed to handle account creation event"
93+ f"of address '{ account_address } '"
94+ )
8595 )
8696
8797 async def handle_invalidate (self , _info : Info , _cursor : Cursor ):
0 commit comments