@@ -605,23 +605,9 @@ class BigMapIndexConfig(IndexConfig):
605605 first_block : int = 0
606606 last_block : int = 0
607607
608-
609- @dataclass
610- class BlockHandlerConfig (HandlerConfig ):
611- pattern = None
612-
613-
614- @dataclass
615- class BlockIndexConfig (IndexConfig ):
616- """Stub, not implemented"""
617-
618- kind : Literal ['block' ]
619- datasource : Union [str , TzktDatasourceConfig ]
620- handlers : List [BlockHandlerConfig ]
621-
622- stateless : bool = False
623- first_block : int = 0
624- last_block : int = 0
608+ @property
609+ def contracts (self ) -> List [ContractConfig ]:
610+ return list (set ([cast (ContractConfig , handler_config .contract ) for handler_config in self .handlers ]))
625611
626612
627613@dataclass
@@ -631,8 +617,8 @@ class IndexTemplateConfig:
631617 values : Dict [str , str ]
632618
633619
634- IndexConfigT = Union [OperationIndexConfig , BigMapIndexConfig , BlockIndexConfig , IndexTemplateConfig ]
635- IndexConfigTemplateT = Union [OperationIndexConfig , BigMapIndexConfig , BlockIndexConfig ]
620+ IndexConfigT = Union [OperationIndexConfig , BigMapIndexConfig , IndexTemplateConfig ]
621+ IndexConfigTemplateT = Union [OperationIndexConfig , BigMapIndexConfig ]
636622HandlerPatternConfigT = Union [OperationHandlerOriginationPatternConfig , OperationHandlerTransactionPatternConfig ]
637623
638624
@@ -714,14 +700,6 @@ class DipDupConfig:
714700 jobs : Optional [Dict [str , JobConfig ]] = None
715701 sentry : Optional [SentryConfig ] = None
716702
717- @property
718- def environment (self ) -> Dict [str , str ]:
719- return self ._environment
720-
721- @property
722- def filenames (self ) -> List [str ]:
723- return self ._filenames
724-
725703 def __post_init_post_parse__ (self ):
726704 self ._filenames : List [str ] = []
727705 self ._environment : Dict [str , str ] = {}
@@ -730,6 +708,14 @@ def __post_init_post_parse__(self):
730708 self ._initialized = []
731709 self .validate ()
732710
711+ @property
712+ def environment (self ) -> Dict [str , str ]:
713+ return self ._environment
714+
715+ @property
716+ def filenames (self ) -> List [str ]:
717+ return self ._filenames
718+
733719 def validate (self ) -> None :
734720 if isinstance (self .database , SqliteDatabaseConfig ) and self .hasura :
735721 raise ConfigurationError ('SQLite DB engine is not supported by Hasura' )
0 commit comments