Try it Live
Run Opcode examples in the interactive playground
Opcode.isDup()
Check if opcode is DUP1-DUP16.- Functional API
Parameters
opcode: BrandedOpcode- Opcode to check
Returns
boolean - True if DUP1-DUP16 (0x80-0x8F)
DUP Operations
Duplicate stack item at depth 1-16:- DUP1 (0x80): Duplicate top item
- DUP2 (0x81): Duplicate 2nd item
- DUP16 (0x8F): Duplicate 16th item
Related
- dupPosition() - Get DUP stack position

