Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 1.15 KB

51.mdx

File metadata and controls

36 lines (23 loc) · 1.15 KB
fork group
Frontier
Stack Memory Storage and Flow Operations

Index 1 is top of the stack. See PUSH.

Notes

Pop from the stack a word as offset to locate and read a word from the memory at offset position and push into top of stack. Expand memory with uint256(0) to the offset position if necessary.

Stack input

  1. offset: offset in the memory in bytes.

Stack output

  1. value: the 32 bytes in memory starting at that offset. If it goes beyond its current size (see MSIZE), writes 0s.

Examples

Memory
0x00000000000000000000000000000000000000000000000000000000000000FF
* Input Output * * Input Output
1 0 0xFF * 1 1 0xFF00

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.