A Python library for interacting with Ethereum blockchain
Overall
score
88%
Evaluation — 88%
↑ 1.01xAgent success when using this tile
Build a transaction event analyzer that processes blockchain transaction receipts and extracts event data with configurable error handling strategies.
Your analyzer should process transaction receipts and extract event logs with flexible error handling. Different scenarios require different approaches to handling decode failures:
The analyzer should:
@generates
from typing import Any, Dict, List, Literal
from web3.types import TxReceipt
ErrorHandlingMode = Literal["strict", "warn", "ignore", "discard"]
def process_receipt_events(
receipt: TxReceipt,
contract_abi: List[Dict[str, Any]],
error_handling: ErrorHandlingMode = "strict"
) -> List[Dict[str, Any]]:
"""
Process events from a transaction receipt with configurable error handling.
Args:
receipt: Transaction receipt containing event logs
contract_abi: Contract ABI defining the events to decode
error_handling: Error handling mode - "strict", "warn", "ignore", or "discard"
Returns:
List of decoded events, each containing event name and arguments
Raises:
Exception: In strict mode when event decoding fails
"""
passProvides Ethereum blockchain interaction capabilities including event processing with configurable error handling modes.
Install with Tessl CLI
npx tessl i tessl/pypi-web3docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10