Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 863 Bytes

1A.mdx

File metadata and controls

30 lines (20 loc) · 863 Bytes
fork group
Frontier
Comparison & Bitwise Logic Operations

Index 1 is top of the stack. See PUSH.

Stack input

  1. i: byte offset starting from the most significant byte.
  2. x: 32-byte value.

Stack output

  1. y: the indicated byte at the least significant position. If the byte offset is out of range, the result is 0.

Examples

* Input Output * * Input Output
1 31 0xFF * 1 30 0xFF
2 0xFF * 2 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.