Module helpers

Module helpers 

Source
Expand description

Helper functions for parsing RPC log entries.

These functions work with RpcLog from the standard Ethereum JSON-RPC format, converting hex strings to the appropriate 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.