Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 952 Bytes

53.mdx

File metadata and controls

38 lines (27 loc) · 952 Bytes
fork group
Frontier
Stack Memory Storage and Flow Operations

Index 1 is top of the stack. See PUSH.

Stack input

  1. offset: offset in the memory in bytes.
  2. value: 1-byte value to write in the memory (the least significant byte of the 32-byte stack value).

Examples

* Input 1 * * Input 2
1 0 * 1 1
2 0xFFFF * 2 0xFF
Memory before
0
Memory after input 1
0xFF
Memory after input 1 then 2
0xFFFF

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.