Merge pull request #11634 from maAPPsDEV/patch-1

Fix a Typo describing Layout in Storage
This commit is contained in:
Harikrishnan Mulackal 2021-07-08 09:38:24 +02:00 committed by GitHub
commit 58ab8f79a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,7 @@ The type of the value is ``uint256``, so it uses a single slot.
------------------------ ------------------------
``bytes`` and ``string`` are encoded identically. ``bytes`` and ``string`` are encoded identically.
In general, the encoding is similar to ``byte1[]``, in the sense that there is a slot for the array itself and In general, the encoding is similar to ``bytes1[]``, in the sense that there is a slot for the array itself and
a data area that is computed using a ``keccak256`` hash of that slot's position. a data area that is computed using a ``keccak256`` hash of that slot's position.
However, for short values (shorter than 32 bytes) the array elements are stored together with the length in the same slot. However, for short values (shorter than 32 bytes) the array elements are stored together with the length in the same slot.