Expand description
EVM instruction set.
Structs§
- Add
- Addition operation.
- AddMod
- Modulo addition operation.
- Address
- Get address of currently executing account.
- And
- Bitwise AND operation.
- Balance
- Get balance of the given account.
- BaseFee
- Get the base fee.
- Blob
Base Fee - Returns the value of the blob base-fee of the current block.
- Blob
Hash - Get versioned hashes.
- Block
Hash - Get the hash of one of the 256 most recent complete blocks.
- Byte
- Retrieve single byte from word.
- Call
- Message-call into an account.
- Call
Code - Message-call into this account with alternative account’s code.
- Call
Data Copy - Copy input data in current environment to memory.
- Call
Data Load - Get input data of current environment.
- Call
Data Size - Get size of input data in current environment.
- Call
Value - Get deposited value by the instruction/transaction responsible for this execution.
- Caller
- Get caller address.
- ChainId
- Get the chain ID.
- Code
Copy - Copy code running in current environment to memory.
- Code
Size - Get size of code running in current environment.
- Coin
Base - Get the block’s beneficiary address.
- Create
- Create a new account with associated code.
- Create2
- Create a new account with associated code at a predictable address.
- Delegate
Call - Message-call into this account with an alternative account’s code, but persisting the current values for sender and value.
- Div
- Integer division operation.
- Dup
- Duplicate stack items.
The
Nconstant signifies the type of theDUPopcode (e.g.Dup<16>=>DUP16). - Eq
- Equality comparison.
- Exp
- Exponential operation.
- ExtCode
Copy - Copy an account’s code to memory.
- ExtCode
Hash - Get hash of an account’s code.
- ExtCode
Size - Get size of an account’s code.
- Gas
- Get the amount of available gas, including the corresponding reduction for the cost of this instruction.
- GasLimit
- Get the block’s gas limit.
- GasPrice
- Get price of gas in current environment.
- Gt
- Greater-than comparison.
- Invalid
- Designated invalid instruction.
- IsZero
- Is-zero comparison.
- Jump
- Alter the program counter.
- Jump
Dest - Mark a valid destination for jumps.
- JumpI
- Conditionally alter the program counter.
- Keccak256
- Compute Keccak-256 hash.
- Log
- Append log record.
The
Nconstant signifies the type of theLOGopcode (e.g.Log<3>=>LOG3). - Lt
- Less-than comparison.
- MCopy
- Copy memory areas.
- MLoad
- Load word from memory.
- MSize
- Get the size of active memory in bytes.
- MStore
- Save word to memory.
- MStore8
- Save byte to memory.
- Mod
- Modulo remainder operation.
- Mul
- Multiplication operation.
- MulMod
- Modulo multiplication operation.
- Not
- Bitwise NOT operation.
- Number
- Get the block’s number.
- Or
- Bitwise OR operation.
- Origin
- Get execution origination address.
- Pc
- Get the value of the program counter prior to the increment corresponding to this instruction.
- Pop
- Remove item from stack.
- Prev
Randao - Get the block’s difficulty.
- Push
- Place item on stack.
The
Nconstant signifies the type of thePUSHopcode (e.g.Push<32>=>PUSH32). - Return
- Halt execution returning output data.
- Return
Data Copy - Copy output data from the previous call to memory.
- Return
Data Size - Get size of output data from the previous call from the current environment.
- Revert
- Halt execution reverting state changes but returning data and remaining gas.
- SDiv
- Signed integer division operation (truncated).
- SGt
- Signed greater-than comparison.
- SLoad
- Load word from storage.
- SLt
- Signed less-than comparison.
- SMod
- Signed modulo remainder operation.
- SStore
- Save word to storage.
- Sar
- Arithmetic (signed) right shift operation.
- Self
Balance - Get balance of currently executing account.
- Self
Destruct - Halt execution and register account for later deletion or send all Ether to address (post-Cancun).
- Shl
- Left shift operation.
- Shr
- Logical right shift operation.
- Sign
Extend - Extend length of two’s complement signed integer.
- Static
Call - Static message-call into an account.
- Stop
- Halts execution.
- Sub
- Subtraction operation.
- Swap
- Exchange stack items.
The
Nconstant signifies the type of theSWAPopcode (e.g.Swap<16>=>SWAP16). - TLoad
- Load word from transient storage.
- TStore
- Save word to transient storage.
- Timestamp
- Get the block’s timestamp.
- Unknown
- An identified instruction.
The difference between this instruction and
Invalidis that theInvalidinstruction is explicitly defined in the specification and this instruction is a catch-all instruction for any operation code not defined in the specification. Otherwise they behave the exact same way. - Xor
- Bitwise XOR operation.
Traits§
- Instruction
- General instruction information.