Skip to main content

Mnemonic

Enum Mnemonic 

Source
#[non_exhaustive]
#[repr(u8)]
pub enum Mnemonic {
Show 149 variants STOP = 0, ADD = 1, MUL = 2, SUB = 3, DIV = 4, SDIV = 5, MOD = 6, SMOD = 7, ADDMOD = 8, MULMOD = 9, EXP = 10, SIGNEXTEND = 11, LT = 16, GT = 17, SLT = 18, SGT = 19, EQ = 20, ISZERO = 21, AND = 22, OR = 23, XOR = 24, NOT = 25, BYTE = 26, SHL = 27, SHR = 28, SAR = 29, KECCAK256 = 32, ADDRESS = 48, BALANCE = 49, ORIGIN = 50, CALLER = 51, CALLVALUE = 52, CALLDATALOAD = 53, CALLDATASIZE = 54, CALLDATACOPY = 55, CODESIZE = 56, CODECOPY = 57, GASPRICE = 58, EXTCODESIZE = 59, EXTCODECOPY = 60, RETURNDATASIZE = 61, RETURNDATACOPY = 62, EXTCODEHASH = 63, BLOCKHASH = 64, COINBASE = 65, TIMESTAMP = 66, NUMBER = 67, PREVRANDAO = 68, GASLIMIT = 69, CHAINID = 70, SELFBALANCE = 71, BASEFEE = 72, BLOBHASH = 73, BLOBBASEFEE = 74, POP = 80, MLOAD = 81, MSTORE = 82, MSTORE8 = 83, SLOAD = 84, SSTORE = 85, JUMP = 86, JUMPI = 87, PC = 88, MSIZE = 89, GAS = 90, JUMPDEST = 91, TLOAD = 92, TSTORE = 93, MCOPY = 94, PUSH0 = 95, PUSH1 = 96, PUSH2 = 97, PUSH3 = 98, PUSH4 = 99, PUSH5 = 100, PUSH6 = 101, PUSH7 = 102, PUSH8 = 103, PUSH9 = 104, PUSH10 = 105, PUSH11 = 106, PUSH12 = 107, PUSH13 = 108, PUSH14 = 109, PUSH15 = 110, PUSH16 = 111, PUSH17 = 112, PUSH18 = 113, PUSH19 = 114, PUSH20 = 115, PUSH21 = 116, PUSH22 = 117, PUSH23 = 118, PUSH24 = 119, PUSH25 = 120, PUSH26 = 121, PUSH27 = 122, PUSH28 = 123, PUSH29 = 124, PUSH30 = 125, PUSH31 = 126, PUSH32 = 127, DUP1 = 128, DUP2 = 129, DUP3 = 130, DUP4 = 131, DUP5 = 132, DUP6 = 133, DUP7 = 134, DUP8 = 135, DUP9 = 136, DUP10 = 137, DUP11 = 138, DUP12 = 139, DUP13 = 140, DUP14 = 141, DUP15 = 142, DUP16 = 143, SWAP1 = 144, SWAP2 = 145, SWAP3 = 146, SWAP4 = 147, SWAP5 = 148, SWAP6 = 149, SWAP7 = 150, SWAP8 = 151, SWAP9 = 152, SWAP10 = 153, SWAP11 = 154, SWAP12 = 155, SWAP13 = 156, SWAP14 = 157, SWAP15 = 158, SWAP16 = 159, LOG0 = 160, LOG1 = 161, LOG2 = 162, LOG3 = 163, LOG4 = 164, CREATE = 240, CALL = 241, CALLCODE = 242, RETURN = 243, DELEGATECALL = 244, CREATE2 = 245, STATICCALL = 250, REVERT = 253, INVALID = 254, SELFDESTRUCT = 255,
}
Expand description

EVM operation code mnemonic.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

STOP = 0

Halts execution.

§

ADD = 1

Addition operation.

§

MUL = 2

Multiplication operation.

§

SUB = 3

Subtraction operation.

§

DIV = 4

Integer division operation.

§

SDIV = 5

Signed integer division operation (truncated).

§

MOD = 6

Modulo remainder operation.

§

SMOD = 7

Signed modulo remainder operation.

§

ADDMOD = 8

Modulo addition operation.

§

MULMOD = 9

Modulo multiplication operation.

§

EXP = 10

Exponential operation.

§

SIGNEXTEND = 11

