Address Checksum
Convert Ethereum addresses to checksum format (EIP-55)
1. What is EIP-55?
EIP-55 introduces a checksum for Ethereum addresses by capitalizing certain letters. This helps detect typos and prevents sending funds to incorrect addresses.
2. How does it work?
The checksum is created by taking the Keccak-256 hash of the lowercase address. Each character in the address is then compared to the corresponding character in the hash - if the hash character is >= 8, the address character is capitalized.
3. Examples
Lowercase to checksum
0xd8da6bf26964af9d7eed9e03e53415d37aa96045
→ 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045Wrong checksum correction
0xD8DA6bf26964af9d7eed9E03e53415d37aa96045
→ 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045Already checksummed
0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
→ 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045