validate_event_signature

Function validate_event_signature 

Source
pub fn validate_event_signature(
    log: &RpcLog,
    expected_hash: &str,
    event_name: &str,
) -> Result<()>
Expand description

Validate event signature from topic0.

The first topic (topic0) of an Ethereum event log contains the keccak256 hash of the event signature. This function validates that the actual signature matches the expected one.

§Errors

Returns an error if the signature doesn’t match or topic0 is missing.