Extend length of two’s complement signed integer.

§

LT = 16

Less-than comparison.

§

GT = 17

Greater-than comparison.

§

SLT = 18

Signed less-than comparison.

§

SGT = 19

Signed greater-than comparison.

§

EQ = 20

Equality comparison.

§

ISZERO = 21

Is-zero comparison.

§

AND = 22

Bitwise AND operation.

§

OR = 23

Bitwise OR operation.

§

XOR = 24

Bitwise XOR operation.

§

NOT = 25

Bitwise NOT operation.

§

BYTE = 26

Retrieve single byte from word.

§

SHL = 27

Left shift operation.

§

SHR = 28

Logical right shift operation.

§

SAR = 29

Arithmetic (signed) right shift operation.

§

KECCAK256 = 32

Compute Keccak-256 hash.

§

ADDRESS = 48

Get address of currently executing account.

§

BALANCE = 49

Get balance of the given account.

§

ORIGIN = 50

Get execution origination address.

§

CALLER = 51

Get caller address.

§

CALLVALUE = 52

Get deposited value by the instruction/transaction responsible for this execution.

§

CALLDATALOAD = 53

Get input data of current environment.

§

CALLDATASIZE = 54

Get size of input data in current environment.

§

CALLDATACOPY = 55

Copy input data in current environment to memory.

§

CODESIZE = 56

Get size of code running in current environment.

§

CODECOPY = 57

Copy code running in current environment to memory.

§

GASPRICE = 58

Get price of gas in current environment.

§

EXTCODESIZE = 59

Get size of an account’s code.

§

EXTCODECOPY = 60

Copy an account’s code to memory.

§

RETURNDATASIZE = 61

Get size of output data from the previous call from the current environment.

§

RETURNDATACOPY = 62

Copy output data from the previous call to memory.

§

EXTCODEHASH = 63

Get hash of an account’s code.

§

BLOCKHASH = 64

Get the hash of one of the 256 most recent complete blocks.

§

COINBASE = 65

Get the block’s beneficiary address.

§

TIMESTAMP = 66

Get the block’s timestamp.

§

NUMBER = 67

Get the block’s number.

§

PREVRANDAO = 68

Get the block’s difficulty.

§

GASLIMIT = 69

Get the block’s gas limit.

§

CHAINID = 70

Get the chain ID.

§

SELFBALANCE = 71

Get balance of currently executing account.

§

BASEFEE = 72

Get the base fee.

§

BLOBHASH = 73

Get versioned hashes.

§

BLOBBASEFEE = 74

Returns the value of the blob base-fee of the current block.

§

POP = 80

Remove item from stack.

§

MLOAD = 81

Load word from memory.

§

MSTORE = 82

Save word to memory.

§

MSTORE8 = 83

Save byte to memory.

§

SLOAD = 84

Load word from storage.

§

SSTORE = 85

Save word to storage.

§

JUMP = 86

Alter the program counter.

§

JUMPI = 87

Conditionally alter the program counter.

§

PC = 88

Get the value of the program counter prior to the increment corresponding to this instruction.

§

MSIZE = 89

Get the size of active memory in bytes.

§

GAS = 90

Get the amount of available gas, including the corresponding reduction for the cost of this instruction.

§

JUMPDEST = 91

Mark a valid destination for jumps.

§

TLOAD = 92

Load word from transient storage.

§

TSTORE = 93

Save word to transient storage.

§

MCOPY = 94

Copy memory areas.

§

PUSH0 = 95

Place value 0 on stack.

§

PUSH1 = 96

Place 1 byte item on stack.

§

PUSH2 = 97

Place 2 byte item on stack.

§

PUSH3 = 98

Place 3 byte item on stack.

§

PUSH4 = 99

Place 4 byte item on stack.

§

PUSH5 = 100

Place 5 byte item on stack.

§

PUSH6 = 101

Place 6 byte item on stack.

§

PUSH7 = 102

Place 7 byte item on stack.

§

PUSH8 = 103

Place 8 byte item on stack.

§

PUSH9 = 104

Place 9 byte item on stack.

§

PUSH10 = 105

Place 10 byte item on stack.

§

PUSH11 = 106

Place 11 byte item on stack.

§

PUSH12 = 107

Place 12 byte item on stack.

§

PUSH13 = 108

Place 13 byte item on stack.

§

PUSH14 = 109

Place 14 byte item on stack.

§

PUSH15 = 110

Place 15 byte item on stack.

§

PUSH16 = 111

Place 16 byte item on stack.

§

PUSH17 = 112

Place 17 byte item on stack.

§

PUSH18 = 113

Place 18 byte item on stack.

§

PUSH19 = 114

Place 19 byte item on stack.

§

PUSH20 = 115

Place 20 byte item on stack.

§

PUSH21 = 116

Place 21 byte item on stack.

§

PUSH22 = 117

Place 22 byte item on stack.

§

PUSH23 = 118

Place 23 byte item on stack.

§

PUSH24 = 119

Place 24 byte item on stack.

§

PUSH25 = 120

Place 25 byte item on stack.

§

PUSH26 = 121

Place 26 byte item on stack.

§

PUSH27 = 122

Place 27 byte item on stack.

§

PUSH28 = 123

Place 28 byte item on stack.

§

PUSH29 = 124

Place 29 byte item on stack.

§

PUSH30 = 125

Place 30 byte item on stack.

§

PUSH31 = 126

Place 31 byte item on stack.

§

PUSH32 = 127

Place 32 byte (full word) item on stack.

§

DUP1 = 128

Duplicate 1st stack item.

§

DUP2 = 129

Duplicate 2nd stack item.

§

DUP3 = 130

Duplicate 3rd stack item.

§

DUP4 = 131

Duplicate 4th stack item.

§

DUP5 = 132

Duplicate 5th stack item.

§

DUP6 = 133

Duplicate 6th stack item.

§

DUP7 = 134

Duplicate 7th stack item.

§

DUP8 = 135

Duplicate 8th stack item.

§

DUP9 = 136

Duplicate 9th stack item.

§

DUP10 = 137

Duplicate 10th stack item.

§

DUP11 = 138

Duplicate 11th stack item.

§

DUP12 = 139

Duplicate 12th stack item.

§

DUP13 = 140

Duplicate 13th stack item.

§

DUP14 = 141

Duplicate 14th stack item.

§

DUP15 = 142

Duplicate 15th stack item.

§

DUP16 = 143

Duplicate 16th stack item.

§

SWAP1 = 144

Exchange 1st and 2nd stack items.

§

SWAP2 = 145

Exchange 1st and 3rd stack items.

§

SWAP3 = 146

Exchange 1st and 4th stack items.

§

SWAP4 = 147

Exchange 1st and 5th stack items.

§

SWAP5 = 148

Exchange 1st and 6th stack items.

§

SWAP6 = 149

Exchange 1st and 7th stack items.

§

SWAP7 = 150

Exchange 1st and 8th stack items.

§

SWAP8 = 151

Exchange 1st and 9th stack items.

§

SWAP9 = 152

Exchange 1st and 10th stack items.

§

SWAP10 = 153

Exchange 1st and 11th stack items.

§

SWAP11 = 154

Exchange 1st and 12th stack items.

§

SWAP12 = 155

Exchange 1st and 13th stack items.

§

SWAP13 = 156

Exchange 1st and 14th stack items.

§

SWAP14 = 157

Exchange 1st and 15th stack items.

§

SWAP15 = 158

Exchange 1st and 16th stack items.

§

SWAP16 = 159

Exchange 1st and 17th stack items.

§

LOG0 = 160

Append log record with no topics.

§

LOG1 = 161

Append log record with one topic.

§

LOG2 = 162

Append log record with two topics.

§

LOG3 = 163

Append log record with three topics.

§

LOG4 = 164

Append log record with four topics.

§

CREATE = 240

Create a new account with associated code.

§

CALL = 241

Message-call into an account.

§

CALLCODE = 242

Message-call into this account with alternative account’s code.

§

RETURN = 243

Halt execution returning output data.

§

DELEGATECALL = 244

Message-call into this account with an alternative account’s code, but persisting the current values for sender and value.

§

CREATE2 = 245

Create a new account with associated code at a predictable address.

§

STATICCALL = 250

Static message-call into an account.

§

REVERT = 253

Halt execution reverting state changes but returning data and remaining gas.

§

INVALID = 254

Designated invalid instruction.

§

SELFDESTRUCT = 255

Halt execution and register account for later deletion or send all Ether to address (post-Cancun).

Implementations§

Source§

impl Mnemonic

Source

pub const fn from_repr(discriminant: u8) -> Option<Mnemonic>

Try to create Self from the raw representation

Source§

impl Mnemonic

Source

pub const fn is_stop(&self) -> bool

Returns true if the enum is Mnemonic::STOP otherwise false

Source

pub const fn is_add(&self) -> bool

Returns true if the enum is Mnemonic::ADD otherwise false

Source

pub const fn is_mul(&self) -> bool

Returns true if the enum is Mnemonic::MUL otherwise false

Source

pub const fn is_sub(&self) -> bool

Returns true if the enum is Mnemonic::SUB otherwise false

Source

pub const fn is_div(&self) -> bool

Returns true if the enum is Mnemonic::DIV otherwise false

Source

pub const fn is_sdiv(&self) -> bool

Returns true if the enum is Mnemonic::SDIV otherwise false

Source

pub const fn is_mod(&self) -> bool

Returns true if the enum is Mnemonic::MOD otherwise false

Source

pub const fn is_smod(&self) -> bool

Returns true if the enum is Mnemonic::SMOD otherwise false

Source

pub const fn is_addmod(&self) -> bool

Returns true if the enum is Mnemonic::ADDMOD otherwise false

Source

pub const fn is_mulmod(&self) -> bool

Returns true if the enum is Mnemonic::MULMOD otherwise false

Source

pub const fn is_exp(&self) -> bool

Returns true if the enum is Mnemonic::EXP otherwise false

Source

pub const fn is_signextend(&self) -> bool

Returns true if the enum is Mnemonic::SIGNEXTEND otherwise false

Source

pub const fn is_lt(&self) -> bool

Returns true if the enum is Mnemonic::LT otherwise false

Source

pub const fn is_gt(&self) -> bool

Returns true if the enum is Mnemonic::GT otherwise false

Source

pub const fn is_slt(&self) -> bool

Returns true if the enum is Mnemonic::SLT otherwise false

Source

pub const fn is_sgt(&self) -> bool

Returns true if the enum is Mnemonic::SGT otherwise false

Source

pub const fn is_eq(&self) -> bool

Returns true if the enum is Mnemonic::EQ otherwise false

Source

pub const fn is_iszero(&self) -> bool

Returns true if the enum is Mnemonic::ISZERO otherwise false

Source

pub const fn is_and(&self) -> bool

Returns true if the enum is Mnemonic::AND otherwise false

Source

pub const fn is_or(&self) -> bool

Returns true if the enum is Mnemonic::OR otherwise false

Source

pub const fn is_xor(&self) -> bool

Returns true if the enum is Mnemonic::XOR otherwise false

Source

pub const fn is_not(&self) -> bool

Returns true if the enum is Mnemonic::NOT otherwise false

Source

pub const fn is_byte(&self) -> bool

Returns true if the enum is Mnemonic::BYTE otherwise false

Source

pub const fn is_shl(&self) -> bool

Returns true if the enum is Mnemonic::SHL otherwise false

Source

pub const fn is_shr(&self) -> bool

Returns true if the enum is Mnemonic::SHR otherwise false

Source

pub const fn is_sar(&self) -> bool

Returns true if the enum is Mnemonic::SAR otherwise false

Source

pub const fn is_keccak_256(&self) -> bool

Returns true if the enum is Mnemonic::KECCAK256 otherwise false

Source

pub const fn is_address(&self) -> bool

Returns true if the enum is Mnemonic::ADDRESS otherwise false

Source

pub const fn is_balance(&self) -> bool

Returns true if the enum is Mnemonic::BALANCE otherwise false

Source

pub const fn is_origin(&self) -> bool

Returns true if the enum is Mnemonic::ORIGIN otherwise false

Source

pub const fn is_caller(&self) -> bool

Returns true if the enum is Mnemonic::CALLER otherwise false

Source

pub const fn is_callvalue(&self) -> bool

Returns true if the enum is Mnemonic::CALLVALUE otherwise false

Source

pub const fn is_calldataload(&self) -> bool

Returns true if the enum is Mnemonic::CALLDATALOAD otherwise false

Source

pub const fn is_calldatasize(&self) -> bool

Returns true if the enum is Mnemonic::CALLDATASIZE otherwise false

Source

pub const fn is_calldatacopy(&self) -> bool

Returns true if the enum is Mnemonic::CALLDATACOPY otherwise false

Source

