Skip to main content

extract_i32_from_bytes

Function extract_i32_from_bytes 

Source
pub fn extract_i32_from_bytes(bytes: &[u8]) -> Result<i32>
Expand description

Extract i32 from 32-byte topic (value in last 4 bytes, big-endian, signed).

In Ethereum event logs, indexed signed numeric parameters (like tick values) are stored as 32-byte values with the number right-aligned in big-endian format.

ยงErrors

Returns an error if the byte slice is shorter than 32 bytes.