diff --git a/pyproject.toml b/pyproject.toml index 689d475..34a24e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sw-utils" -version = "v0.12.5" +version = "v0.12.6" description = "StakeWise Python utils" authors = ["StakeWise Labs "] license = "GPL-3.0-or-later" diff --git a/sw_utils/graph/subgraph_committee.py b/sw_utils/graph/subgraph_committee.py index 55bce72..7c51d7e 100644 --- a/sw_utils/graph/subgraph_committee.py +++ b/sw_utils/graph/subgraph_committee.py @@ -17,7 +17,7 @@ class SubgraphCommittee: def __init__( self, endpoints: list[str], request_timeout: int, retry_timeout: int, page_size: int = 100 ) -> None: - self.graph_clients = [] + self.graph_clients: list[GraphClient] = [] self.page_size = page_size for endpoint in endpoints: @@ -28,6 +28,10 @@ def __init__( ) self.graph_clients.append(graph_client) + async def setup(self) -> None: + for graph_client in self.graph_clients: + await graph_client.setup() + async def fetch_votes( self, query: DocumentNode, block_number: BlockNumber ) -> 'SubgraphCommitteeVotes':