[Ethereum] Do all Ethereum addresses have a specific format

addressestransactions

I know all ethereum addresses start with 0x, but is there a common letter/number after the 0x to represent an address? Because I get confused on how to tell if its an Eth address or if its a transaction id.

Best Answer

Addresses have length of 40 hexadecimal characters in Ethereum, tx ids have a length of 64 hexadecimal characters. Further, usually addresses are encoded to contain a checksum (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md) which you can spot most times by the fact that they can contain the characters A-F in lowercase and in uppercase, which is not the case for tx ids.

edit

I forgot to answer your question. Other than the patterns given above plus the fact that they most times are presented with the prefix "0x" (as tx ids are as well), there is no pattern by which you can identify an ethereum address.

Related Topic