Enum evm::Instruction[][src]

#[repr(u8)]
pub enum Instruction { 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, BLOCKHASH, COINBASE, TIMESTAMP, NUMBER, DIFFICULTY, GASLIMIT, POP, MLOAD, MSTORE, MSTORE8, SLOAD, SSTORE, JUMP, JUMPI, PC, MSIZE, GAS, JUMPDEST, 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, REVERT, STATICCALL, SUICIDE, }

Virtual machine bytecode instruction.

Variants

halts execution

addition operation

mulitplication operation

subtraction operation

integer division operation

signed integer division operation

modulo remainder operation

signed modulo remainder operation

unsigned modular addition

unsigned modular multiplication

exponential operation

extend length of signed integer

less-than comparision

greater-than comparision

signed less-than comparision

signed greater-than comparision

equality comparision

simple not operator

bitwise AND operation

bitwise OR operation

bitwise XOR operation

bitwise NOT opertation

retrieve single byte from word

shift left operation

logical shift right operation

arithmetic shift right operation

compute SHA3-256 hash

get address of currently executing account

get balance of the given account

get execution origination address

get caller address

get deposited value by the instruction/transaction responsible for this execution

get input data of current environment

get size of input data in current environment

copy input data in current environment to memory

get size of code running in current environment

copy code running in current environment to memory

get price of gas in current environment

get external code size (from another contract)

copy external code (from another contract)

get the size of the return data buffer for the last call

copy return data buffer to memory

get hash of most recent complete block

get the block's coinbase address

get the block's timestamp

get the block's number

get the block's difficulty

get the block's gas limit

remove item from stack

load word from memory

save word to memory

save byte to memory

load word from storage

save word to storage

alter the program counter

conditionally alter the program counter

get the program counter

get the size of active memory

get the amount of available gas

set a potential jump destination

place 1 byte item on stack

place 2 byte item on stack

place 3 byte item on stack

place 4 byte item on stack

place 5 byte item on stack

place 6 byte item on stack

place 7 byte item on stack

place 8 byte item on stack

place 9 byte item on stack

place 10 byte item on stack

place 11 byte item on stack

place 12 byte item on stack

place 13 byte item on stack

place 14 byte item on stack

place 15 byte item on stack

place 16 byte item on stack

place 17 byte item on stack

place 18 byte item on stack

place 19 byte item on stack

place 20 byte item on stack

place 21 byte item on stack

place 22 byte item on stack

place 23 byte item on stack

place 24 byte item on stack

place 25 byte item on stack

place 26 byte item on stack

place 27 byte item on stack

place 28 byte item on stack

place 29 byte item on stack

place 30 byte item on stack

place 31 byte item on stack

place 32 byte item on stack

copies the highest item in the stack to the top of the stack

copies the second highest item in the stack to the top of the stack

copies the third highest item in the stack to the top of the stack

copies the 4th highest item in the stack to the top of the stack

copies the 5th highest item in the stack to the top of the stack

copies the 6th highest item in the stack to the top of the stack

copies the 7th highest item in the stack to the top of the stack

copies the 8th highest item in the stack to the top of the stack

copies the 9th highest item in the stack to the top of the stack

copies the 10th highest item in the stack to the top of the stack

copies the 11th highest item in the stack to the top of the stack

copies the 12th highest item in the stack to the top of the stack

copies the 13th highest item in the stack to the top of the stack

copies the 14th highest item in the stack to the top of the stack

copies the 15th highest item in the stack to the top of the stack

copies the 16th highest item in the stack to the top of the stack

swaps the highest and second highest value on the stack

swaps the highest and third highest value on the stack

swaps the highest and 4th highest value on the stack

swaps the highest and 5th highest value on the stack

swaps the highest and 6th highest value on the stack

swaps the highest and 7th highest value on the stack

swaps the highest and 8th highest value on the stack

swaps the highest and 9th highest value on the stack

swaps the highest and 10th highest value on the stack

swaps the highest and 11th highest value on the stack

swaps the highest and 12th highest value on the stack

swaps the highest and 13th highest value on the stack

swaps the highest and 14th highest value on the stack

swaps the highest and 15th highest value on the stack

swaps the highest and 16th highest value on the stack

swaps the highest and 17th highest value on the stack

Makes a log entry, no topics.

Makes a log entry, 1 topic.

Makes a log entry, 2 topics.

Makes a log entry, 3 topics.

Makes a log entry, 4 topics.

create a new account with associated code

message-call into an account

message-call with another account's code only

halt execution returning output data

like CALLCODE but keeps caller's value and sender

create a new account and set creation address to sha3(sender + sha3(init code)) % 2**160

stop execution and revert state changes. Return output data.

like CALL but it does not take value, nor modify the state

halt execution and register account for later deletion

Methods

impl Instruction
[src]

Convert from u8 to the given enum

impl Instruction
[src]

Returns true if given instruction is PUSHN instruction.

Returns number of bytes to read for PUSHN instruction PUSH1 -> 1

Returns stack position of item to duplicate DUP1 -> 0

Returns stack position of item to SWAP top with SWAP1 -> 1

Returns number of topics to take from stack LOG0 -> 0

Returns the instruction info.

Trait Implementations

impl Eq for Instruction
[src]

impl PartialEq for Instruction
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Ord for Instruction
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl PartialOrd for Instruction
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Clone for Instruction
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Instruction
[src]

impl Debug for Instruction
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Instruction

impl Sync for Instruction