Skip to content

Commit

Permalink
Remove registry contract and clean up log (#4558)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacsolo authored Jan 5, 2023
1 parent 6bdd6c6 commit 7ce874a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
10 changes: 0 additions & 10 deletions discovery-provider/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
eth_abi_values = None

solana_client_manager = None
registry = None
entity_manager = None
contract_addresses: Dict[str, Any] = defaultdict()

Expand All @@ -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"]:
Expand All @@ -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,
)
Expand All @@ -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()
Expand Down
1 change: 0 additions & 1 deletion discovery-provider/src/utils/eth_contracts_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
)
Expand Down

0 comments on commit 7ce874a

Please sign in to comment.