Overview
Opcode:0x30
Introduced: Frontier (EVM genesis)
ADDRESS pushes the address of the currently executing account onto the stack. This is the address of the contract whose code is being executed, not the address of the contract that initiated the call chain.
Specification
Stack Input:Behavior
ADDRESS provides access to the address of the contract currently executing. In the context of DELEGATECALL, this returns the address of the contract being called into (the caller’s address), not the implementation contract. Key characteristics:- Returns the address where code is executing
- Value is a 160-bit address stored as uint256 (20 bytes right-padded)
- Does not change with CALL but changes with DELEGATECALL
- Always available (cannot fail)
Examples
Basic Usage
Contract Self-Reference
CALL vs DELEGATECALL
Gas Cost
Cost: 2 gas (GasQuickStep) ADDRESS is one of the cheapest operations, sharing the same cost tier with:- ORIGIN (0x32)
- CALLER (0x33)
- CALLVALUE (0x34)
- CALLDATASIZE (0x36)
- CODESIZE (0x38)
- GASPRICE (0x3a)
- RETURNDATASIZE (0x3d)
- Environment context (ADDRESS, CALLER, ORIGIN): 2 gas
- Data loading (CALLDATALOAD): 3 gas
- External account access (BALANCE, EXTCODESIZE): 700+ gas
Common Usage
Proxy Pattern Identification
Self-Destruct Recipient
Token Address Validation
Ether Reception Check
Security
ADDRESS vs CALLER vs ORIGIN
Critical distinction:DELEGATECALL Context Preservation
Safe Patterns
Implementation
- TypeScript
Edge Cases
Maximum Address Value
Zero Address
Stack Overflow
Out of Gas
References
- Yellow Paper - Section 9.1 (Execution Environment)
- EVM Codes - ADDRESS
- Solidity Docs - address(this)
- EIP-1967 - Proxy Storage Slots (uses ADDRESS for context)

