Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1007 Bytes

52.mdx

File metadata and controls

38 lines (27 loc) · 1007 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: 32-byte value to write in the memory.

Examples

* Input 1 * * Input 2
1 0 * 1 1
2 0xFF * 2 0xFF
Memory before
0
Memory after input 1
0x00000000000000000000000000000000000000000000000000000000000000FF
Memory after input 1 then 2
0x0000000000000000000000000000000000000000000000000000000000000000FF

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.