validate_address

Function validate_address 

Source
pub fn validate_address(address: &str) -> Result<Address>
Expand description

Validates an Ethereum address format, checksum, and returns the parsed address.

ยงErrors

This function returns an error if:

  • The address does not start with the 0x prefix.
  • The address has invalid length (must be 42 characters including 0x).
  • The address contains invalid hexadecimal characters.
  • The address has an incorrect checksum (for checksummed addresses).