LogResult

Documentation for eth_defi.event_reader.logresult.LogResult Python class.

class LogResult[source]

A dictionary of the event look up.

The values are untranslated hex strings for the maximum speed.

See also

Attributes summary

context

User passed context

event

Contract event matches for this raw log

address

Smart contract address

blockHash

Block where the event was

blockNumber

Block number as hex string

timestamp

UNIX timestamp of the block number.

transactionHash

Transaction where the event occred

logIndex

Log index as a hex number

topics

Topics in this receipt.

removed

Block reorg helper

data

Data related to the event

Methods summary

__init__(*args, **kwargs)

clear()

copy()

fromkeys([value])

Create a new dictionary with keys from iterable and values set to value.

get(key[, default])

Return the value for key if key is in the dictionary, else default.

items()

keys()

pop(k[,d])

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

update([E, ]**F)

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

context: eth_defi.event_reader.logresult.LogContext

User passed context

event: web3.contract.contract.ContractEvent

Contract event matches for this raw log

address: str

Smart contract address

blockHash: str

Block where the event was

blockNumber: str

Block number as hex string

timestamp: Optional[int]

UNIX timestamp of the block number. Synthesized by block reader code, not present in the receipt. May be None if timestamp fetching is disabled for the speed reasons.

transactionHash: str

Transaction where the event occred

logIndex: str

Log index as a hex number

topics: List[str]

Topics in this receipt. topics[0] is always the event signature.

removed: bool

Block reorg helper

data: str

Data related to the event