pub enum ShangHai {
Show 141 variants
Data(u8),
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,
KECCAK256,
ADDRESS,
BALANCE,
ORIGIN,
CALLER,
CALLVALUE,
CALLDATALOAD,
CALLDATASIZE,
CALLDATACOPY,
CODESIZE,
CODECOPY,
GASPRICE,
EXTCODESIZE,
EXTCODECOPY,
RETURNDATASIZE,
RETURNDATACOPY,
BLOCKHASH,
COINBASE,
TIMESTAMP,
NUMBER,
DIFFICULTY,
GASLIMIT,
POP,
MLOAD,
MSTORE,
MSTORE8,
SLOAD,
SSTORE,
JUMP,
JUMPI,
PC,
MSIZE,
GAS,
JUMPDEST,
PUSH0,
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
Ethereum virtual machine opcode.
Variants§
Data(u8)
No operation but provides a byte for serializing.
STOP
Halts execution.
ADD
Addition operation.
MUL
Multiplication operation.
SUB
Subtraction operation.
DIV
Integer division operation.
SDIV
Signed integer division operation (truncated).
MOD
Modulo remainder operation.
SMOD
Signed modulo remainder operation.
ADDMOD
Modulo addition operation.
MULMOD
Modulo multiplication operation.
EXP
Exponential operation.
SIGNEXTEND
Extend length of two’s complement signed integer.
LT
Less-than comparison.
GT
Greater-than comparison.
SLT
Signed less-than comparison.
SGT
Signed greater-than comparison.
EQ
Equality comparison.
ISZERO
Simple not operator.
AND
Bitwise AND operation.
OR
Bitwise OR operation.
XOR
Bitwise XOR operation.
NOT
Bitwise NOT operation.
BYTE
Retrieve single byte from word.
SHL
Left shift operation
SHR
Logical right shift operation
SAR
Arithmetic (signed) right shift operation
KECCAK256
Compute Keccak-256 hash.
ADDRESS
Get address of currently executing account.
BALANCE
Get balance of the given account.
ORIGIN
Get execution origination address.
CALLER
Get caller address.
CALLVALUE
Get deposited value by the instruction/transaction responsible for this execution.
CALLDATALOAD
Get input data of current environment.
CALLDATASIZE
Get size of input data in current environment.
CALLDATACOPY
Copy input data in current environment to memory.
CODESIZE
Get size of code running in current environment.
CODECOPY
Copy code running in current environment to memory.
GASPRICE
Get price of gas in current environment
EXTCODESIZE
Get size of an account’s code.
EXTCODECOPY
Copy an account’s code to memory.
RETURNDATASIZE
Get size of output data from the previous call from the current environment.
RETURNDATACOPY
Copy output data from the previous call to memory.
BLOCKHASH
Get the hash of one of the 256 most recent complete blocks.
COINBASE
Get the block’s beneficiary address.
TIMESTAMP
Get the block’s timestamp.
NUMBER
Get the block’s number.
DIFFICULTY
Get the block’s difficulty.
GASLIMIT
Get the block’s gas limit.
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 the program counter.
JUMPI
Conditionally alter the program counter.
PC
Get the value of the program counter prior to the increment corresponding to this instruction.
MSIZE
Get the size of active memory in bytes.
GAS
Get the amount of available gas, including the corresponding reduction the amount of available gas.
JUMPDEST
Mark a valid destination for jumps.
PUSH0
Place 0 byte item on stack.
PUSH1
Place 1 byte item on stack.
PUSH2
Place 2-byte item on stack.
PUSH3
Place 3-byte item on stack.
PUSH4
Place 4-byte item on stack.
PUSH5
Place 5-byte item on stack.
PUSH6
Place 6-byte item on stack.
PUSH7
Place 7-byte item on stack.
PUSH8
Place 8-byte item on stack.
PUSH9
Place 9-byte item on stack.
PUSH10
Place 10-byte item on stack.
PUSH11
Place 11-byte item on stack.
PUSH12
Place 12-byte item on stack.
PUSH13
Place 13-byte item on stack.
PUSH14
Place 14-byte item on stack.
PUSH15
Place 15-byte item on stack.
PUSH16
Place 16-byte item on stack.
PUSH17
Place 17-byte item on stack.
PUSH18
Place 18-byte item on stack.
PUSH19
Place 19-byte item on stack.
PUSH20
Place 20-byte item on stack.
PUSH21
Place 21-byte item on stack.
PUSH22
Place 22-byte item on stack.
PUSH23
Place 23-byte item on stack.
PUSH24
Place 24-byte item on stack.
PUSH25
Place 25-byte item on stack.
PUSH26
Place 26-byte item on stack.
PUSH27
Place 27-byte item on stack.
PUSH28
Place 28-byte item on stack.
PUSH29
Place 29-byte item on stack.
PUSH30
Place 30-byte item on stack.
PUSH31
Place 31-byte item on stack.
PUSH32
Place 32-byte (full word) item on 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 one topic.
LOG2
Append log record with two topics.
LOG3
Append log record with three topics.
LOG4
Append log record with four topics.
CREATE
Create a new account with associated
CALL
Message-call into an account.
CALLCODE
Message-call into this account with alternative account’s code.
RETURN
Halt execution returning output data.
DELEGATECALL
Message-call into this account with an alternative account’s code, but persisting into this account with an alternative account’s code, but persisting into this account’s storage and context.
CREATE2
Create a new account with associated code at a specified address.
STATICCALL
Static message-call into an account.
REVERT
Stop execution and revert state changes, without consuming all provided gas and providing a reason.
INVALID
Designated invalid instruction.
SELFDESTRUCT
Halt execution and register account for later deletion.