Logs API

Standard endpoints

class blockscan.modules.logs.Logs[source]
static get_logs(from_block: int, to_block: int, address: str, topic_0: Optional[str] = None, topic_1: Optional[str] = None, topic_2: Optional[str] = None, topic_3: Optional[str] = None, topic_0_1_opr: Optional[str] = None, topic_1_2_opr: Optional[str] = None, topic_2_3_opr: Optional[str] = None, topic_0_2_opr: Optional[str] = None, topic_0_3_opr: Optional[str] = None, topic_1_3_opr: Optional[str] = None)[source]

This is an alternative to the native eth_getLogs. An address and/or topic_x parameters are required. When multiple topic_x parameters are used, the topic_x_y_opr (“and”/”or” operator) is also required.

.. note:: Only the first 1000 results are returned.

Parameters
  • from_block (int) – Start block of the query

  • to_block (int) – End block of the query

  • address (str) – Address of the logs

  • topic_0 (Optional[str], optional) – Topic 0 in the logs, defaults to None

  • topic_1 (Optional[str], optional) – Topic 1 in the logs, defaults to None

  • topic_2 (Optional[str], optional) – Topic 2 in the logs, defaults to None

  • topic_3 (Optional[str], optional) – Topic 3 in the logs, defaults to None

  • topic_0_1_opr (Optional[str], optional) – Logical operator between topic 0 and 1, defaults to None

  • topic_1_2_opr (Optional[str], optional) – Logical operator between topic 1 and 2, defaults to None

  • topic_2_3_opr (Optional[str], optional) – Logical operator between topic 2 and 3, defaults to None

  • topic_0_2_opr (Optional[str], optional) – Logical operator between topic 0 and 2, defaults to None

  • topic_0_3_opr (Optional[str], optional) – Logical operator between topic 0 and 3, defaults to None

  • topic_1_3_opr (Optional[str], optional) – Logical operator between topic 1 and 3, defaults to None

Returns

_description_

Return type

_type_

Pro endpoints

class blockscan.modules.logs.ProLogs[source]