From 9d6255cc4aa21a12be3334e2f325fa5dde505b3d Mon Sep 17 00:00:00 2001 From: Isaac Solo Date: Wed, 4 Jan 2023 16:14:54 -0800 Subject: [PATCH] Remove registry contract and clean up log (#4558) --- discovery-provider/src/app.py | 10 ---------- discovery-provider/src/utils/eth_contracts_helpers.py | 1 - 2 files changed, 11 deletions(-) diff --git a/discovery-provider/src/app.py b/discovery-provider/src/app.py index 632f94cd16b..ed4a5ba127f 100644 --- a/discovery-provider/src/app.py +++ b/discovery-provider/src/app.py @@ -60,7 +60,6 @@ eth_abi_values = None solana_client_manager = None -registry = None entity_manager = None contract_addresses: Dict[str, Any] = defaultdict() @@ -76,11 +75,6 @@ def get_eth_abi_values(): def init_contracts(): - registry_address = web3.toChecksumAddress(shared_config["contracts"]["registry"]) - registry_instance = web3.eth.contract( - address=registry_address, abi=abi_values["Registry"]["abi"] - ) - entity_manager_address = None entity_manager_inst = None if shared_config["contracts"]["entity_manager_address"]: @@ -92,12 +86,10 @@ def init_contracts(): ) contract_address_dict = { - "registry": registry_address, "entity_manager": entity_manager_address, } return ( - registry_instance, entity_manager_inst, contract_address_dict, ) @@ -124,14 +116,12 @@ def create_celery(test_config=None): # Initialize Solana web3 provider solana_client_manager = SolanaClientManager(shared_config["solana"]["endpoint"]) - global registry global entity_manager global contract_addresses # pylint: enable=W0603 try: ( - registry, entity_manager, contract_addresses, ) = init_contracts() diff --git a/discovery-provider/src/utils/eth_contracts_helpers.py b/discovery-provider/src/utils/eth_contracts_helpers.py index b0817729771..f84089e4aad 100644 --- a/discovery-provider/src/utils/eth_contracts_helpers.py +++ b/discovery-provider/src/utils/eth_contracts_helpers.py @@ -36,7 +36,6 @@ def fetch_cnode_info(sp_id, sp_factory_instance, redis): def fetch_all_registered_content_nodes( eth_web3, shared_config, redis, eth_abi_values, include_spID=False ) -> set: - logger.info(f"asdf eth_web3 {eth_web3}") eth_registry_address = eth_web3.toChecksumAddress( shared_config["eth_contracts"]["registry"] )