Skip to main content

TypeAlias.Address

type Address: `0x${string}`;

Represents an Ethereum address in hexadecimal format.

Remarks

An Ethereum address is a 42-character string that uniquely identifies an account on the Ethereum blockchain. It consists of the prefix "0x" followed by 40 hexadecimal characters (digits 0-9 and letters a-f). Ethereum addresses are case-insensitive, but it is recommended to use the checksum address format (mix of uppercase and lowercase letters) for better error detection.

Format:

  • Prefix: Must start with "0x".
  • Length: Total of 42 characters (including the "0x" prefix).
  • Characters: The following 40 characters should be valid hexadecimal digits (0-9, a-f, A-F).
  • Example without checksum: "0x742d35cc6634c0532925a3b844bc454e4438f44e"
  • Example with checksum: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"

Usage: This type alias enforces that any variable of type Address must be a string that adheres to the Ethereum address format. It is used throughout the SDK to represent addresses in a type-safe manner, reducing errors related to address handling.