View Source BitcoinLib.Script.Opcodes.Constants.Four (BitcoinLib v0.4.7)

Based on https://en.bitcoin.it/wiki/Script

Word OP_4 Opcode 84 Hex 0x54 Input Nothing Output 4 The number 4 is pushed onto the stack.

Link to this section Summary

Functions

Returns <<0x54>>

The number 4 is pushed onto the stack.

v()

Returns 0x54

Link to this section Functions

@spec encode() :: <<_::8>>

Returns <<0x54>>

examples

Examples

iex> BitcoinLib.Script.Opcodes.Constants.Four.encode()
<<0x54>>
Link to this function

execute(four, remaining)

View Source

The number 4 is pushed onto the stack.

examples

Examples

iex> BitcoinLib.Script.Opcodes.Constants.Four.execute(
...>  %BitcoinLib.Script.Opcodes.Constants.Four{},
...>  [3]
...> )
{:ok, [4, 3]}
@spec v() :: 84

Returns 0x54

examples

Examples

iex> BitcoinLib.Script.Opcodes.Constants.Four.v()
0x54