STACK STACK
OPCODE MNEMONIC DESCRIPTION OPCODE MNEMONIC DESCRIPTION
OPERATION OPERATION
10 LT a<b uint256 comparison 44 DIFFICULTY block.difficulty current block's difficulty
11 GT a>b uint256 comparison 45 GASLIMIT block.gaslimit current block's gas limit
12 SLT a<b int256 comparison pops a (u)int256 off the stack and
50 POP
discards it
13 SGT a>b int256 comparison DEFAULT JSON-RPC EVM ENDPOINTS
51 MLOAD value reads a (u)int256AND
fromLIBRARIES
memory
14 EQ a == b (u)int256 equality
52
____________________ MSTORE w rites a (u)int256 to memory
15 ISZERO a == 0 (u)int256 is zero
ETHEREUM 53 MSTORE8 w rites a uint8 to memory
16 AND a&b 256-bit bitw ise and 54 SLOAD value reads a (u)int256 from storage
OPCODES 17 OR a|b 256-bit bitw ise or 55 SSTORE w rites a (u)int256 to storage
POCKET 18 XOR a^b 256-bit bitw ise xor 56 JUMP unconditional jump
REFERENCE
_______________ 19 NOT ~a 256-bit bitw ise not 57 JUMPI conditional jump
1A BYTE y ith byte of (u)int256 x, 58 PC $pc program counter
1B SHL value << shift 256-bit shift left size of memory for this contract
MSIZE size
59 execution, in bytes
SEC554
1C SHR value >> shift 256-bit shift right
5A GAS gasRemaining remaining gas
1D SAR value >> shift int256 shift right
metadata to annotate possible jump
JUMPDEST
BLOCKCHAIN 20 SHA3 hash keccak256 5B destinations
AND 30 ADDRESS address(this)
address of the executing 60 PUSH1 uint8 pushes a 1-byte value onto stack
contract
SMART CONTRACT 61 PUSH2 uint16 pushes a 2-byte value onto stack
address(addr).
SECURITY 31 BALANCE
balance
address balance in w ei 62 PUSH3 uint24 pushes a 3-byte value onto stack
63 PUSH4 uint32 pushes 4-byte value onto stack
32 ORIGIN tx.origin transaction origin address
F0 CREATE addr creates a child contract
33 CALLER msg.caller message caller address
F1 CALL success calls a method in another contract
34 CALLVALUE msg.value message funds in w ei
www.sans.org/sec554 F2 CALLCODE success
reads a (u)int256 from
Steven Walbroehl: 35 CALLDATALOAD msg.data[i:i+32]
message data F3 RETURN - returns from this contract call
Twitter @HalbornSteve
36 CALLDATASIZE msg.data.size message data (bytes) calls method in another contract
DELEGATECALL success
F4 using storage of current contract
37 CALLDATACOPY - copy message data
creates a child contract w ith a
CREATE2 addr
GASPRICE tx.gasprice
Wei gas price of the F5 deterministic address
3A executing transaction,
calls a method in another contract
FA STATICCALL success
40 BLOCKHASH hash hash of the specific block w ith state changes
address of the current FD REVERT - reverts with return data
COINBASE block.coinbase
41 block's miner
current block's Unix destroys the contract and sends all
TIMESTAMP block.timestamp FF SELFDESTRUCT -
42 timestamp in seconds funds to addr.
OPCODES FOR EVM VER.1 (Proof of Work)