Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 838 Bytes

03.mdx

File metadata and controls

30 lines (20 loc) · 838 Bytes
fork group
Frontier
Stop and Arithmetic Operations

Index 1 is top of the stack. See PUSH.

Stack input

  1. a: first integer value.
  2. b: integer value to subtract to the first.

Stack output

  1. a - b: integer result of the subtraction modulo 2256.

Examples

* Input Output * * Input Output
1 10 0 * 1 0 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
2 10 * 2 1

Reproduce in playground.

Error cases

The state changes done by the current context are reverted in those cases:

  • Not enough gas.
  • Not enough values on the stack.