auradefi 0.1.2
PyPI GitHub

LogRecord

auradefi.sources.evm.logs · source

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

addressstr
topicstuple[str, ...]
databytes
block_numberint
transaction_hashstr
log_indexint
removedbool

__init__

__init__(self, address: str, topics: tuple[str, ...], data: bytes, block_number: int, transaction_hash: str, log_index: int, removed: bool) -> None

Parameters

addressrequired, str

none

topicsrequired, tuple[str, ...]

none

datarequired, bytes

none

block_numberrequired, int

none

transaction_hashrequired, str

none

log_indexrequired, int

none

removedrequired, bool

none