diff options
-rw-r--r-- | docs/050-breaking-changes.rst | 2 | ||||
-rw-r--r-- | docs/abi-spec.rst | 22 | ||||
-rw-r--r-- | docs/bugs.json | 2 | ||||
-rw-r--r-- | docs/conf.py | 2 | ||||
-rw-r--r-- | docs/contracts.rst | 5 | ||||
-rw-r--r-- | docs/contributing.rst | 2 | ||||
-rw-r--r-- | docs/yul.rst | 2 | ||||
-rwxr-xr-x | scripts/install_deps.sh | 2 |
8 files changed, 23 insertions, 16 deletions
diff --git a/docs/050-breaking-changes.rst b/docs/050-breaking-changes.rst index 48112cd9..32241776 100644 --- a/docs/050-breaking-changes.rst +++ b/docs/050-breaking-changes.rst @@ -171,7 +171,7 @@ Command Line and JSON Interfaces the first 36 hex characters of the keccak256 hash of the fully qualified library name, surrounded by ``$...$``. Previously, just the fully qualified library name was used. - This recudes the chances of collisions, especially when long paths are used. + This reduces the chances of collisions, especially when long paths are used. Binary files now also contain a list of mappings from these placeholders to the fully qualified names. diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst index 0f4a16b6..2c01c4a1 100644 --- a/docs/abi-spec.rst +++ b/docs/abi-spec.rst @@ -597,7 +597,7 @@ Strict encoding mode is the mode that leads to exactly the same encoding as defi This means offsets have to be as small as possible while still not creating overlaps in the data areas and thus no gaps are allowed. -Usually, ABI decoders are written in a straigthforward way just following offset pointers, but some decoders +Usually, ABI decoders are written in a straightforward way just following offset pointers, but some decoders might enforce strict mode. The Solidity ABI decoder currently does not enforce strict mode, but the encoder always creates data in strict mode. @@ -609,7 +609,9 @@ Through ``abi.encodePacked()``, Solidity supports a non-standard packed mode whe - types shorter than 32 bytes are neither zero padded nor sign extended and - dynamic types are encoded in-place and without the length. -As an example encoding ``int8, bytes1, uint16, string`` with values ``-1, 0x42, 0x2424, "Hello, world!"`` results in: +This packed mode is mainly used for indexed event parameters. + +As an example, the encoding of ``int8(-1), bytes1(0x42), uint16(0x2424), string("Hello, world!")`` results in: .. code-block:: none @@ -619,12 +621,18 @@ As an example encoding ``int8, bytes1, uint16, string`` with values ``-1, 0x42, ^^^^ uint16(0x2424) ^^^^^^^^^^^^^^^^^^^^^^^^^^ string("Hello, world!") without a length field -More specifically, each statically-sized type takes as many bytes as its range has -and dynamically-sized types like ``string``, ``bytes`` or ``uint[]`` are encoded without -their length field. This means that the encoding is ambiguous as soon as there are two -dynamically-sized elements. +More specifically: + - Each value type takes as many bytes as its range has. + - The encoding of a struct or fixed-size array is the concatenation of the + encoding of its members/elements without any separator or padding. + - Mapping members of structs are ignored as usual. + - Dynamically-sized types like ``string``, ``bytes`` or ``uint[]`` are encoded without + their length field. + +In general, the encoding is ambiguous as soon as there are two dynamically-sized elements, +because of the missing length field. If padding is needed, explicit type conversions can be used: ``abi.encodePacked(uint16(0x12)) == hex"0012"``. Since packed encoding is not used when calling functions, there is no special support -for prepending a function selector. +for prepending a function selector. Since the encoding is ambiguous, there is no decoding function. diff --git a/docs/bugs.json b/docs/bugs.json index 28c0fe62..41ebce7b 100644 --- a/docs/bugs.json +++ b/docs/bugs.json @@ -43,7 +43,7 @@ { "name": "DelegateCallReturnValue", "summary": "The low-level .delegatecall() does not return the execution outcome, but converts the value returned by the functioned called to a boolean instead.", - "description": "The return value of the low-level .delegatecall() function is taken from a position in memory, where the call data or the return data resides. This value is interpreted as a boolean and put onto the stack. This means if the called function returns at least 32 zero bytes, .delegatecall() returns false even if the call was successuful.", + "description": "The return value of the low-level .delegatecall() function is taken from a position in memory, where the call data or the return data resides. This value is interpreted as a boolean and put onto the stack. This means if the called function returns at least 32 zero bytes, .delegatecall() returns false even if the call was successful.", "introduced": "0.3.0", "fixed": "0.4.15", "severity": "low" diff --git a/docs/conf.py b/docs/conf.py index 233ff7b6..08a5a045 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -53,7 +53,7 @@ master_doc = 'index' # General information about the project. project = 'Solidity' -copyright = '2016-2018, Ethereum' +copyright = '2016-2019, Ethereum' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/docs/contracts.rst b/docs/contracts.rst index 682cb378..746f6e00 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -585,9 +585,8 @@ return variables and then using ``return;`` to leave the function. Returning Multiple Values ------------------------- -When a function has multiple return types, the statement ``return (v0, v1, ..., vn) can be used to return multiple values. -vn)`` can return multiple values. The number of components must be -the same as the number of return types. +When a function has multiple return types, the statement ``return (v0, v1, ..., vn)`` can be used to return multiple values. +The number of components must be the same as the number of return types. .. index:: ! view function, function;view diff --git a/docs/contributing.rst b/docs/contributing.rst index 85816766..5768d944 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -112,7 +112,7 @@ For example, you could run the following command in your ``build`` folder: cmake -DCMAKE_BUILD_TYPE=Debug .. make -This will create symbols such that when you debug a test using the ``--debug`` flag, you will have acecess to functions and varialbes in which you can break or print with. +This will create symbols such that when you debug a test using the ``--debug`` flag, you will have access to functions and variables in which you can break or print with. The script ``./scripts/tests.sh`` also runs commandline tests and compilation tests diff --git a/docs/yul.rst b/docs/yul.rst index 9e50f126..31555742 100644 --- a/docs/yul.rst +++ b/docs/yul.rst @@ -171,7 +171,7 @@ As an exception, identifiers defined in the "init" part of the for-loop (the first block) are visible in all other parts of the for-loop (but not outside of the loop). Identifiers declared in the other parts of the for loop respect the regular -syntatical scoping rules. +syntactical scoping rules. The parameters and return parameters of functions are visible in the function body and their names cannot overlap. diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index 09d5a249..0d1620c4 100755 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -352,7 +352,7 @@ case $(uname -s) in # CentOS needs some more testing. This is the general idea of packages # needed, but some tweaking/improvements can definitely happen #------------------------------------------------------------------------------ - CentOS) + CentOS*) read -p "This script will heavily modify your system in order to allow for compilation of Solidity. Are you sure? [Y/N]" -n 1 -r if [[ $REPLY =~ ^[Yy]$ ]]; then # Make Sure we have the EPEL repos |