Skip to content

Commit

Permalink
Fix some off-by-one errors for EXCHANGE (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdobacz authored Feb 14, 2024
1 parent 2ff6baa commit b1c678f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/eof.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ The following instructions are introduced in EOF code:
- deduct 3 gas
- read uint8 operand `imm`
- `n = imm >> 4 + 1`, `m = imm & 0x0F + 1`
- `n`th stack item is swapped with `n + m`th stack item (1-based).
- Stack validation: `stack_height >= n + m`
- `n + 1`th stack item is swapped with `n + m + 1`th stack item (1-based).
- Stack validation: `stack_height >= n + m + 1`
- `RETURNDATALOAD (0xf7)` instruction
- deduct 3 gas
- pop `offset` from the stack
Expand Down

0 comments on commit b1c678f

Please sign in to comment.