pub const fn is_codesize(&self) -> bool

Returns true if the enum is Mnemonic::CODESIZE otherwise false

Source

pub const fn is_codecopy(&self) -> bool

Returns true if the enum is Mnemonic::CODECOPY otherwise false

Source

pub const fn is_gasprice(&self) -> bool

Returns true if the enum is Mnemonic::GASPRICE otherwise false

Source

pub const fn is_extcodesize(&self) -> bool

Returns true if the enum is Mnemonic::EXTCODESIZE otherwise false

Source

pub const fn is_extcodecopy(&self) -> bool

Returns true if the enum is Mnemonic::EXTCODECOPY otherwise false

Source

pub const fn is_returndatasize(&self) -> bool

Returns true if the enum is Mnemonic::RETURNDATASIZE otherwise false

Source

pub const fn is_returndatacopy(&self) -> bool

Returns true if the enum is Mnemonic::RETURNDATACOPY otherwise false

Source

pub const fn is_extcodehash(&self) -> bool

Returns true if the enum is Mnemonic::EXTCODEHASH otherwise false

Source

pub const fn is_blockhash(&self) -> bool

Returns true if the enum is Mnemonic::BLOCKHASH otherwise false

Source

pub const fn is_coinbase(&self) -> bool

Returns true if the enum is Mnemonic::COINBASE otherwise false

Source

pub const fn is_timestamp(&self) -> bool

Returns true if the enum is Mnemonic::TIMESTAMP otherwise false

Source

pub const fn is_number(&self) -> bool

Returns true if the enum is Mnemonic::NUMBER otherwise false

Source

pub const fn is_prevrandao(&self) -> bool

Returns true if the enum is Mnemonic::PREVRANDAO otherwise false

Source

pub const fn is_gaslimit(&self) -> bool

Returns true if the enum is Mnemonic::GASLIMIT otherwise false

Source

pub const fn is_chainid(&self) -> bool

Returns true if the enum is Mnemonic::CHAINID otherwise false

Source

pub const fn is_selfbalance(&self) -> bool

Returns true if the enum is Mnemonic::SELFBALANCE otherwise false

Source

pub const fn is_basefee(&self) -> bool

Returns true if the enum is Mnemonic::BASEFEE otherwise false

Source

pub const fn is_blobhash(&self) -> bool

Returns true if the enum is Mnemonic::BLOBHASH otherwise false

Source

pub const fn is_blobbasefee(&self) -> bool

Returns true if the enum is Mnemonic::BLOBBASEFEE otherwise false

Source

pub const fn is_pop(&self) -> bool

Returns true if the enum is Mnemonic::POP otherwise false

Source

pub const fn is_mload(&self) -> bool

Returns true if the enum is Mnemonic::MLOAD otherwise false

Source

pub const fn is_mstore(&self) -> bool

Returns true if the enum is Mnemonic::MSTORE otherwise false

Source

pub const fn is_mstore_8(&self) -> bool

Returns true if the enum is Mnemonic::MSTORE8 otherwise false

Source

pub const fn is_sload(&self) -> bool

Returns true if the enum is Mnemonic::SLOAD otherwise false

Source

pub const fn is_sstore(&self) -> bool

Returns true if the enum is Mnemonic::SSTORE otherwise false

Source

pub const fn is_jump(&self) -> bool

Returns true if the enum is Mnemonic::JUMP otherwise false

Source

pub const fn is_jumpi(&self) -> bool

Returns true if the enum is Mnemonic::JUMPI otherwise false

Source

pub const fn is_pc(&self) -> bool

Returns true if the enum is Mnemonic::PC otherwise false

Source

pub const fn is_msize(&self) -> bool

Returns true if the enum is Mnemonic::MSIZE otherwise false

Source

pub const fn is_gas(&self) -> bool

Returns true if the enum is Mnemonic::GAS otherwise false

Source

pub const fn is_jumpdest(&self) -> bool

Returns true if the enum is Mnemonic::JUMPDEST otherwise false

Source

pub const fn is_tload(&self) -> bool

Returns true if the enum is Mnemonic::TLOAD otherwise false

Source

pub const fn is_tstore(&self) -> bool

Returns true if the enum is Mnemonic::TSTORE otherwise false

Source

pub const fn is_mcopy(&self) -> bool

Returns true if the enum is Mnemonic::MCOPY otherwise false

Source

