diff --git a/pyproject.toml b/pyproject.toml index bb81fc9..e783ae8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ markers = [ "unit", # offline "integration", # hardhat fork "integration_holesky", # holesky fork - "integration_chiado" # chiado(gnosis testnet) run only + "integration_chiado", # chiado(gnosis testnet) run only ] [tool.ruff] diff --git a/src/blockchain/contracts/data_bus.py b/src/blockchain/contracts/data_bus.py index 7957f19..da106fc 100644 --- a/src/blockchain/contracts/data_bus.py +++ b/src/blockchain/contracts/data_bus.py @@ -14,5 +14,5 @@ def send_message(self, event_id: bytes, mes: bytes) -> ContractFunction: Build send message transaction to Data Bus contract """ tx = self.functions.send_message(event_id, mes) - logger.info({'msg': 'Build `send_message(...)` tx.'}) + logger.info({'msg': f'Build `send_message({event_id.hex()}, {mes.hex()})` tx.'}) return tx diff --git a/src/transport/msg_providers/common.py b/src/transport/msg_providers/common.py index 88377e7..3560688 100644 --- a/src/transport/msg_providers/common.py +++ b/src/transport/msg_providers/common.py @@ -1,6 +1,6 @@ import abc import logging -from typing import Any, List, Optional +from typing import Any, Optional from schema import Schema, SchemaError @@ -15,7 +15,7 @@ class BaseMessageProvider(abc.ABC): def __init__(self, message_schema: Schema): self.message_schema = message_schema - def get_messages(self) -> List[dict]: + def get_messages(self) -> list[dict]: """ Fetches new messages, processes them, and filters out only the valid ones. @@ -25,7 +25,7 @@ def get_messages(self) -> List[dict]: return [msg for msg in (self._process_msg(m) for m in self._fetch_messages()) if msg and self._is_valid(msg)] @abc.abstractmethod - def _fetch_messages(self) -> List[Any]: + def _fetch_messages(self) -> list[Any]: raise NotImplementedError('Receive message from transport.') def _process_msg(self, msg: Any) -> Optional[dict]: