From 1468f5ac41547845e5c663bc035db735eff01fec Mon Sep 17 00:00:00 2001 From: minaminao Date: Tue, 28 Mar 2023 22:50:35 +0900 Subject: [PATCH 01/10] Fix the missing backquote --- docs/using-the-compiler.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst index 2eac2d157..fd305dce4 100644 --- a/docs/using-the-compiler.rst +++ b/docs/using-the-compiler.rst @@ -160,7 +160,7 @@ at each version. Backward compatibility is not guaranteed between each version. - It is possible to access dynamic data returned from function calls. - ``revert`` opcode introduced, which means that ``revert()`` will not waste gas. - ``constantinople`` - - Opcodes ``create2`, ``extcodehash``, ``shl``, ``shr`` and ``sar`` are available in assembly. + - Opcodes ``create2``, ``extcodehash``, ``shl``, ``shr`` and ``sar`` are available in assembly. - Shifting operators use shifting opcodes and thus need less gas. - ``petersburg`` - The compiler behaves the same way as with constantinople. From 58f3aa8c280e0a3619f5475a27a999dc098b2386 Mon Sep 17 00:00:00 2001 From: minaminao Date: Tue, 28 Mar 2023 22:52:09 +0900 Subject: [PATCH 02/10] Fix the code block not rendered --- docs/contributing.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/contributing.rst b/docs/contributing.rst index e6925a489..a5bbf6f69 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -175,6 +175,7 @@ See especially: If you want to debug using GDB, make sure you build differently than the "usual". For example, you could run the following command in your ``build`` folder: + .. code-block:: bash cmake -DCMAKE_BUILD_TYPE=Debug .. From c5ae22db86bf28f92bcb38f041c3d4673d28070b Mon Sep 17 00:00:00 2001 From: minaminao Date: Tue, 28 Mar 2023 22:53:57 +0900 Subject: [PATCH 03/10] Wrap numbers in backquotes --- docs/ir-breaking-changes.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ir-breaking-changes.rst b/docs/ir-breaking-changes.rst index 2d972baa7..f8a6cceb3 100644 --- a/docs/ir-breaking-changes.rst +++ b/docs/ir-breaking-changes.rst @@ -174,8 +174,8 @@ hiding new and different behavior in existing code. The function ``preincr_u8(1)`` returns the following values: - - Old code generator: 3 (``1 + 2``) but the return value is unspecified in general - - New code generator: 4 (``2 + 2``) but the return value is not guaranteed + - Old code generator: ``3`` (``1 + 2``) but the return value is unspecified in general + - New code generator: ``4`` (``2 + 2``) but the return value is not guaranteed .. index:: ! evaluation order; function arguments From f12e368d6767e79fa6ec98b79b73f26634f06f33 Mon Sep 17 00:00:00 2001 From: minaminao Date: Tue, 28 Mar 2023 22:55:09 +0900 Subject: [PATCH 04/10] Fix the missing dot --- docs/smtchecker.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/smtchecker.rst b/docs/smtchecker.rst index 3ad700a30..b06e20c68 100644 --- a/docs/smtchecker.rst +++ b/docs/smtchecker.rst @@ -681,7 +681,7 @@ most derived type in case of inheritance. } Note that in function ``property_transfer``, the external calls are -performed on variable ``t`` +performed on variable ``t``. Another caveat of this mode are calls to state variables of contract type outside the analyzed contract. In the code below, even though ``B`` deploys From dce1e7b378d934cf31e28d191009bc8ee649dd9b Mon Sep 17 00:00:00 2001 From: minaminao Date: Tue, 28 Mar 2023 22:56:24 +0900 Subject: [PATCH 05/10] Fix "Yul Code" --- docs/using-the-compiler.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst index fd305dce4..8ce3290ae 100644 --- a/docs/using-the-compiler.rst +++ b/docs/using-the-compiler.rst @@ -636,6 +636,6 @@ Error Types 10. ``Exception``: Unknown failure during compilation - this should be reported as an issue. 11. ``CompilerError``: Invalid use of the compiler stack - this should be reported as an issue. 12. ``FatalError``: Fatal error not processed correctly - this should be reported as an issue. -13. ``YulException``: Error during Yul Code generation - this should be reported as an issue. +13. ``YulException``: Error during Yul code generation - this should be reported as an issue. 14. ``Warning``: A warning, which didn't stop the compilation, but should be addressed if possible. 15. ``Info``: Information that the compiler thinks the user might find useful, but is not dangerous and does not necessarily need to be addressed. \ No newline at end of file From ccb64e9fa42e8c3b5350bc13ce391c496637f73b Mon Sep 17 00:00:00 2001 From: minaminao Date: Tue, 28 Mar 2023 22:57:39 +0900 Subject: [PATCH 06/10] Fix the style of bullet points --- docs/path-resolution.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/path-resolution.rst b/docs/path-resolution.rst index c61abce0a..f63f5e79d 100644 --- a/docs/path-resolution.rst +++ b/docs/path-resolution.rst @@ -253,6 +253,7 @@ The compiler resolves the import into a source unit name based on the import pat #. We start with the source unit name of the importing source unit. #. The last path segment with preceding slashes is removed from the resolved name. #. Then, for every segment in the import path, starting from the leftmost one: + - If the segment is ``.``, it is skipped. - If the segment is ``..``, the last path segment with preceding slashes is removed from the resolved name. - Otherwise, the segment (preceded by a single slash if the resolved name is not empty), is appended to the resolved name. From cd8636105da9c203b0a26d4c8e07dfb75b6e0c9e Mon Sep 17 00:00:00 2001 From: minaminao Date: Tue, 28 Mar 2023 22:59:05 +0900 Subject: [PATCH 07/10] Replace python with Python --- docs/style-guide.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/style-guide.rst b/docs/style-guide.rst index fab46f139..6173aecc6 100644 --- a/docs/style-guide.rst +++ b/docs/style-guide.rst @@ -16,11 +16,11 @@ Many projects will implement their own style guides. In the event of conflicts, project specific style guides take precedence. The structure and many of the recommendations within this style guide were -taken from python's +taken from Python's `pep8 style guide `_. The goal of this guide is *not* to be the right way or the best way to write -Solidity code. The goal of this guide is *consistency*. A quote from python's +Solidity code. The goal of this guide is *consistency*. A quote from Python's `pep8 `_ captures this concept well. From 25a41e3ac62f859f78cd65247176f6705025ac5e Mon Sep 17 00:00:00 2001 From: minaminao Date: Tue, 28 Mar 2023 22:59:48 +0900 Subject: [PATCH 08/10] Replace Javascript with JavaScript --- docs/bugs.rst | 2 +- docs/contracts/events.rst | 2 +- docs/smtchecker.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/bugs.rst b/docs/bugs.rst index 75a23e499..350b1e7a4 100644 --- a/docs/bugs.rst +++ b/docs/bugs.rst @@ -68,7 +68,7 @@ conditions If no conditions are given, assume that the bug is present. check This field contains different checks that report whether the smart contract - contains the bug or not. The first type of check are Javascript regular + contains the bug or not. The first type of check are JavaScript regular expressions that are to be matched against the source code ("source-regex") if the bug is present. If there is no match, then the bug is very likely not present. If there is a match, the bug might be present. For improved diff --git a/docs/contracts/events.rst b/docs/contracts/events.rst index a7c7bc13f..ca992e6ca 100644 --- a/docs/contracts/events.rst +++ b/docs/contracts/events.rst @@ -151,6 +151,6 @@ The output of the above looks like the following (trimmed): Additional Resources for Understanding Events ============================================= -- `Javascript documentation `_ +- `JavaScript documentation `_ - `Example usage of events `_ - `How to access them in js `_ diff --git a/docs/smtchecker.rst b/docs/smtchecker.rst index b06e20c68..45d8d410d 100644 --- a/docs/smtchecker.rst +++ b/docs/smtchecker.rst @@ -834,7 +834,7 @@ option ``--model-checker-solvers {all,cvc4,eld,smtlib2,z3}`` or the JSON option - if ``solc`` is compiled with it; - if a dynamic ``z3`` library of version >=4.8.x is installed in a Linux system (from Solidity 0.7.6); - - statically in ``soljson.js`` (from Solidity 0.6.9), that is, the Javascript binary of the compiler. + - statically in ``soljson.js`` (from Solidity 0.6.9), that is, the JavaScript binary of the compiler. .. note:: z3 version 4.8.16 broke ABI compatibility with previous versions and cannot From c2a2fce8e7db70d3b80f6e62dcd10334dc33eae3 Mon Sep 17 00:00:00 2001 From: minaminao Date: Tue, 28 Mar 2023 23:01:06 +0900 Subject: [PATCH 09/10] Replace Send with ``send`` --- docs/types/value-types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/types/value-types.rst b/docs/types/value-types.rst index ffdec3796..a370cf70e 100644 --- a/docs/types/value-types.rst +++ b/docs/types/value-types.rst @@ -257,7 +257,7 @@ reverts on failure. * ``send`` -Send is the low-level counterpart of ``transfer``. If the execution fails, the current contract will not stop with an exception, but ``send`` will return ``false``. +``send`` is the low-level counterpart of ``transfer``. If the execution fails, the current contract will not stop with an exception, but ``send`` will return ``false``. .. warning:: There are some dangers in using ``send``: The transfer fails if the call stack depth is at 1024 From c0f92da86006557e9b42b0cec0c3329cbc848754 Mon Sep 17 00:00:00 2001 From: minaminao Date: Tue, 28 Mar 2023 23:02:29 +0900 Subject: [PATCH 10/10] Replace solidity with Solidity --- docs/using-the-compiler.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst index 8ce3290ae..d004bdeaa 100644 --- a/docs/using-the-compiler.rst +++ b/docs/using-the-compiler.rst @@ -15,7 +15,7 @@ Using the Commandline Compiler Basic Usage ----------- -One of the build targets of the Solidity repository is ``solc``, the solidity commandline compiler. +One of the build targets of the Solidity repository is ``solc``, the Solidity commandline compiler. Using ``solc --help`` provides you with an explanation of all options. The compiler can produce various outputs, ranging from simple binaries and assembly over an abstract syntax tree (parse tree) to estimations of gas usage. If you only want to compile a single file, you run it as ``solc --bin sourceFile.sol`` and it will print the binary. If you want to get some of the more advanced output variants of ``solc``, it is probably better to tell it to output everything to separate files using ``solc -o outputDirectory --bin --ast-compact-json --asm sourceFile.sol``.