pub const fn is_push_0(&self) -> bool

Returns true if the enum is Mnemonic::PUSH0 otherwise false

Source

pub const fn is_push_1(&self) -> bool

Returns true if the enum is Mnemonic::PUSH1 otherwise false

Source

pub const fn is_push_2(&self) -> bool

Returns true if the enum is Mnemonic::PUSH2 otherwise false

Source

pub const fn is_push_3(&self) -> bool

Returns true if the enum is Mnemonic::PUSH3 otherwise false

Source

pub const fn is_push_4(&self) -> bool

Returns true if the enum is Mnemonic::PUSH4 otherwise false

Source

pub const fn is_push_5(&self) -> bool

Returns true if the enum is Mnemonic::PUSH5 otherwise false

Source

pub const fn is_push_6(&self) -> bool

Returns true if the enum is Mnemonic::PUSH6 otherwise false

Source

pub const fn is_push_7(&self) -> bool

Returns true if the enum is Mnemonic::PUSH7 otherwise false

Source

pub const fn is_push_8(&self) -> bool

Returns true if the enum is Mnemonic::PUSH8 otherwise false

Source

pub const fn is_push_9(&self) -> bool

Returns true if the enum is Mnemonic::PUSH9 otherwise false

Source

pub const fn is_push_10(&self) -> bool

Returns true if the enum is Mnemonic::PUSH10 otherwise false

Source

pub const fn is_push_11(&self) -> bool

Returns true if the enum is Mnemonic::PUSH11 otherwise false

Source

pub const fn is_push_12(&self) -> bool

Returns true if the enum is Mnemonic::PUSH12 otherwise false

Source

pub const fn is_push_13(&self) -> bool

Returns true if the enum is Mnemonic::PUSH13 otherwise false

Source

pub const fn is_push_14(&self) -> bool

Returns true if the enum is Mnemonic::PUSH14 otherwise false

Source

pub const fn is_push_15(&self) -> bool

Returns true if the enum is Mnemonic::PUSH15 otherwise false

Source

pub const fn is_push_16(&self) -> bool

Returns true if the enum is Mnemonic::PUSH16 otherwise false

Source

pub const fn is_push_17(&self) -> bool

Returns true if the enum is Mnemonic::PUSH17 otherwise false

Source

pub const fn is_push_18(&self) -> bool

Returns true if the enum is Mnemonic::PUSH18 otherwise false

Source

pub const fn is_push_19(&self) -> bool

Returns true if the enum is Mnemonic::PUSH19 otherwise false

Source

pub const fn is_push_20(&self) -> bool

Returns true if the enum is Mnemonic::PUSH20 otherwise false

Source

pub const fn is_push_21(&self) -> bool

Returns true if the enum is Mnemonic::PUSH21 otherwise false

Source

pub const fn is_push_22(&self) -> bool

Returns true if the enum is Mnemonic::PUSH22 otherwise false

Source

pub const fn is_push_23(&self) -> bool

Returns true if the enum is Mnemonic::PUSH23 otherwise false

Source

pub const fn is_push_24(&self) -> bool

Returns true if the enum is Mnemonic::PUSH24 otherwise false

Source

pub const fn is_push_25(&self) -> bool

Returns true if the enum is Mnemonic::PUSH25 otherwise false

Source

pub const fn is_push_26(&self) -> bool

Returns true if the enum is Mnemonic::PUSH26 otherwise false

Source

pub const fn is_push_27(&self) -> bool

Returns true if the enum is Mnemonic::PUSH27 otherwise false

Source

pub const fn is_push_28(&self) -> bool

Returns true if the enum is Mnemonic::PUSH28 otherwise false

Source

pub const fn is_push_29(&self) -> bool

Returns true if the enum is Mnemonic::PUSH29 otherwise false

Source

pub const fn is_push_30(&self) -> bool

Returns true if the enum is Mnemonic::PUSH30 otherwise false

Source

pub const fn is_push_31(&self) -> bool

Returns true if the enum is Mnemonic::PUSH31 otherwise false

Source

pub const fn is_push_32(&self) -> bool

Returns true if the enum is Mnemonic::PUSH32 otherwise false

Source

pub const fn is_dup_1(&self) -> bool

Returns true if the enum is Mnemonic::DUP1 otherwise false

Source

pub const fn is_dup_2(&self) -> bool

