Skip to main content

Try it Live

Run Opcode examples in the interactive playground

Opcode.isPush()

Check if opcode is PUSH0-PUSH32.

Parameters

  • opcode: BrandedOpcode - Opcode to check

Returns

boolean - True if PUSH0-PUSH32 (0x5F-0x7F)

PUSH Opcodes

  • PUSH0 (0x5F): Push 0 onto stack (no immediate data)
  • PUSH1 (0x60): Push 1 byte
  • PUSH2-PUSH31 (0x61-0x7E): Push 2-31 bytes
  • PUSH32 (0x7F): Push 32 bytes

Use Cases

Extract Constants

Count PUSH Operations