Function bytes_to_address

Source
pub fn bytes_to_address(address: &Bytes) -> Result<Address, EncodingError>
Expand description

Safely converts a Bytes object to an Address object.

Checks the length of the Bytes before attempting to convert, and returns an EncodingError if not 20 bytes long.