Skip to content
Developer Handbook

Beyond P2PKH

OP_DATA_X

The OP_DATA_X op codes push bytes following the opcode from the script to the top of the stack. The number of bytes pushed by the op code is the value of the op code interpreted as a two's complement integer. For example, OP_DATA_4 (op code 0x04) pushes the next 4 bytes in the script as a single value on the stack.

Script Post-Execution Stack
0x04 0xFFFF001D
0x04 0xFFFF001D 0xFFFF001D
Source and attribution

Documentation.cash (source repository) · Reference.cash (source repository)
Software Verde, Bitcoin Unlimited and the project contributors. Collection license CC BY 3.0 US. Individual notices are retained.
Source snapshot from November 29, 2026. BCH Ninja combined the community editions and updated navigation.