Skip to main content

Module log

Module log 

Source
Expand description

Parses Ethereum JSON-RPC log entries.

Converts RpcLog fields and hex strings to their domain types.

Functionsยง

decode_hex
Decode hex string (with or without 0x prefix) to bytes.
extract_address
Extract contract address from RPC log.
extract_address_from_topic
Extract address from topic at index.
extract_block_number
Extract block number from RPC log.
extract_data_bytes
Extract data bytes from RPC log.
extract_log_index
Extract log index from RPC log.
extract_topic_bytes
Extract topic bytes at index.
extract_transaction_hash
Extract transaction hash from RPC log.
extract_transaction_index
Extract transaction index from RPC log.
parse_hex_u32
Parse hex string to u32.
parse_hex_u64
Parse hex string to u64.
validate_event_signature
Validate event signature from topic0.