CashVM opcode index
Bitcoin Cash mainnet rules after May 2026. Select any of the 256 hexadecimal tiles to read its behavior, stack notation, and relevant specifications.
Filter by purpose
Scroll the table horizontally to see all 16 columns.
0x00 OP_0
Push numbers · Available · Alias OP_FALSE
Push 0 as a minimally encoded Script number.
Back to table0x01 OP_PUSHBYTES_1
Push bytes · Available
Read the next 1 byte from the script and push them as a byte string.
Back to table0x02 OP_PUSHBYTES_2
Push bytes · Available
Read the next 2 bytes from the script and push them as a byte string.
Back to table0x03 OP_PUSHBYTES_3
Push bytes · Available
Read the next 3 bytes from the script and push them as a byte string.
Back to table0x04 OP_PUSHBYTES_4
Push bytes · Available
Read the next 4 bytes from the script and push them as a byte string.
Back to table0x05 OP_PUSHBYTES_5
Push bytes · Available
Read the next 5 bytes from the script and push them as a byte string.
Back to table0x06 OP_PUSHBYTES_6
Push bytes · Available
Read the next 6 bytes from the script and push them as a byte string.
Back to table0x07 OP_PUSHBYTES_7
Push bytes · Available
Read the next 7 bytes from the script and push them as a byte string.
Back to table0x08 OP_PUSHBYTES_8
Push bytes · Available
Read the next 8 bytes from the script and push them as a byte string.
Back to table0x09 OP_PUSHBYTES_9
Push bytes · Available
Read the next 9 bytes from the script and push them as a byte string.
Back to table0x0A OP_PUSHBYTES_10
Push bytes · Available
Read the next 10 bytes from the script and push them as a byte string.
Back to table0x0B OP_PUSHBYTES_11
Push bytes · Available
Read the next 11 bytes from the script and push them as a byte string.
Back to table0x0C OP_PUSHBYTES_12
Push bytes · Available
Read the next 12 bytes from the script and push them as a byte string.
Back to table0x0D OP_PUSHBYTES_13
Push bytes · Available
Read the next 13 bytes from the script and push them as a byte string.
Back to table0x0E OP_PUSHBYTES_14
Push bytes · Available
Read the next 14 bytes from the script and push them as a byte string.
Back to table0x0F OP_PUSHBYTES_15
Push bytes · Available
Read the next 15 bytes from the script and push them as a byte string.
Back to table0x10 OP_PUSHBYTES_16
Push bytes · Available
Read the next 16 bytes from the script and push them as a byte string.
Back to table0x11 OP_PUSHBYTES_17
Push bytes · Available
Read the next 17 bytes from the script and push them as a byte string.
Back to table0x12 OP_PUSHBYTES_18
Push bytes · Available
Read the next 18 bytes from the script and push them as a byte string.
Back to table0x13 OP_PUSHBYTES_19
Push bytes · Available
Read the next 19 bytes from the script and push them as a byte string.
Back to table0x14 OP_PUSHBYTES_20
Push bytes · Available
Read the next 20 bytes from the script and push them as a byte string.
Back to table0x15 OP_PUSHBYTES_21
Push bytes · Available
Read the next 21 bytes from the script and push them as a byte string.
Back to table0x16 OP_PUSHBYTES_22
Push bytes · Available
Read the next 22 bytes from the script and push them as a byte string.
Back to table0x17 OP_PUSHBYTES_23
Push bytes · Available
Read the next 23 bytes from the script and push them as a byte string.
Back to table0x18 OP_PUSHBYTES_24
Push bytes · Available
Read the next 24 bytes from the script and push them as a byte string.
Back to table0x19 OP_PUSHBYTES_25
Push bytes · Available
Read the next 25 bytes from the script and push them as a byte string.
Back to table0x1A OP_PUSHBYTES_26
Push bytes · Available
Read the next 26 bytes from the script and push them as a byte string.
Back to table0x1B OP_PUSHBYTES_27
Push bytes · Available
Read the next 27 bytes from the script and push them as a byte string.
Back to table0x1C OP_PUSHBYTES_28
Push bytes · Available
Read the next 28 bytes from the script and push them as a byte string.
Back to table0x1D OP_PUSHBYTES_29
Push bytes · Available
Read the next 29 bytes from the script and push them as a byte string.
Back to table0x1E OP_PUSHBYTES_30
Push bytes · Available
Read the next 30 bytes from the script and push them as a byte string.
Back to table0x1F OP_PUSHBYTES_31
Push bytes · Available
Read the next 31 bytes from the script and push them as a byte string.
Back to table0x20 OP_PUSHBYTES_32
Push bytes · Available
Read the next 32 bytes from the script and push them as a byte string.
Back to table0x21 OP_PUSHBYTES_33
Push bytes · Available
Read the next 33 bytes from the script and push them as a byte string.
Back to table0x22 OP_PUSHBYTES_34
Push bytes · Available
Read the next 34 bytes from the script and push them as a byte string.
Back to table0x23 OP_PUSHBYTES_35
Push bytes · Available
Read the next 35 bytes from the script and push them as a byte string.
Back to table0x24 OP_PUSHBYTES_36
Push bytes · Available
Read the next 36 bytes from the script and push them as a byte string.
Back to table0x25 OP_PUSHBYTES_37
Push bytes · Available
Read the next 37 bytes from the script and push them as a byte string.
Back to table0x26 OP_PUSHBYTES_38
Push bytes · Available
Read the next 38 bytes from the script and push them as a byte string.
Back to table0x27 OP_PUSHBYTES_39
Push bytes · Available
Read the next 39 bytes from the script and push them as a byte string.
Back to table0x28 OP_PUSHBYTES_40
Push bytes · Available
Read the next 40 bytes from the script and push them as a byte string.
Back to table0x29 OP_PUSHBYTES_41
Push bytes · Available
Read the next 41 bytes from the script and push them as a byte string.
Back to table0x2A OP_PUSHBYTES_42
Push bytes · Available
Read the next 42 bytes from the script and push them as a byte string.
Back to table0x2B OP_PUSHBYTES_43
Push bytes · Available
Read the next 43 bytes from the script and push them as a byte string.
Back to table0x2C OP_PUSHBYTES_44
Push bytes · Available
Read the next 44 bytes from the script and push them as a byte string.
Back to table0x2D OP_PUSHBYTES_45
Push bytes · Available
Read the next 45 bytes from the script and push them as a byte string.
Back to table0x2E OP_PUSHBYTES_46
Push bytes · Available
Read the next 46 bytes from the script and push them as a byte string.
Back to table0x2F OP_PUSHBYTES_47
Push bytes · Available
Read the next 47 bytes from the script and push them as a byte string.
Back to table0x30 OP_PUSHBYTES_48
Push bytes · Available
Read the next 48 bytes from the script and push them as a byte string.
Back to table0x31 OP_PUSHBYTES_49
Push bytes · Available
Read the next 49 bytes from the script and push them as a byte string.
Back to table0x32 OP_PUSHBYTES_50
Push bytes · Available
Read the next 50 bytes from the script and push them as a byte string.
Back to table0x33 OP_PUSHBYTES_51
Push bytes · Available
Read the next 51 bytes from the script and push them as a byte string.
Back to table0x34 OP_PUSHBYTES_52
Push bytes · Available
Read the next 52 bytes from the script and push them as a byte string.
Back to table0x35 OP_PUSHBYTES_53
Push bytes · Available
Read the next 53 bytes from the script and push them as a byte string.
Back to table0x36 OP_PUSHBYTES_54
Push bytes · Available
Read the next 54 bytes from the script and push them as a byte string.
Back to table0x37 OP_PUSHBYTES_55
Push bytes · Available
Read the next 55 bytes from the script and push them as a byte string.
Back to table0x38 OP_PUSHBYTES_56
Push bytes · Available
Read the next 56 bytes from the script and push them as a byte string.
Back to table0x39 OP_PUSHBYTES_57
Push bytes · Available
Read the next 57 bytes from the script and push them as a byte string.
Back to table0x3A OP_PUSHBYTES_58
Push bytes · Available
Read the next 58 bytes from the script and push them as a byte string.
Back to table0x3B OP_PUSHBYTES_59
Push bytes · Available
Read the next 59 bytes from the script and push them as a byte string.
Back to table0x3C OP_PUSHBYTES_60
Push bytes · Available
Read the next 60 bytes from the script and push them as a byte string.
Back to table0x3D OP_PUSHBYTES_61
Push bytes · Available
Read the next 61 bytes from the script and push them as a byte string.
Back to table0x3E OP_PUSHBYTES_62
Push bytes · Available
Read the next 62 bytes from the script and push them as a byte string.
Back to table0x3F OP_PUSHBYTES_63
Push bytes · Available
Read the next 63 bytes from the script and push them as a byte string.
Back to table0x40 OP_PUSHBYTES_64
Push bytes · Available
Read the next 64 bytes from the script and push them as a byte string.
Back to table0x41 OP_PUSHBYTES_65
Push bytes · Available
Read the next 65 bytes from the script and push them as a byte string.
Back to table0x42 OP_PUSHBYTES_66
Push bytes · Available
Read the next 66 bytes from the script and push them as a byte string.
Back to table0x43 OP_PUSHBYTES_67
Push bytes · Available
Read the next 67 bytes from the script and push them as a byte string.
Back to table0x44 OP_PUSHBYTES_68
Push bytes · Available
Read the next 68 bytes from the script and push them as a byte string.
Back to table0x45 OP_PUSHBYTES_69
Push bytes · Available
Read the next 69 bytes from the script and push them as a byte string.
Back to table0x46 OP_PUSHBYTES_70
Push bytes · Available
Read the next 70 bytes from the script and push them as a byte string.
Back to table0x47 OP_PUSHBYTES_71
Push bytes · Available
Read the next 71 bytes from the script and push them as a byte string.
Back to table0x48 OP_PUSHBYTES_72
Push bytes · Available
Read the next 72 bytes from the script and push them as a byte string.
Back to table0x49 OP_PUSHBYTES_73
Push bytes · Available
Read the next 73 bytes from the script and push them as a byte string.
Back to table0x4A OP_PUSHBYTES_74
Push bytes · Available
Read the next 74 bytes from the script and push them as a byte string.
Back to table0x4B OP_PUSHBYTES_75
Push bytes · Available
Read the next 75 bytes from the script and push them as a byte string.
Back to table0x4C OP_PUSHDATA1
Push bytes · Available
Read a 1-byte little-endian length, then push that many bytes from the script.
Back to table0x4D OP_PUSHDATA2
Push bytes · Available
Read a 2-byte little-endian length, then push that many bytes from the script.
Back to table0x4E OP_PUSHDATA4
Push bytes · Available
Read a 4-byte little-endian length, then push that many bytes from the script.
Back to table0x4F OP_1NEGATE
Push numbers · Available
Push -1 as a minimally encoded Script number.
Back to table0x50 OP_RESERVED
Reserved and unassigned · Reserved
Reserved byte. Execution fails.
Back to table0x51 OP_1
Push numbers · Available · Alias OP_TRUE
Push 1 as a minimally encoded Script number.
Back to table0x52 OP_2
Push numbers · Available
Push 2 as a minimally encoded Script number.
Back to table0x53 OP_3
Push numbers · Available
Push 3 as a minimally encoded Script number.
Back to table0x54 OP_4
Push numbers · Available
Push 4 as a minimally encoded Script number.
Back to table0x55 OP_5
Push numbers · Available
Push 5 as a minimally encoded Script number.
Back to table0x56 OP_6
Push numbers · Available
Push 6 as a minimally encoded Script number.
Back to table0x57 OP_7
Push numbers · Available
Push 7 as a minimally encoded Script number.
Back to table0x58 OP_8
Push numbers · Available
Push 8 as a minimally encoded Script number.
Back to table0x59 OP_9
Push numbers · Available
Push 9 as a minimally encoded Script number.
Back to table0x5A OP_10
Push numbers · Available
Push 10 as a minimally encoded Script number.
Back to table0x5B OP_11
Push numbers · Available
Push 11 as a minimally encoded Script number.
Back to table0x5C OP_12
Push numbers · Available
Push 12 as a minimally encoded Script number.
Back to table0x5D OP_13
Push numbers · Available
Push 13 as a minimally encoded Script number.
Back to table0x5E OP_14
Push numbers · Available
Push 14 as a minimally encoded Script number.
Back to table0x5F OP_15
Push numbers · Available
Push 15 as a minimally encoded Script number.
Back to table0x60 OP_16
Push numbers · Available
Push 16 as a minimally encoded Script number.
Back to table0x61 OP_NOP
Control flow · Available
Does nothing.
Back to table0x62 OP_VER
Reserved and unassigned · Reserved
Reserved byte. Execution fails.
Back to table0x63 OP_IF
Control flow · Available
IF [statements] ENDIF → ∅ Top of stack on the right. ∅ means no items.
If the top stack value is not False, the statements are executed. The top stack value is removed.
Back to table0x64 OP_NOTIF
Control flow · Available
NOTIF [statements] ENDIF → ∅ Top of stack on the right. ∅ means no items.
If the top stack value is False, the statements are executed. The top stack value is removed.
Back to table0x65 OP_BEGIN
Control flow · Available · Alias OP_VERIF (historical)
Mark the beginning of a bounded loop. The matching OP_UNTIL controls repetition. May 2026 Loops specification
Back to table0x66 OP_UNTIL
Control flow · Available · Alias OP_VERNOTIF (historical)
a → ∅ Top of stack on the right. ∅ means no items.
Pop a condition. If false, repeat from just after the matching OP_BEGIN. If true, exit the loop. May 2026 Loops specification
Back to table0x67 OP_ELSE
Control flow · Available
IF/NOTIF [...] ELSE [statements] ENDIF → ∅ Top of stack on the right. ∅ means no items.
If the preceding OP_IF or OP_NOTIF or OP_ELSE was not executed then these statements are and if the preceding OP_IF or OP_NOTIF or OP_ELSE was executed then these statements are not.
Back to table0x68 OP_ENDIF
Control flow · Available
IF [statements] ENDIF → ∅ Top of stack on the right. ∅ means no items.
Ends an if/else block. All blocks must end, or the transaction is marked as invalid . An OP_ENDIF without OP_IF earlier is also invalid .
Back to table0x69 OP_VERIFY
Control flow · Available
true / false → Nothing / fail Top of stack on the right. ∅ means no items.
Pop the top value. Fail script evaluation if the value is false.
Back to table0x6A OP_RETURN
Control flow · Fails when executed
∅ → fail Top of stack on the right. ∅ means no items.
Fail immediately when executed. A locking script beginning with OP_RETURN creates an unspendable output.
Back to table0x6B OP_TOALTSTACK
Stack manipulation · Available
a → (alt) a Top of stack on the right. ∅ means no items.
Puts the input onto the top of the alt stack. Removes it from the main stack.
Back to table0x6C OP_FROMALTSTACK
Stack manipulation · Available
(alt) a → a Top of stack on the right. ∅ means no items.
Puts the input onto the top of the main stack. Removes it from the alt stack.
Back to table0x6D OP_2DROP
Stack manipulation · Available
a b → ∅ Top of stack on the right. ∅ means no items.
Removes the top two stack items.
Back to table0x6E OP_2DUP
Stack manipulation · Available
a b → a b a b Top of stack on the right. ∅ means no items.
Duplicates the top two stack items.
Back to table0x6F OP_3DUP
Stack manipulation · Available
a b c → a b c a b c Top of stack on the right. ∅ means no items.
Duplicates the top three stack items.
Back to table0x70 OP_2OVER
Stack manipulation · Available
a b c d → a b c d a b Top of stack on the right. ∅ means no items.
Copies the pair of items two spaces back in the stack to the front.
Back to table0x71 OP_2ROT
Stack manipulation · Available
a b c d e f → c d e f a b Top of stack on the right. ∅ means no items.
The fifth and sixth items back are moved to the top of the stack.
Back to table0x72 OP_2SWAP
Stack manipulation · Available
a b c d → c d a b Top of stack on the right. ∅ means no items.
Swaps the top two pairs of items.
Back to table0x73 OP_IFDUP
Stack manipulation · Available
a → a | a a Top of stack on the right. ∅ means no items.
If the top stack value is not 0, duplicate it.
Back to table0x74 OP_DEPTH
Stack manipulation · Available
∅ → depth Top of stack on the right. ∅ means no items.
Puts the number of stack items onto the stack.
Back to table0x75 OP_DROP
Stack manipulation · Available
a → ∅ Top of stack on the right. ∅ means no items.
Removes the top stack item.
Back to table0x76 OP_DUP
Stack manipulation · Available
a → a a Top of stack on the right. ∅ means no items.
Duplicates the top stack item.
Back to table0x77 OP_NIP
Stack manipulation · Available
a b → b Top of stack on the right. ∅ means no items.
Removes the second-to-top stack item.
Back to table0x78 OP_OVER
Stack manipulation · Available
a b → a b a Top of stack on the right. ∅ means no items.
Copies the second-to-top stack item to the top.
Back to table0x79 OP_PICK
Stack manipulation · Available
xn ... x2 x1 x0 n → xn ... x2 x1 x0 xn Top of stack on the right. ∅ means no items.
The item n back in the stack is copied to the top.
Back to table0x7A OP_ROLL
Stack manipulation · Available
xn ... x2 x1 x0 n → x(n-1) ... x2 x1 x0 xn Top of stack on the right. ∅ means no items.
The item n back in the stack is moved to the top.
Back to table0x7B OP_ROT
Stack manipulation · Available
a b c → b c a Top of stack on the right. ∅ means no items.
The top three items on the stack are rotated to the left.
Back to table0x7C OP_SWAP
Stack manipulation · Available
a b → b a Top of stack on the right. ∅ means no items.
The top two items on the stack are swapped.
Back to table0x7D OP_TUCK
Stack manipulation · Available
a b → b a b Top of stack on the right. ∅ means no items.
The item at the top of the stack is copied and inserted below the second-to-top item.
Back to table0x7E OP_CAT
Byte strings · Available
a b → c Top of stack on the right. ∅ means no items.
Concatenates two byte sequences
Back to table0x7F OP_SPLIT
Byte strings · Available · Alias OP_SUBSTR (historical)
x n → x1 x2 Top of stack on the right. ∅ means no items.
Splits byte sequence x at position n . Known as OP_SUBSTR before 2018-05-15.
Back to table0x80 OP_NUM2BIN
Byte strings · Available · Alias OP_LEFT (historical)
a b → c Top of stack on the right. ∅ means no items.
Converts numeric value a into byte sequence of length b . Known as OP_LEFT before 2018-05-15.
Back to table0x81 OP_BIN2NUM
Byte strings · Available · Alias OP_RIGHT (historical)
a → b Top of stack on the right. ∅ means no items.
Converts byte sequence x into a numeric value. Known as OP_RIGHT before 2018-05-15.
Back to table0x82 OP_SIZE
Byte strings · Available
a → a b Top of stack on the right. ∅ means no items.
Pushes the byte length of the top element of the stack (without popping it).
Back to table0x83 OP_INVERT
Bitwise · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack. Invert (bitwise "NOT") each byte of the item, then push the result to the stack. May 2026 Bitwise specification
Back to table0x84 OP_AND
Bitwise · Available
a b → c Top of stack on the right. ∅ means no items.
Boolean AND between each bit of the inputs
Back to table0x85 OP_OR
Bitwise · Available
a b → c Top of stack on the right. ∅ means no items.
Boolean OR between each bit of the inputs.
Back to table0x86 OP_XOR
Bitwise · Available
a b → c Top of stack on the right. ∅ means no items.
Boolean EXCLUSIVE OR between each bit of the inputs.
Back to table0x87 OP_EQUAL
Bitwise · Available
a b → true | false Top of stack on the right. ∅ means no items.
Returns 1 if the inputs are exactly equal, 0 otherwise.
Back to table0x88 OP_EQUALVERIFY
Bitwise · Available
a b → Nothing | fail Top of stack on the right. ∅ means no items.
Same as OP_EQUAL, but runs OP_VERIFY afterward.
Back to table0x89 OP_DEFINE
Control flow · Available · Alias OP_RESERVED1 (historical)
a b → ∅ Top of stack on the right. ∅ means no items.
Consume the function bytecode and identifier from the stack and register the function. A duplicate identifier fails. May 2026 Functions specification
Back to table0x8A OP_INVOKE
Control flow · Available · Alias OP_RESERVED2 (historical)
a → ∅ Top of stack on the right. ∅ means no items.
Consume an identifier and execute its registered bytecode in a new evaluation frame. An undefined identifier fails. May 2026 Functions specification
Back to table0x8B OP_1ADD
Arithmetic and comparison · Available
a → b Top of stack on the right. ∅ means no items.
1 is added to the input.
Back to table0x8C OP_1SUB
Arithmetic and comparison · Available
a → b Top of stack on the right. ∅ means no items.
1 is subtracted from the input.
Back to table0x8D OP_LSHIFTNUM
Arithmetic and comparison · Available · Alias OP_2MUL (historical)
a b → c Top of stack on the right. ∅ means no items.
Pop the top item from the stack as a bit count (VM number). Pop the next item from the stack as the value (VM number) to shift. Perform an arithmetic left shift of the value by the bit count ( result = value * (2 ^ bit_count) ), then push the result to the stack. May 2026 Bitwise specification
Back to table0x8E OP_RSHIFTNUM
Arithmetic and comparison · Available · Alias OP_2DIV (historical)
a b → c Top of stack on the right. ∅ means no items.
Pop the top item from the stack as a bit count (VM number). Pop the next item from the stack as the value (VM number) to shift. Perform an arithmetic right shift of the value by the bit count ( result = value / (2 ^ bit_count) ) rounding towards negative infinity, then push the resulting VM number to the stack. May 2026 Bitwise specification
Back to table0x8F OP_NEGATE
Arithmetic and comparison · Available
a → b Top of stack on the right. ∅ means no items.
The sign of the input is flipped.
Back to table0x90 OP_ABS
Arithmetic and comparison · Available
a → b Top of stack on the right. ∅ means no items.
The input is made positive.
Back to table0x91 OP_NOT
Arithmetic and comparison · Available
a → true | false Top of stack on the right. ∅ means no items.
If the input is 0 or 1, it is flipped. Otherwise the output will be 0.
Back to table0x92 OP_0NOTEQUAL
Arithmetic and comparison · Available
a → true | false Top of stack on the right. ∅ means no items.
Returns 0 if the input is 0. 1 otherwise.
Back to table0x93 OP_ADD
Arithmetic and comparison · Available
a b → c Top of stack on the right. ∅ means no items.
a is added to b .
Back to table0x94 OP_SUB
Arithmetic and comparison · Available
a b → c Top of stack on the right. ∅ means no items.
b is subtracted from a .
Back to table0x95 OP_MUL
Arithmetic and comparison · Available
a b → c Top of stack on the right. ∅ means no items.
a is multiplied by b . Enabled in HF-20220515 .
Back to table0x96 OP_DIV
Arithmetic and comparison · Available
a b → c Top of stack on the right. ∅ means no items.
a is divided by b .
Back to table0x97 OP_MOD
Arithmetic and comparison · Available
a b → c Top of stack on the right. ∅ means no items.
Returns the remainder after a is divided by b .
Back to table0x98 OP_LSHIFTBIN
Bitwise · Available · Alias OP_LSHIFT (historical)
a b → c Top of stack on the right. ∅ means no items.
Pop the top item from the stack as a bit count (VM number). Pop the next item from the stack as the binary data to shift. Perform a fixed-length, logical left shift of the data by the bit count, shifting-in 0 bits from the right and dropping shifted-out bits on the left, then push the result to the stack. May 2026 Bitwise specification
Back to table0x99 OP_RSHIFTBIN
Bitwise · Available · Alias OP_RSHIFT (historical)
a b → c Top of stack on the right. ∅ means no items.
Pop the top item from the stack as a bit count (VM number). Pop the next item from the stack as the binary data to shift. Perform a fixed-length, logical right shift of the data by the bit count, shifting-in 0 bits from the left and dropping shifted-out bits on the right, then push the result to the stack. May 2026 Bitwise specification
Back to table0x9A OP_BOOLAND
Arithmetic and comparison · Available
a b → true | false Top of stack on the right. ∅ means no items.
If both a and b are not 0, the output is 1. Otherwise 0.
Back to table0x9B OP_BOOLOR
Arithmetic and comparison · Available
a b → true | false Top of stack on the right. ∅ means no items.
If a or b is not 0, the output is 1. Otherwise 0.
Back to table0x9C OP_NUMEQUAL
Arithmetic and comparison · Available
a b → true | false Top of stack on the right. ∅ means no items.
Returns 1 if the numbers are equal, 0 otherwise.
Back to table0x9D OP_NUMEQUALVERIFY
Arithmetic and comparison · Available
a b → Nothing | fail Top of stack on the right. ∅ means no items.
Same as OP_NUMEQUAL, but runs OP_VERIFY afterward.
Back to table0x9E OP_NUMNOTEQUAL
Arithmetic and comparison · Available
a b → true | false Top of stack on the right. ∅ means no items.
Returns 1 if the numbers are not equal, 0 otherwise.
Back to table0x9F OP_LESSTHAN
Arithmetic and comparison · Available
a b → true | false Top of stack on the right. ∅ means no items.
Returns 1 if a is less than b , 0 otherwise.
Back to table0xA0 OP_GREATERTHAN
Arithmetic and comparison · Available
a b → true | false Top of stack on the right. ∅ means no items.
Returns 1 if a is greater than b , 0 otherwise.
Back to table0xA1 OP_LESSTHANOREQUAL
Arithmetic and comparison · Available
a b → true | false Top of stack on the right. ∅ means no items.
Returns 1 if a is less than or equal to b , 0 otherwise.
Back to table0xA2 OP_GREATERTHANOREQUAL
Arithmetic and comparison · Available
a b → true | false Top of stack on the right. ∅ means no items.
Returns 1 if a is greater than or equal to b , 0 otherwise.
Back to table0xA3 OP_MIN
Arithmetic and comparison · Available
a b → c Top of stack on the right. ∅ means no items.
Returns the smaller of a and b.
Back to table0xA4 OP_MAX
Arithmetic and comparison · Available
a b → c Top of stack on the right. ∅ means no items.
Returns the larger of a and b.
Back to table0xA5 OP_WITHIN
Arithmetic and comparison · Available
a min max → true | false Top of stack on the right. ∅ means no items.
Returns 1 if a is within the specified range (left-inclusive), 0 otherwise.
Back to table0xA6 OP_RIPEMD160
Cryptography · Available
a → b Top of stack on the right. ∅ means no items.
Hashes input with RIPEMD-160.
Back to table0xA7 OP_SHA1
Cryptography · Available
a → b Top of stack on the right. ∅ means no items.
Hashes input with SHA-1.
Back to table0xA8 OP_SHA256
Cryptography · Available
a → b Top of stack on the right. ∅ means no items.
Hashes input with SHA-256.
Back to table0xA9 OP_HASH160
Cryptography · Available
a → b Top of stack on the right. ∅ means no items.
Hashes input with SHA-256 and then with RIPEMD-160.
Back to table0xAA OP_HASH256
Cryptography · Available
a → b Top of stack on the right. ∅ means no items.
Hashes input twice with SHA-256.
Back to table0xAB OP_CODESEPARATOR
Cryptography · Available
Makes OP_CHECK(MULTI)SIG(VERIFY) use the subset of the script of everything after the most recently-executed OP_CODESEPARATOR when computing the sighash.
Back to table0xAC OP_CHECKSIG
Cryptography · Available
sig pubkey → true | false Top of stack on the right. ∅ means no items.
The last byte (=sighash type) of the signature is removed. The sighash for this input is calculated based on the sighash type. The truncated signature used by OP_CHECKSIG must be a valid ECDSA or Schnorr signature for this hash and public key. If it is valid, 1 is returned, if it is empty, 0 is returned, otherwise the operation fails.
Back to table0xAD OP_CHECKSIGVERIFY
Cryptography · Available
sig pubkey → nothing | fail Top of stack on the right. ∅ means no items.
Same as OP_CHECKSIG, but OP_VERIFY is executed afterward.
Back to table0xAE OP_CHECKMULTISIG
Cryptography · Available
[dummy] [signatures] m [keys] n → true | false Top of stack on the right. ∅ means no items.
Signatures are checked against public keys. Signatures must be placed in the unlocking script using the same order as their corresponding public keys were placed in the locking script or redeem script. If all signatures are valid, 1 is returned, 0 otherwise. All elements are removed from the stack. For more information on the execution of this opcode, see Multisignature .
Back to table0xAF OP_CHECKMULTISIGVERIFY
Cryptography · Available
[dummy] [signatures] m [keys] n → nothing | fail Top of stack on the right. ∅ means no items.
Same as OP_CHECKMULTISIG, but OP_VERIFY is executed afterward.
Back to table0xB0 OP_NOP1
Reserved and unassigned · Reserved NOP
No operation under consensus rules. Standard relay policy discourages use when executed.
Back to table0xB1 OP_CHECKLOCKTIMEVERIFY
Timelocks · Available · Alias OP_NOP2 (historical)
a → a | fail Top of stack on the right. ∅ means no items.
Check the top stack value against the transaction locktime without consuming it. Locktime type and input sequence also participate in validation.
Back to table0xB2 OP_CHECKSEQUENCEVERIFY
Timelocks · Available · Alias OP_NOP3 (historical)
a → a | fail Top of stack on the right. ∅ means no items.
Check the relative locktime against the current input’s sequence under BIP112. The top stack value is retained.
Back to table0xB3 OP_NOP4
Reserved and unassigned · Reserved NOP
No operation under consensus rules. Standard relay policy discourages use when executed.
Back to table0xB4 OP_NOP5
Reserved and unassigned · Reserved NOP
No operation under consensus rules. Standard relay policy discourages use when executed.
Back to table0xB5 OP_NOP6
Reserved and unassigned · Reserved NOP
No operation under consensus rules. Standard relay policy discourages use when executed.
Back to table0xB6 OP_NOP7
Reserved and unassigned · Reserved NOP
No operation under consensus rules. Standard relay policy discourages use when executed.
Back to table0xB7 OP_NOP8
Reserved and unassigned · Reserved NOP
No operation under consensus rules. Standard relay policy discourages use when executed.
Back to table0xB8 OP_NOP9
Reserved and unassigned · Reserved NOP
No operation under consensus rules. Standard relay policy discourages use when executed.
Back to table0xB9 OP_NOP10
Reserved and unassigned · Reserved NOP
No operation under consensus rules. Standard relay policy discourages use when executed.
Back to table0xBA OP_CHECKDATASIG
Cryptography · Available
sig msg pubkey → true | false Top of stack on the right. ∅ means no items.
Check if signature is valid for message and a public key. See spec
Back to table0xBB OP_CHECKDATASIGVERIFY
Cryptography · Available
sig msg pubkey → nothing | fail Top of stack on the right. ∅ means no items.
Same as OP_CHECKDATASIG, but runs OP_VERIFY afterward.
Back to table0xBC OP_REVERSEBYTES
Byte strings · Available
a → b Top of stack on the right. ∅ means no items.
Reverses the order of the bytes in byte sequence x so that the first byte is now its last byte, the second is now its second-to-last, and so forth. Enabled in HF-20200515 .
Back to table0xBD Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xBE Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xBF Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xC0 OP_INPUTINDEX
Introspection · Available
∅ → a Top of stack on the right. ∅ means no items.
Push the index of the input being evaluated to the stack as a Script Number. Native introspection specification
Back to table0xC1 OP_ACTIVEBYTECODE
Introspection · Available
∅ → a Top of stack on the right. ∅ means no items.
Push the current evaluation’s bytecode after its last executed OP_CODESEPARATOR. If that evaluation has executed no separator, push its entire bytecode. During OP_INVOKE, the current evaluation is the invoked function. Native introspection specification
Back to table0xC2 OP_TXVERSION
Introspection · Available
∅ → a Top of stack on the right. ∅ means no items.
Push the version of the current transaction to the stack as a Script Number. Native introspection specification
Back to table0xC3 OP_TXINPUTCOUNT
Introspection · Available
∅ → a Top of stack on the right. ∅ means no items.
Push the count of inputs in the current transaction to the stack as a Script Number. Native introspection specification
Back to table0xC4 OP_TXOUTPUTCOUNT
Introspection · Available
∅ → a Top of stack on the right. ∅ means no items.
Push the count of outputs in the current transaction to the stack as a Script Number. Native introspection specification
Back to table0xC5 OP_TXLOCKTIME
Introspection · Available
∅ → a Top of stack on the right. ∅ means no items.
Push the locktime of the current transaction to the stack as a Script Number. Native introspection specification
Back to table0xC6 OP_UTXOVALUE
Introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an input index (Script Number). Push the value (in satoshis) of the Unspent Transaction Output (UTXO) spent by that input to the stack as a Script Number. Native introspection specification
Back to table0xC7 OP_UTXOBYTECODE
Introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an input index (Script Number). Push the full locking bytecode of the Unspent Transaction Output (UTXO) spent by that input to the stack. Native introspection specification
Back to table0xC8 OP_OUTPOINTTXHASH
Introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an input index (Script Number). From that input, push the outpoint transaction hash – the hash of the transaction which created the Unspent Transaction Output (UTXO) which is being spent – to the stack in OP_HASH256 byte order. Native introspection specification
Back to table0xC9 OP_OUTPOINTINDEX
Introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an input index (Script Number). From that input, push the outpoint index – the index of the output in the transaction which created the Unspent Transaction Output (UTXO) which is being spent – to the stack as a Script Number. Native introspection specification
Back to table0xCA OP_INPUTBYTECODE
Introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an input index (Script Number). Push the unlocking bytecode of the input at that index to the stack. Native introspection specification
Back to table0xCB OP_INPUTSEQUENCENUMBER
Introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an input index (Script Number). Push the sequence number of the input at that index to the stack as a Script Number. Native introspection specification
Back to table0xCC OP_OUTPUTVALUE
Introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an output index (Script Number). Push the value (in satoshis) of the output at that index to the stack as a Script Number. Native introspection specification
Back to table0xCD OP_OUTPUTBYTECODE
Introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an output index (Script Number). Push the locking bytecode of the output at that index to the stack. Native introspection specification
Back to table0xCE OP_UTXOTOKENCATEGORY
Token introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an input index (VM Number). If the Unspent Transaction Output (UTXO) spent by that input includes no tokens, push a 0 (VM Number) to the stack. If the UTXO does not include a non-fungible token with a capability, push the UTXO's token category, otherwise, push the concatenation of the token category and capability, where the mutable capability is represented by 1 (VM Number) and the minting capability is represented by 2 (VM Number). CashTokens specification
Back to table0xCF OP_UTXOTOKENCOMMITMENT
Token introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an input index (VM Number). Push the token commitment of the Unspent Transaction Output (UTXO) spent by that input to the stack. If the UTXO does not include a non-fungible token, or if it includes a non-fungible token with a zero-length commitment, push a 0 (VM Number). CashTokens specification
Back to table0xD0 OP_UTXOTOKENAMOUNT
Token introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an input index (VM Number). Push the fungible token amount of the Unspent Transaction Output (UTXO) spent by that input to the stack as a VM Number. If the UTXO includes no fungible tokens, push a 0 (VM Number). CashTokens specification
Back to table0xD1 OP_OUTPUTTOKENCATEGORY
Token introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an output index (VM Number). If the output at that index includes no tokens, push a 0 (VM Number) to the stack. If the output does not include a non-fungible token with a capability, push the output's token category, otherwise, push the concatenation of the token category and capability, where the mutable capability is represented by 1 (VM Number) and the minting capability is represented by 2 (VM Number). CashTokens specification
Back to table0xD2 OP_OUTPUTTOKENCOMMITMENT
Token introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an output index (VM Number). Push the token commitment of the output at that index to the stack. If the output does not include a non-fungible token, or if it includes a non-fungible token with a zero-length commitment, push a 0 (VM Number). CashTokens specification
Back to table0xD3 OP_OUTPUTTOKENAMOUNT
Token introspection · Available
a → b Top of stack on the right. ∅ means no items.
Pop the top item from the stack as an output index (VM Number). Push the fungible token amount of the output at that index to the stack as a VM Number. If the output includes no fungible tokens, push a 0 (VM Number). CashTokens specification
Back to table0xD4 OP_RESERVED3
Reserved and unassigned · Reserved
Reserved byte. Execution fails.
Back to table0xD5 OP_RESERVED4
Reserved and unassigned · Reserved
Reserved byte. Execution fails.
Back to table0xD6 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xD7 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xD8 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xD9 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xDA Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xDB Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xDC Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xDD Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xDE Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xDF Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xE0 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xE1 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xE2 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xE3 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xE4 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xE5 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xE6 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xE7 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xE8 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xE9 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xEA Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xEB Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xEC Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xED Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xEE Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xEF SPECIAL_TOKEN_PREFIX
Reserved and unassigned · Output serialization
Signals a CashTokens prefix at the beginning of an output’s serialized byte field. Executing it as an instruction fails. CashTokens specification
Back to table0xF0 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xF1 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xF2 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xF3 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xF4 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xF5 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xF6 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xF7 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xF8 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xF9 Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xFA Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xFB Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xFC Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xFD Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xFE Unassigned
Reserved and unassigned · Unassigned
No assigned instruction under May 2026 mainnet rules. Execution fails.
Back to table0xFF INVALIDOPCODE
Reserved and unassigned · Invalid
Invalid opcode marker. Execution fails.
Back to tableWhat limits a spending script
CashVM tracks how much work it takes to verify each input. The May 2025 rules introduced operation and hashing budgets tied to the length of its unlocking bytecode. Pushing and copying bytes costs work, and hashing, signature checks, and some arithmetic carry additional costs. In May 2026, BCH added bounded loops (OP_BEGIN/OP_UNTIL) and functions (OP_DEFINE/OP_INVOKE) that run within the applicable budgets.
To find the budgets for an input, add 41 to its unlocking bytecode length. The specification calls the result the density control length. Our P2PKH input has 100 bytes of unlocking bytecode, giving 41 + 100 = 141.
| Limit | Formula or bound | P2PKH example |
|---|---|---|
| Operation cost per input | 800 × density control length | 112,800 units |
| Hash iterations, relay policy | Floor of density control length ÷ 2 | 70 iterations |
| Hash iterations, block consensus | Floor of 7 × density control length ÷ 2 | 493 iterations |
| Script and stack item lengths | Up to 10,000 bytes, with separate output standardness rules and exceptions. | 100-byte unlocking script and 25-byte locking script. |
The table shows the limits available to this input. To measure what a contract uses, execute each relevant branch with realistic arguments and test the largest inputs your app accepts against both block and relay limits. VM Limits · Bounded Looping · Functions · Pay to Script
Sources
Byte assignments follow BCHN v29.2.0 with May 2026 rules active. Opcode descriptions and stack notation draw on Documentation.cash under CC BY 3.0 US. The hexadecimal layout is inspired by vm.cash.
The public Bitcoin Cash blockchain on which payments use BCH.Script instructions that let CashVM read fields of the spending transaction and the UTXOs it spends.An encoding that places the least significant byte of an integer first, as BCH does for serialized output amounts.A Bitcoin Cash record that defines new outputs and, for a payment, identifies the UTXOs being spent.The program in an output that specifies the conditions required to spend it.A transaction record that identifies a UTXO to spend and supplies its unlocking bytecode and sequence number.An ordered collection of byte strings that CashVM instructions can add to or consume from the top.A fixed-length digest used to identify data or commit to its contents, such as a transaction ID or public-key hash.A 160-bit hash function that Bitcoin Cash applies after SHA-256 when computing HASH160.A 256-bit cryptographic hash function used in Bitcoin Cash transaction IDs, block hashes, and HASH160.The signature hash type that selects which transaction fields the signer hashes and commits to.A value made with a private key that lets someone with the corresponding public key verify authorization of the signed data.A signature scheme CashVM can verify, using 64 bytes for a BCH Schnorr signature before the transaction’s sighash byte.A cryptographic value derived from a private key and used to verify its signatures.The bytecode supplied by an input to satisfy the locking conditions of the UTXO it spends.The spending program revealed when an input spends a pay-to-script-hash output.An instruction identified by a byte in a script, such as OP_DUP to duplicate the top stack item.Rules validating nodes apply to decide whether a block and its transactions are valid.Node rules that determine which valid transactions it accepts into its mempool and relays to peers.A transaction field that can restrict the first block height or time at which the transaction is eligible for inclusion.The smallest unit of BCH, equal to 0.00000001 BCH.The basic unit of spendable value on Bitcoin Cash, holding satoshis and any attached tokens under the spending rules defined by its locking bytecode.A transaction ID and zero-based output index that together identify the UTXO an input spends.A 32-bit input field that participates in transaction finality and can encode a relative delay in time or blocks.A token with its own commitment and capability that CashTokens stores in a transaction output.A 32-byte CashTokens identifier that groups related tokens and defines which fungible units are interchangeable.An interchangeable unit within a token category that an output can carry alongside BCH and an NFT.Bitcoin Cash’s native fungible token and NFT format, carried in transaction outputs and enforced by consensus.The Bitcoin Cash virtual machine that executes the scripts authorizing an input to spend its UTXO.The currency unit of Bitcoin Cash, equal to 100,000,000 satoshis.A spending condition that checks a public key against a saved hash and verifies a signature made with the corresponding private key.