Skip to content

Service registryget_service_information does not return value as dict #2330

@Skanislav

Description

@Skanislav

Describe the bug
In order to access contract data from the behaviours there is a get_contract_api_response in a BaseBehaviour. Currently it's incompatible with get_service_information as it returns tuple and not a dict. Meaning that _check_consistency check would fail asserting that value is not a dict.

@classmethod
def get_service_information(
cls,
ledger_api: LedgerApi,
contract_address: str,
token_id: int,
) -> ServiceInfo:
"""Retrieve service information"""
contract_interface = cls.get_instance(
ledger_api=ledger_api,
contract_address=contract_address,
)
return contract_interface.functions.getService(token_id).call()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions