Try it Live
Run Opcode examples in the interactive playground
Opcode.swapPosition()
Get stack position swapped by SWAP opcode (1-16).- Functional API
Parameters
opcode: BrandedOpcode- Opcode to check
Returns
number | undefined - Position (1-16) or undefined if not SWAP
Stack Semantics
Related
- isSwap() - Check if SWAP opcode

