LogRecord
One typed eth_getLogs row.
address and transaction_hash are lowercase, as everywhere else
in the EVM source, so two spellings of one contract never compare
unequal. topics is a tuple of lowercase 0x-prefixed 32-byte
hex strings, and data is the decoded payload as bytes, empty
for "0x". Tuple topics and bytes data make the whole record
hashable, which frozen alone would not.
block_number and log_index arrive as hex QUANTITY strings and
parse with int(x, 16), never through float (rules #1/#2).
removed is the node's reorg flag and reads False when the key is
absent.
There is deliberately NO timestamp field: eth_getLogs returns no
time, and rule #3 leaves no room for a half-populated one.
Fields
addressstrtopicstuple[str, ...]databytesblock_numberinttransaction_hashstrlog_indexintremovedbool__init__
__init__(self, address: str, topics: tuple[str, ...], data: bytes, block_number: int, transaction_hash: str, log_index: int, removed: bool) -> None
Parameters
addressrequired, strnone
topicsrequired, tuple[str, ...]none
datarequired, bytesnone
block_numberrequired, intnone
transaction_hashrequired, strnone
log_indexrequired, intnone
removedrequired, boolnone