Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.18 KB

55.mdx

File metadata and controls

41 lines (30 loc) · 1.18 KB
fork group
Frontier
Stack Memory Storage and Flow Operations

Index 1 is top of the stack. See PUSH.

Stack input

  1. key: 32-byte key in storage.
  2. value: 32-byte value to store.

Examples

* Input 1 * * Input 2
1 0 * 1 8965
2 0xFFFF * 2 0xFF
Storage key before Storage value
Storage key after input 1 Storage value
0 0xFFFF
Storage key after input 1 then 2 Storage value
0 0xFFFF
8965 0xFF

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.
  • The current execution context is from a STATICCALL (since Byzantium fork).
  • When the amount of gas left to the transaction is less than or equal 2300 (since Istanbul fork).