Module instruction

Module instruction 

Source
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.
BlobBaseFee
Returns the value of the blob base-fee of the current block.
BlobHash
Get versioned hashes.
BlockHash
Get the hash of one of the 256 most recent complete blocks.
Byte
Retrieve single byte from word.
Call
Message-call into an account.
CallCode
Message-call into this account with alternative account’s code.
CallDataCopy
Copy input data in current environment to memory.
CallDataLoad
Get input data of current environment.
CallDataSize
Get size of input data in current environment.
CallValue
Get deposited value by the instruction/transaction responsible for this execution.
Caller
Get caller address.
ChainId
Get the chain ID.
CodeCopy
Copy code running in current environment to memory.
CodeSize
Get size of code running in current environment.
CoinBase
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.
DelegateCall
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 N constant signifies the type of the DUP opcode (e.g. Dup<16> => DUP16).
Eq
Equality comparison.
Exp
Exponential operation.
ExtCodeCopy
Copy an account’s code to memory.
ExtCodeHash
Get hash of an account’s code.
ExtCodeSize
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.
JumpDest
Mark a valid destination for jumps.
JumpI
Conditionally alter the program counter.
Keccak256
Compute Keccak-256 hash.
Log
Append log record. The N constant signifies the type of the LOG opcode (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.
PrevRandao
Get the block’s difficulty.
Push
Place item on stack. The N constant signifies the type of the PUSH opcode (e.g. Push<32> => PUSH32).
Return
Halt execution returning output data.
ReturnDataCopy
Copy output data from the previous call to memory.
ReturnDataSize
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.
SelfBalance
Get balance of currently executing account.
SelfDestruct
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.
SignExtend
Extend length of two’s complement signed integer.
StaticCall
Static message-call into an account.
Stop
Halts execution.
Sub
Subtraction operation.
Swap
Exchange stack items. The N constant signifies the type of the SWAP opcode (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 Invalid is that the Invalid instruction 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.