Skip to main content
Validates an Ethereum signature against a message hash and Ethereum address. Similar to verify_eth_signature but returns a Result instead of panicking. Also verifies that r and s components of the signature are in the range [1, N), where N is the size of the curve.

Signature

Arguments

  • msg_hash - The 32-byte hash of the message that was signed
  • signature - The Ethereum signature containing r, s components and y_parity
  • eth_address - The expected Ethereum address of the signer

Returns

Returns Ok(()) if the signature is valid, or Err(felt252) containing an error message if invalid.

Examples