Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdk-py should be able to connect to different networks #46

Closed
aaitor opened this issue Aug 26, 2021 · 1 comment · Fixed by #47
Closed

sdk-py should be able to connect to different networks #46

aaitor opened this issue Aug 26, 2021 · 1 comment · Fixed by #47
Assignees
Labels
bug Something isn't working defi-marketplace

Comments

@aaitor
Copy link
Member

aaitor commented Aug 26, 2021

No description provided.

@aaitor aaitor added the bug Something isn't working label Aug 26, 2021
@jcortejoso
Copy link
Contributor

jcortejoso commented Aug 26, 2021

The problem seems related how the network name for the artifacts are determined:

This is an example for mumbai, where artifacts have mumbai as network name (coming from truffle config) and sdk-py is looking for them as development in this case.

2021-08-26 08:19:49,955 - nevermined_gateway.myapp - ERROR - Exception on / [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
...
  File "/nevermined-gateway/nevermined_gateway/run.py", line 43, in root_info
    keeper = keeper_instance()
  File "/nevermined-gateway/nevermined_gateway/util.py", line 239, in keeper_instance
    return Keeper.get_instance(external_contracts=external_contracts)
  File "/usr/local/lib/python3.8/site-packages/contracts_lib_py/keeper.py", line 140, in get_instance
    return Keeper(artifacts_path, contract_names, external_contracts)
  File "/usr/local/lib/python3.8/site-packages/contracts_lib_py/keeper.py", line 85, in __init__
    self.did_registry = DIDRegistry.get_instance()
  File "/usr/local/lib/python3.8/site-packages/contracts_lib_py/contract_base.py", line 46, in get_instance
    return cls(cls.CONTRACT_NAME, dependencies)
  File "/usr/local/lib/python3.8/site-packages/contracts_lib_py/contract_base.py", line 33, in __init__
    self.contract = dependencies['ContractHandler'].get(contract_name)
  File "/usr/local/lib/python3.8/site-packages/contracts_lib_py/contract_handler.py", line 32, in get
    return (ContractHandler._contracts.get(name) or ContractHandler._load(name))[0]
  File "/usr/local/lib/python3.8/site-packages/contracts_lib_py/contract_handler.py", line 83, in _load
    contract_definition = ContractHandler.get_contract_dict_by_name(
  File "/usr/local/lib/python3.8/site-packages/contracts_lib_py/contract_handler.py", line 138, in get_contract_dict_by_name
    raise FileNotFoundError(
FileNotFoundError: Keeper contract DIDRegistry file not found in /usr/local/artifacts using network name development

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working defi-marketplace
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants