This is a brief survey of all (?) EVM opcodes which interact with addresses.
ADDRESS
, ORIGIN
, CALLER
, COINBASE
Input: nothing.
Output: stack item with an address from the execution environment. Currently 160 bits.
BALANCE
, EXTCODESIZE
, EXTCODECOPY
, EXTCODEHASH
Input: an address from stack, which we currently truncate to 160 bits.
Output: info about that address is possibly pushed to stack.
CALL
, CALLCODE
, DELEGATECALL
, STATICCALL
Input: an address from stack, which we currently truncate to 160 bits.
Output: error code from the message call.
CREATE
, CREATE2
Input: The init code, endowment, and possibly a salt.
Output: new account’s address (currently 160 bits) to stack, where the new address is roughly: Hash(creating contract's address, creating contract's nonce or a salt, init code)[12:32]
. This interacts with addresses in two ways: as the input and output of a hash.
SELFDESTRUCT
Input: an address from stack, which we currently truncate to 160 bits.
Output: send the remaining balance to that address.
SLOAD
, SSTORE
These only implicitly touch the current contract’s address to read/write its storage.