Skip to main content

Try it Live

Run Opcode examples in the interactive playground

Opcode.isValidJumpDest()

Check if offset is a valid JUMPDEST in bytecode.

Parameters

  • bytecode: Uint8Array - Contract bytecode
  • offset: number - Program counter offset to check

Returns

boolean - True if offset is valid JUMPDEST

Validation Rules

Valid JUMPDEST must:
  1. Be within bytecode bounds
  2. Be JUMPDEST opcode (0x5B)
  3. NOT be inside PUSH immediate data

Use Cases

Runtime Jump Validation

Find Invalid Jumps