Returns true if the enum is Mnemonic::DUP2 otherwise false

Source

pub const fn is_dup_3(&self) -> bool

Returns true if the enum is Mnemonic::DUP3 otherwise false

Source

pub const fn is_dup_4(&self) -> bool

Returns true if the enum is Mnemonic::DUP4 otherwise false

Source

pub const fn is_dup_5(&self) -> bool

Returns true if the enum is Mnemonic::DUP5 otherwise false

Source

pub const fn is_dup_6(&self) -> bool

Returns true if the enum is Mnemonic::DUP6 otherwise false

Source

pub const fn is_dup_7(&self) -> bool

Returns true if the enum is Mnemonic::DUP7 otherwise false

Source

pub const fn is_dup_8(&self) -> bool

Returns true if the enum is Mnemonic::DUP8 otherwise false

Source

pub const fn is_dup_9(&self) -> bool

Returns true if the enum is Mnemonic::DUP9 otherwise false

Source

pub const fn is_dup_10(&self) -> bool

Returns true if the enum is Mnemonic::DUP10 otherwise false

Source

pub const fn is_dup_11(&self) -> bool

Returns true if the enum is Mnemonic::DUP11 otherwise false

Source

pub const fn is_dup_12(&self) -> bool

Returns true if the enum is Mnemonic::DUP12 otherwise false

Source

pub const fn is_dup_13(&self) -> bool

Returns true if the enum is Mnemonic::DUP13 otherwise false

Source

pub const fn is_dup_14(&self) -> bool

Returns true if the enum is Mnemonic::DUP14 otherwise false

Source

pub const fn is_dup_15(&self) -> bool

Returns true if the enum is Mnemonic::DUP15 otherwise false

Source

pub const fn is_dup_16(&self) -> bool

Returns true if the enum is Mnemonic::DUP16 otherwise false

Source

pub const fn is_swap_1(&self) -> bool

Returns true if the enum is Mnemonic::SWAP1 otherwise false

Source

pub const fn is_swap_2(&self) -> bool

Returns true if the enum is Mnemonic::SWAP2 otherwise false

Source

pub const fn is_swap_3(&self) -> bool

Returns true if the enum is Mnemonic::SWAP3 otherwise false

Source

pub const fn is_swap_4(&self) -> bool

Returns true if the enum is Mnemonic::SWAP4 otherwise false

Source

pub const fn is_swap_5(&self) -> bool

Returns true if the enum is Mnemonic::SWAP5 otherwise false

Source

pub const fn is_swap_6(&self) -> bool

Returns true if the enum is Mnemonic::SWAP6 otherwise false

Source

pub const fn is_swap_7(&self) -> bool

Returns true if the enum is Mnemonic::SWAP7 otherwise false

Source

pub const fn is_swap_8(&self) -> bool

Returns true if the enum is Mnemonic::SWAP8 otherwise false

Source

pub const fn is_swap_9(&self) -> bool

Returns true if the enum is Mnemonic::SWAP9 otherwise false

Source

pub const fn is_swap_10(&self) -> bool

Returns true if the enum is Mnemonic::SWAP10 otherwise false

Source

pub const fn is_swap_11(&self) -> bool

Returns true if the enum is Mnemonic::SWAP11 otherwise false

Source

pub const fn is_swap_12(&self) -> bool

Returns true if the enum is Mnemonic::SWAP12 otherwise false

Source

pub const fn is_swap_13(&self) -> bool

Returns true if the enum is Mnemonic::SWAP13 otherwise false

Source

pub const fn is_swap_14(&self) -> bool

Returns true if the enum is Mnemonic::SWAP14 otherwise false

Source

pub const fn is_swap_15(&self) -> bool

Returns true if the enum is Mnemonic::SWAP15 otherwise false

Source

pub const fn is_swap_16(&self) -> bool

Returns true if the enum is Mnemonic::SWAP16 otherwise false

Source

pub const fn is_log_0(&self) -> bool

Returns true if the enum is Mnemonic::LOG0 otherwise false

Source

pub const fn is_log_1(&self) -> bool

Returns true if the enum is Mnemonic::LOG1 otherwise false

Source

pub const fn is_log_2(&self) -> bool

Returns true if the enum is Mnemonic::LOG2 otherwise false

Source

pub const fn is_log_3(&self) -> bool

Returns true if the enum is Mnemonic::LOG3 otherwise false

Source

