Skip to main content
added 4 characters in body
Source Link
JBaczuk
  • 7.4k
  • 1
  • 14
  • 35

To push data to the stack, if there is no opcode (i.e. there is no opcode for the number 210, but there are for the numbers 1-16: OP_1 - OP_16), you need to provide a push op. Since 210 can be represented in a single byte:

OP_10 0x01 210 OP_ADD
  ^    ^    ^    ^
  |    |    |    | pop the top 2 items, add, and return result
  |    |    | Push number 210 to the stack
  |    | The next 1 byte is pushed to the stack
  | Push 10 to the stack

See https://en.bitcoin.it/wiki/Script#Constants

To push data to the stack, if there is no opcode (i.e. there is no opcode for the number 210, but there are for the numbers 1-16: OP_1 - OP_16), you need to provide a push op. Since 210 can be represented in a single byte:

OP_10 0x01 210 OP_ADD
  ^    ^    ^    ^
  |    |    |    | the top 2 items, add, and return result
  |    |    | Push number 210 to the stack
  |    | The next 1 byte is pushed to the stack
  | Push 10 to the stack

See https://en.bitcoin.it/wiki/Script#Constants

To push data to the stack, if there is no opcode (i.e. there is no opcode for the number 210, but there are for the numbers 1-16: OP_1 - OP_16), you need to provide a push op. Since 210 can be represented in a single byte:

OP_10 0x01 210 OP_ADD
  ^    ^    ^    ^
  |    |    |    | pop the top 2 items, add, and return result
  |    |    | Push number 210 to the stack
  |    | The next 1 byte is pushed to the stack
  | Push 10 to the stack

See https://en.bitcoin.it/wiki/Script#Constants

Source Link
JBaczuk
  • 7.4k
  • 1
  • 14
  • 35

To push data to the stack, if there is no opcode (i.e. there is no opcode for the number 210, but there are for the numbers 1-16: OP_1 - OP_16), you need to provide a push op. Since 210 can be represented in a single byte:

OP_10 0x01 210 OP_ADD
  ^    ^    ^    ^
  |    |    |    | the top 2 items, add, and return result
  |    |    | Push number 210 to the stack
  |    | The next 1 byte is pushed to the stack
  | Push 10 to the stack

See https://en.bitcoin.it/wiki/Script#Constants