Opcodes · splice · enabled

OP_CAT (0x7e)

Concatenates the top two items. Disabled in Bitcoin since 2010 and re-enabled on BCH in May 2018. Covenants use it to build output scripts on the stack.

Verified
Stack in → out
a b → a‖b
Cost
Base instruction cost 100 plus result length. The result may be up to 10,000 bytes since 2025 (was 520).
Bitcoin status
Proposed for Bitcoin (BTC)Disabled in BTC since 2010. BIP-347 proposes re-adding it in Tapscript via OP_SUCCESS126 (same byte, 0x7e); not activated.

Example

<0x1122> <0x33> OP_CAT <0x112233> OP_EQUAL

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

Sources

  1. BCHN upgrade specs: Restore disabled script opcodes, May 2018
  2. Libauth BCH_2023_05 opcodes (bch-2023-opcodes.ts)
  3. BIP-347: OP_CAT in Tapscript