Skip to content

Commit 6b86543

Browse files
authored
Merge pull request #12625 from shuklaayush/patch-1
Docs: fix slot calculation for mappings of strings/byte arrays
2 parents 32d64ce + 653c1e6 commit 6b86543

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/internals/layout_in_storage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The value corresponding to a mapping key ``k`` is located at ``keccak256(h(k) .
9090
where ``.`` is concatenation and ``h`` is a function that is applied to the key depending on its type:
9191

9292
- for value types, ``h`` pads the value to 32 bytes in the same way as when storing the value in memory.
93-
- for strings and byte arrays, ``h`` computes the ``keccak256`` hash of the unpadded data.
93+
- for strings and byte arrays, ``h(k)`` is just the unpadded data.
9494

9595
If the mapping value is a
9696
non-value type, the computed slot marks the start of the data. If the value is of struct type,

0 commit comments

Comments
 (0)