From ba4c86066b0c2ebab14b364300c565efde30b461 Mon Sep 17 00:00:00 2001 From: KPrasch Date: Fri, 26 Jan 2024 15:03:35 +0100 Subject: [PATCH] removes bulk data downloading interface from coordinator agent --- nucypher/blockchain/eth/agents.py | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/nucypher/blockchain/eth/agents.py b/nucypher/blockchain/eth/agents.py index 143fb759f..d533c113c 100644 --- a/nucypher/blockchain/eth/agents.py +++ b/nucypher/blockchain/eth/agents.py @@ -785,25 +785,9 @@ class CoordinatorAgent(EthereumContractAgent): return result @contract_api(CONTRACT_CALL) - def get_participants( - self, ritual_id: int, start: Optional[int] = None, end: Optional[int] = None - ) -> List[Ritual.Participant]: - params = (ritual_id,) - start = start or 0 - if start and end: - params += (start, end) - result = self.contract.functions.getParticipants(*params).call() - participants = list() - for index, r in enumerate(result, start=start): - participant = self.Ritual.Participant( - index=index, - provider=ChecksumAddress(r[0]), - aggregated=r[1], - transcript=bytes(r[2]), - decryption_request_static_key=bytes(r[3]), - ) - participants.append(participant) - return participants + def is_participant(self, ritual_id: int, provider: ChecksumAddress) -> bool: + result = self.contract.functions.isParticipant(ritual_id, provider).call() + return result @contract_api(CONTRACT_CALL) def get_participant_providers(self, ritual_id: int) -> List[ChecksumAddress]: