From e302bfb4a61b9b5dfe07d61353b81a05de6b4633 Mon Sep 17 00:00:00 2001 From: kayibal Date: Wed, 7 Aug 2024 13:47:21 +0200 Subject: [PATCH] feat: Request only contracts of interest Instead of requesting all contracts just get what is specified by the components. --- testing/src/runner/runner.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/testing/src/runner/runner.py b/testing/src/runner/runner.py index 8f8d56d..f39be57 100644 --- a/testing/src/runner/runner.py +++ b/testing/src/runner/runner.py @@ -23,6 +23,7 @@ from tycho_client.dto import ( HexBytes, ResponseAccount, Snapshot, + ContractId, ) from tycho_client.rpc_client import TychoRPCClient @@ -185,7 +186,13 @@ class TestRunner: f"from rpc call and {tycho_balance} from Substreams" ) contract_states = self.tycho_rpc_client.get_contract_state( - ContractStateParams() + ContractStateParams( + contract_ids=[ + ContractId(chain=self._chain, address=a) + for component in protocol_components + for a in component.contract_ids + ] + ) ) filtered_components = [ pc