Skip to content

Commit

Permalink
Update EIP-7480: Change prices of DATALOAD and DATALOADN to be consis…
Browse files Browse the repository at this point in the history
…tent with price of PUSH

Merged by EIP-Bot.
  • Loading branch information
gumb0 authored Oct 2, 2023
1 parent a8d9d97 commit 089c02e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EIPS/eip-7480.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ If the code is valid EOF1, the following execution rules apply:
1. Pops one value, `offset`, from the stack.
2. If `offset + 32` is greater than the data section size of the active container, execution results in exceptional halt.
3. Reads `[offset:offset+32]` segment from the data section and pushes it as 32-byte value to the stack.
4. Deducts 3 gas.
4. Deducts 4 gas.

### `DATALOADN`

1. Has one immediate argument,`offset`, encoded as a 16-bit unsigned big-endian value.
2. Pops nothing from the stack.
3. Reads `[offset:offset+32]` segment from the data section and pushes it as 32-byte value to the stack.
4. Deducts 2 gas.
4. Deducts 3 gas.

`[offset:offset+32]` is guaranteed to be within data bounds by [code validation](#code-validation).

Expand Down

0 comments on commit 089c02e

Please sign in to comment.