Skip to main content

Try it Live

Run Address examples in the interactive playground
Conceptual Guide - For API reference and method documentation, see Address API.
Ethereum addresses are 20-byte identifiers for accounts on the Ethereum network. This guide covers address fundamentals: what they are, how they’re derived, and how to work with them using Tevm.

What is an Address?

An address uniquely identifies an account on Ethereum:
  • EOA (Externally Owned Account) - Controlled by a private key, derived from a public key
  • Contract Account - Controlled by contract code, created via CREATE or CREATE2
Both types are represented as 20 bytes (160 bits), typically displayed as 40 hex characters with a 0x prefix.

Structure

Addresses are fixed-length 20-byte values:
Tevm stores addresses as raw Uint8Array internally, performing hex conversions only at API boundaries for performance and to avoid case-sensitivity bugs.

EOA Address Derivation

EOA addresses derive from secp256k1 public keys through keccak256 hashing:

Step-by-Step Derivation

Using Tevm’s High-Level API

EIP-55 Checksumming

EIP-55 adds error detection through mixed-case encoding. The checksum is computed by hashing the lowercase address and capitalizing letters based on the hash bits.

How Checksums Work

Using Tevm’s Checksum API

Why Checksumming Matters

Checksums detect typos and transcription errors:
Without checksums, sending funds to a typo’d address would result in permanent loss.

Contract Address Generation

Contract addresses are computed deterministically from deployment parameters, not derived from public keys.

CREATE (Standard Deployment)

Standard contract deployment uses the deployer’s address and nonce:

CREATE2 (Deterministic Deployment)

CREATE2 enables deterministic addresses independent of nonce, using a salt and initialization code:

CREATE vs CREATE2 Comparison

Pros:
  • Simpler (no salt/initCode needed)
  • Standard deployment method
  • Supported by all EVM chains
Cons:
  • Non-deterministic (depends on nonce)
  • Can’t predict address before deployment
  • Redeployment gets different address
Use when:
  • Standard contract deployment
  • Address predictability not needed
  • Simplicity preferred

Complete CREATE2 Example

Special Addresses

Zero Address

The zero address (0x0000000000000000000000000000000000000000) represents “no address” or burnt tokens:

Precompile Addresses

Addresses 0x01 through 0x0a (and beyond) are reserved for precompiled contracts:
See Precompiles for detailed documentation.

Common Operations

Validating User Input

Always validate addresses from untrusted sources:

Comparing Addresses

Deduplicating Addresses

Resources

Next Steps