Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 963 Bytes

66.mdx

File metadata and controls

34 lines (23 loc) · 963 Bytes
fork group
Frontier
Push Operations

Index 1 is top of the stack.

Notes

The new value is put on top of the stack, incrementing all the other value indices. The values for a specific opcode thus have to be pushed in reverse order of the stack. For example, with MSTORE, the first value pushed would have to be value, and then offset.

Stack output

  1. value: pushed value, aligned to the right (put in the lowest significant bytes).

Example

* *
Code 0x66FFFFFFFFFFFFFF6600000000000000
Text PUSH7 FFFFFFFFFFFFFF PUSH7 00000000000000
* Input Output
1 0x00000000000000
2 0xFFFFFFFFFFFFFF

Reproduce in playground.

Error cases

The state changes done by the current context are reverted in those cases:

  • Not enough gas.
  • Stack overflow.