diff --git a/docs/cheatsheet.rst b/docs/cheatsheet.rst index d36a96360..17537914a 100644 --- a/docs/cheatsheet.rst +++ b/docs/cheatsheet.rst @@ -81,7 +81,7 @@ Global Variables - ``abi.encodeWithSelector(bytes4 selector, ...) returns (bytes memory)``: :ref:`ABI `-encodes the given arguments starting from the second and prepends the given four-byte selector - ``abi.encodeWithSignature(string memory signature, ...) returns (bytes memory)``: Equivalent - to ``abi.encodeWithSelector(bytes4(keccak256(bytes(signature)), ...)``` + to ``abi.encodeWithSelector(bytes4(keccak256(bytes(signature)), ...)`` - ``bytes.concat(...) returns (bytes memory)``: :ref:`Concatenates variable number of arguments to one byte array` - ``block.basefee`` (``uint``): current block's base fee (`EIP-3198 `_ and `EIP-1559 `_) diff --git a/docs/units-and-global-variables.rst b/docs/units-and-global-variables.rst index 8a6173280..ac11e0806 100644 --- a/docs/units-and-global-variables.rst +++ b/docs/units-and-global-variables.rst @@ -135,7 +135,7 @@ ABI Encoding and Decoding Functions - ``abi.encode(...) returns (bytes memory)``: ABI-encodes the given arguments - ``abi.encodePacked(...) returns (bytes memory)``: Performs :ref:`packed encoding ` of the given arguments. Note that packed encoding can be ambiguous! - ``abi.encodeWithSelector(bytes4 selector, ...) returns (bytes memory)``: ABI-encodes the given arguments starting from the second and prepends the given four-byte selector -- ``abi.encodeWithSignature(string memory signature, ...) returns (bytes memory)``: Equivalent to ``abi.encodeWithSelector(bytes4(keccak256(bytes(signature))), ...)``` +- ``abi.encodeWithSignature(string memory signature, ...) returns (bytes memory)``: Equivalent to ``abi.encodeWithSelector(bytes4(keccak256(bytes(signature))), ...)`` .. note:: These encoding functions can be used to craft data for external function calls without actually diff --git a/docs/yul.rst b/docs/yul.rst index ef44a575b..219905cd5 100644 --- a/docs/yul.rst +++ b/docs/yul.rst @@ -166,7 +166,7 @@ Inside a code block, the following elements can be used - if statements, e.g. ``if lt(a, b) { sstore(0, 1) }`` - switch statements, e.g. ``switch mload(0) case 0 { revert() } default { mstore(0, 1) }`` - for loops, e.g. ``for { let i := 0} lt(i, 10) { i := add(i, 1) } { mstore(i, 7) }`` -- function definitions, e.g. ``function f(a, b) -> c { c := add(a, b) }``` +- function definitions, e.g. ``function f(a, b) -> c { c := add(a, b) }`` Multiple syntactical elements can follow each other simply separated by whitespace, i.e. there is no terminating ``;`` or newline required.