Opcodes · splice · enabled

OP_SIZE (0x82)

Pushes the byte length of the top item without removing it.

Verified
Stack in → out
x → x len
Since
Original Bitcoin script
Cost
Base instruction cost 100 plus the byte length of the pushed result (2025 VM limits).
Bitcoin status
Same in Bitcoin (BTC)

Example

<0x112233> OP_SIZE OP_3 OP_EQUALVERIFY

Step through it opcode by opcode in Bitauth IDE, the in-browser BCH VM debugger.

Sources

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