Registry / blockchain / eth-event

eth-event

JSON →
library1.4.9pypypi✓ verified 79d ago

A library for decoding Ethereum event logs and generating event topics. Supports ABI-based event decoding, filtering, and topic generation. Current version: 1.4.9. Release cadence is irregular.

pip install eth-event
INSTALL
IMPORT
SIG · ETH-EVENT
E
eth-event
blockchainpythonv1.4.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

decode_log
from eth_event import decode_log
from eth_event import EventDecoder
decode_logs
from eth_event import decode_logs
get_log_topic
from eth_event import get_log_topic

Decode an Ethereum event log given the event ABI and a raw log dictionary.

import os from eth_event import EventDecoder # Assume you have an event ABI list (list of dicts) and a log entry abi = [{"anonymous": False, "inputs": [{"indexed": True, "name": "from", "type": "address"}, {"indexed": True, "name": "to", "type": "address"}, {"indexed": False, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}] log = {"address": "0x...", "blockHash": "0x...", "blockNumber": 123, "data": "0x...", "logIndex": 0, "removed": False, "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001"], "transactionHash": "0x...", "transactionIndex": 0} decoder = EventDecoder(abi) event = decoder.decode_log(log) print(event)
Debug
Known issues
gotchaEventDecoder expects the ABI to be a list of event definitions (not full contract ABI). Filtering ABI entries to only events is required.
fix
Use [item for item in contract_abi if item['type'] == 'event']
affects: all
deprecatedThe old function-based API (eth_event.decode_event, eth_event.event_topics) is deprecated in favor of the EventDecoder and EventTopics classes.
fix
Use EventDecoder and EventTopics classes.
affects: <1.4.0
breakingPython 3.10+ required. The library dropped support for Python <3.10 in version 1.4.0.
fix
Upgrade Python to 3.10 or later.
affects: >=1.4.0
Upgrade
Version history
1.4.9latest on PyPI · released May 25, 2026
Audit
Dependencies
eth-abirequiredABI encoding/decoding
eth-utilsrequiredEthereum utility functions
Agent activity
35 hits · last 30 days
node
30
OpenAI (training)
1
Resources
eth-event — pip install eth-event · libregistry