Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 935 Bytes

02.mdx

File metadata and controls

35 lines (24 loc) · 935 Bytes
fork group
Frontier
Stop and Arithmetic Operations

Index 1 is top of the stack. See PUSH.

Stack input

  1. a: first integer value to multiply.
  2. b: second integer value to multiply.

Stack output

  1. a * b: integer result of the multiplication modulo 2256.

Examples

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

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.