View Source BitcoinLib.Script.Opcodes.Stack.TwoOver (BitcoinLib v0.4.7)
Based on https://en.bitcoin.it/wiki/Script
Word OP_2OVER Opcode 112 Hex 0x70 Input x1 x2 x3 x4 Output x1 x2 x3 x4 x1 x2 Copies the pair of items two spaces back in the stack to the front.
Link to this section Summary
Functions
Returns <<0x70>>
Copies the pair of items two spaces back in the stack to the front.
Returns 0x70
Link to this section Types
@type t() :: BitcoinLib.Script.Opcodes.Stack.TwoOver
Link to this section Functions
Returns <<0x70>>
examples
Examples
iex> BitcoinLib.Script.Opcodes.Stack.TwoOver.encode()
<<0x70>>
Copies the pair of items two spaces back in the stack to the front.
examples
Examples
iex> stack = [1, 2, 3, 4, 5]
...> %BitcoinLib.Script.Opcodes.Stack.TwoOver{}
...> |> BitcoinLib.Script.Opcodes.Stack.TwoOver.execute(stack)
{:ok, [1, 2, 3, 4, 1, 2, 5]}
@spec v() :: 112
Returns 0x70
examples
Examples
iex> BitcoinLib.Script.Opcodes.Stack.TwoOver.v()
0x70