pub enum EvmOpcode {
Show 147 variants
Stop,
Add,
Mul,
Sub,
Div,
Sdiv,
Mod,
Smod,
Addmod,
Mulmod,
Exp,
Signextend,
Lt,
Gt,
Slt,
Sgt,
Eq,
Iszero,
And,
Or,
Xor,
Not,
Byte,
Shl,
Shr,
Sar,
Sha3,
Address,
Balance,
Origin,
Caller,
Callvalue,
Calldataload,
Calldatasize,
Calldatacopy,
Codesize,
Codecopy,
Gasprice,
Extcodesize,
Extcodecopy,
Returndatasize,
Returndatacopy,
Extcodehash,
Blockhash,
Coinbase,
Timestamp,
Number,
Prevrandao,
Gaslimit,
Chainid,
Selfbalance,
Basefee,
Blobbasefee,
Pop,
Mload,
Mstore,
Mstore8,
Sload,
Sstore,
Jump,
Jumpi,
Pc,
Msize,
Gas,
Jumpdest,
Tload,
Tstore,
Mcopy,
Push1,
Push2,
Push3,
Push4,
Push5,
Push6,
Push7,
Push8,
Push9,
Push10,
Push11,
Push12,
Push13,
Push14,
Push15,
Push16,
Push17,
Push18,
Push19,
Push20,
Push21,
Push22,
Push23,
Push24,
Push25,
Push26,
Push27,
Push28,
Push29,
Push30,
Push31,
Push32,
Dup1,
Dup2,
Dup3,
Dup4,
Dup5,
Dup6,
Dup7,
Dup8,
Dup9,
Dup10,
Dup11,
Dup12,
Dup13,
Dup14,
Dup15,
Dup16,
Swap1,
Swap2,
Swap3,
Swap4,
Swap5,
Swap6,
Swap7,
Swap8,
Swap9,
Swap10,
Swap11,
Swap12,
Swap13,
Swap14,
Swap15,
Swap16,
Log0,
Log1,
Log2,
Log3,
Log4,
Create,
Call,
Callcode,
Return,
Delegatecall,
Create2,
Staticcall,
Revert,
Invalid,
Selfdestruct,
}Expand description
All EVM opcodes as defined in the Yellow Paper and subsequent EIPs.
Variants§
Stop
Halts execution.
Add
Integer addition.
Mul
Integer multiplication.
Sub
Integer subtraction.
Div
Integer division (unsigned).
Sdiv
Signed integer division.
Mod
Modulo remainder (unsigned).
Smod
Modulo remainder (signed).
Addmod
Addition modulo N.
Mulmod
Multiplication modulo N.
Exp
Exponentiation.
Signextend
Sign extend.
Lt
Less-than comparison (unsigned).
Gt
Greater-than comparison (unsigned).
Slt
Less-than comparison (signed).
Sgt
Greater-than comparison (signed).
Eq
Equality comparison.
Iszero
Is-zero check.
And
Bitwise AND.
Or
Bitwise OR.
Xor
Bitwise XOR.
Not
Bitwise NOT.
Byte
Retrieve single byte from word.
Shl
Left shift.
Shr
Logical right shift.
Sar
Arithmetic right shift.
Sha3
Compute Keccak-256 hash.
Address
Address of currently executing account.
Balance
Balance of given account.
Origin
Address of execution originator.
Caller
Address of caller.
Callvalue
Value deposited by caller.
Calldataload
Input data of current environment.
Calldatasize
Size of input data.
Calldatacopy
Copy input data to memory.
Codesize
Size of code at given address.
Codecopy
Copy code to memory.
Gasprice
Current gas price.
Extcodesize
Size of external code at given address.
Extcodecopy
Copy external code to memory.
Returndatasize
Size of return data from last call.
Returndatacopy
Copy return data to memory.
Extcodehash
Hash of external code at given address.
Blockhash
Hash of a recent block.
Coinbase
Current block’s beneficiary (coinbase).
Timestamp
Current block’s timestamp.
Number
Current block number.
Prevrandao
Difficulty / prevrandao of current block.
Gaslimit
Gas limit of current block.
Chainid
Chain ID.
Selfbalance
Balance of currently executing account.
Basefee
Base fee of current block.
Blobbasefee
Blob base fee (EIP-7516).
Pop
Remove item from stack.
Mload
Load word from memory.
Mstore
Save word to memory.
Mstore8
Save byte to memory.
Sload
Load word from storage.
Sstore
Save word to storage.
Jump
Alter program counter.
Jumpi
Conditionally alter program counter.
Pc
Value of program counter before current instruction.
Msize
Size of active memory in bytes.
Gas
Amount of available gas.
Jumpdest
Mark a valid jump destination.
Tload
Load word from transient storage.
Tstore
Save word to transient storage.
Mcopy
Copy memory areas.
Push1
Push 1 byte onto stack.
Push2
Push 2 bytes onto stack.
Push3
Push 3 bytes onto stack.
Push4
Push 4 bytes onto stack.
Push5
Push 5 bytes onto stack.
Push6
Push 6 bytes onto stack.
Push7
Push 7 bytes onto stack.
Push8
Push 8 bytes onto stack.
Push9
Push 9 bytes onto stack.
Push10
Push 10 bytes onto stack.
Push11
Push 11 bytes onto stack.
Push12
Push 12 bytes onto stack.
Push13
Push 13 bytes onto stack.
Push14
Push 14 bytes onto stack.
Push15
Push 15 bytes onto stack.
Push16
Push 16 bytes onto stack.
Push17
Push 17 bytes onto stack.
Push18
Push 18 bytes onto stack.
Push19
Push 19 bytes onto stack.
Push20
Push 20 bytes onto stack.
Push21
Push 21 bytes onto stack.
Push22
Push 22 bytes onto stack.
Push23
Push 23 bytes onto stack.
Push24
Push 24 bytes onto stack.
Push25
Push 25 bytes onto stack.
Push26
Push 26 bytes onto stack.
Push27
Push 27 bytes onto stack.
Push28
Push 28 bytes onto stack.
Push29
Push 29 bytes onto stack.
Push30
Push 30 bytes onto stack.
Push31
Push 31 bytes onto stack.
Push32
Push 32 bytes onto stack.
Dup1
Duplicate 1st stack item.
Dup2
Duplicate 2nd stack item.
Dup3
Duplicate 3rd stack item.
Dup4
Duplicate 4th stack item.
Dup5
Duplicate 5th stack item.
Dup6
Duplicate 6th stack item.
Dup7
Duplicate 7th stack item.
Dup8
Duplicate 8th stack item.
Dup9
Duplicate 9th stack item.
Dup10
Duplicate 10th stack item.
Dup11
Duplicate 11th stack item.
Dup12
Duplicate 12th stack item.
Dup13
Duplicate 13th stack item.
Dup14
Duplicate 14th stack item.
Dup15
Duplicate 15th stack item.
Dup16
Duplicate 16th stack item.
Swap1
Exchange 1st and 2nd stack items.
Swap2
Exchange 1st and 3rd stack items.
Swap3
Exchange 1st and 4th stack items.
Swap4
Exchange 1st and 5th stack items.
Swap5
Exchange 1st and 6th stack items.
Swap6
Exchange 1st and 7th stack items.
Swap7
Exchange 1st and 8th stack items.
Swap8
Exchange 1st and 9th stack items.
Swap9
Exchange 1st and 10th stack items.
Swap10
Exchange 1st and 11th stack items.
Swap11
Exchange 1st and 12th stack items.
Swap12
Exchange 1st and 13th stack items.
Swap13
Exchange 1st and 14th stack items.
Swap14
Exchange 1st and 15th stack items.
Swap15
Exchange 1st and 16th stack items.
Swap16
Exchange 1st and 17th stack items.
Log0
Append log record with no topics.
Log1
Append log record with 1 topic.
Log2
Append log record with 2 topics.
Log3
Append log record with 3 topics.
Log4
Append log record with 4 topics.
Create
Create a new account with associated code.
Call
Message-call into an account.
Callcode
Message-call with another account’s code.
Return
Halt, returning output data.
Delegatecall
Message-call into this account with caller’s code.
Create2
Create a new account with deterministic address.
Staticcall
Static message-call into an account.
Revert
Halt execution reverting state changes.
Invalid
Designated invalid instruction.
Selfdestruct
Halt execution and register account for deletion.