EQUAL opcode

op_equal bitcoin script command

Opcodes are used in Bitcoin Scripts to represent commands or methods. Below you can find the value of the op_equal code and an implementation in Python. A bitcoin script works with a stack of items. The op_code representing a method, usually takes or puts 1 or more items from the top of the stack.

OP_EQUAL
Integer value 135
Hex value 0x87

Python code representation as used Bitcoinlib

    def op_equal(self):
        self.append(b'\x01' if self.pop() == self.pop() else b'')
        return True

Links to related method