Opcodes · apilamiento · habilitado

OP_1NEGATE (0x4f)

Apila el número -1.

Verificado
Pila: entrada → salida
∅ → -1
Desde
Script original de Bitcoin
Costo
Base instruction cost 100 plus the byte length of the pushed result (2025 VM limits).
Estado en Bitcoin
Igual en Bitcoin (BTC)

Ejemplo

OP_1NEGATE OP_ABS OP_1 OP_EQUAL
Paso Pila después (cima a la derecha) Qué ocurre
OP_1NEGATE -1 Pushes the one-byte number 0x81, which is -1.
OP_ABS 1 Absolute value of -1.
OP_1 1 1
OP_EQUAL 1 Both items are the byte 0x01, so the script ends true.

Recórrelo opcode por opcode en Bitauth IDE, el depurador de la VM de BCH en el navegador.

Dónde se usa OP_1NEGATE

Fuentes

  1. Libauth BCH_2023_05 opcodes (bch-2023-opcodes.ts)