pub const fn is_log_4(&self) -> bool

Returns true if the enum is Mnemonic::LOG4 otherwise false

Source

pub const fn is_create(&self) -> bool

Returns true if the enum is Mnemonic::CREATE otherwise false

Source

pub const fn is_call(&self) -> bool

Returns true if the enum is Mnemonic::CALL otherwise false

Source

pub const fn is_callcode(&self) -> bool

Returns true if the enum is Mnemonic::CALLCODE otherwise false

Source

pub const fn is_return(&self) -> bool

Returns true if the enum is Mnemonic::RETURN otherwise false

Source

pub const fn is_delegatecall(&self) -> bool

Returns true if the enum is Mnemonic::DELEGATECALL otherwise false

Source

pub const fn is_create_2(&self) -> bool

Returns true if the enum is Mnemonic::CREATE2 otherwise false

Source

pub const fn is_staticcall(&self) -> bool

Returns true if the enum is Mnemonic::STATICCALL otherwise false

Source

pub const fn is_revert(&self) -> bool

Returns true if the enum is Mnemonic::REVERT otherwise false

Source

pub const fn is_invalid(&self) -> bool

Returns true if the enum is Mnemonic::INVALID otherwise false

Source

pub const fn is_selfdestruct(&self) -> bool

Returns true if the enum is Mnemonic::SELFDESTRUCT otherwise false

Source§

impl Mnemonic

Source

pub const fn is_push(&self) -> bool

Returns a value signifying whether this mnemonic is of the type PUSHx.

§Example
assert_eq!(Mnemonic::PUSH7.is_push(), true);
assert_eq!(Mnemonic::GAS.is_push(), false);
Source

pub const fn is_dup(&self) -> bool

Returns a value signifying whether this mnemonic is of the type DUPx.

§Example
assert_eq!(Mnemonic::DUP2.is_dup(), true);
assert_eq!(Mnemonic::GAS.is_dup(), false);
Source

pub const fn is_swap(&self) -> bool

Returns a value signifying whether this mnemonic is of the type SWAPx.

§Example
assert_eq!(Mnemonic::SWAP2.is_swap(), true);
assert_eq!(Mnemonic::GAS.is_swap(), false);
Source

pub const fn is_log(&self) -> bool

Returns a value signifying whether this mnemonic is of the type LOGx.

§Example
assert_eq!(Mnemonic::LOG2.is_log(), true);
assert_eq!(Mnemonic::GAS.is_log(), false);
Source

pub const fn is_terminator(&self) -> bool

Returns true for mnemonics that terminate execution of the smart contract.

§Example
assert_eq!(Mnemonic::STOP.is_terminator(), true);
assert_eq!(Mnemonic::REVERT.is_terminator(), true);
assert_eq!(Mnemonic::INVALID.is_terminator(), true);
assert_eq!(Mnemonic::GAS.is_terminator(), false);

Trait Implementations§

Source§

impl Binary for Mnemonic

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Clone for Mnemonic

Source§

fn clone(&self) -> Mnemonic

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Mnemonic

Source§

impl Debug for Mnemonic

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Mnemonic

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl EnumCount for Mnemonic

Source§

const COUNT: usize = 149usize

Source§

impl Eq for Mnemonic

Source§

impl From<Mnemonic> for OpCode

Source§

fn from(value: Mnemonic) -> Self

Converts to this type from the input type.
Source§

impl Hash for Mnemonic

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl LowerHex for Mnemonic

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Octal for Mnemonic

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Ord for Mnemonic

Source§

fn cmp(&self, other: &Mnemonic) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Mnemonic

Source§

fn eq(&self, other: &Mnemonic) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<Mnemonic> for OpCode

Source§

fn eq(&self, other: &Mnemonic) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<OpCode> for Mnemonic

Source§

fn eq(&self, other: &OpCode) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<u8> for Mnemonic

Source§

fn eq(&self, other: &u8) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for Mnemonic

Source§

fn partial_cmp(&self, other: &Mnemonic) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<Mnemonic> for OpCode

Source§

fn partial_cmp(&self, other: &Mnemonic) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<OpCode> for Mnemonic

Source§

fn partial_cmp(&self, other: &OpCode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<u8> for Mnemonic

Source§

fn partial_cmp(&self, other: &u8) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for Mnemonic

Source§

impl UpperHex for Mnemonic

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.