diff --git a/docs/brand-guide.rst b/docs/brand-guide.rst index 0e6400bed..dda438533 100644 --- a/docs/brand-guide.rst +++ b/docs/brand-guide.rst @@ -43,7 +43,7 @@ Solidity Logo License :alt: Creative Commons License The Solidity logo is distributed and licensed under a `Creative Commons -Attribution 4.0 International License `_. +Attribution 4.0 International License `_. This is the most permissive Creative Commons license and allows reuse and modifications for any purpose. diff --git a/docs/contracts/constant-state-variables.rst b/docs/contracts/constant-state-variables.rst index 33204f58d..06bc4189e 100644 --- a/docs/contracts/constant-state-variables.rst +++ b/docs/contracts/constant-state-variables.rst @@ -21,7 +21,7 @@ is copied to all the places in the code where they are accessed. For these value can sometimes be cheaper than immutable values. Not all types for constants and immutables are implemented at this time. The only supported types are -`strings `_ (only for constants) and `value types `_. +:ref:`strings ` (only for constants) and :ref:`value types `. :: diff --git a/docs/contracts/events.rst b/docs/contracts/events.rst index 3183d3c3f..b7289e784 100644 --- a/docs/contracts/events.rst +++ b/docs/contracts/events.rst @@ -160,6 +160,6 @@ where the long hexadecimal number is equal to Additional Resources for Understanding Events ============================================== -- `Javascript documentation `_ -- `Example usage of events `_ -- `How to access them in js `_ +- `Javascript documentation `_ +- `Example usage of events `_ +- `How to access them in js `_ diff --git a/docs/contracts/inheritance.rst b/docs/contracts/inheritance.rst index f628d49fb..533f74da4 100644 --- a/docs/contracts/inheritance.rst +++ b/docs/contracts/inheritance.rst @@ -331,7 +331,7 @@ Modifier Overriding =================== Function modifiers can override each other. This works in the same way as -`function overriding `_ (except that there is no overloading for modifiers). The +:ref:`function overriding ` (except that there is no overloading for modifiers). The ``virtual`` keyword must be used on the overridden modifier and the ``override`` keyword must be used in the overriding modifier: diff --git a/docs/contributing.rst b/docs/contributing.rst index 5d7dc9591..a5932c8fe 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -254,7 +254,7 @@ inside the input. We have a specialized binary called ``solfuzzer`` which takes and fails whenever it encounters an internal compiler error, segmentation fault or similar, but does not fail if e.g., the code contains an error. This way, fuzzing tools can find internal problems in the compiler. -We mainly use `AFL `_ for fuzzing. You need to download and +We mainly use `AFL `_ for fuzzing. You need to download and install the AFL packages from your repositories (afl, afl-clang) or build them manually. Next, build Solidity (or just the ``solfuzzer`` binary) with AFL as your compiler: @@ -388,7 +388,7 @@ local slang and references, making your language as clear to all readers as poss Title Case for Headings ----------------------- -Use `title case `_ for headings. This means capitalise all principal words in +Use `title case `_ for headings. This means capitalise all principal words in titles, but not articles, conjunctions, and prepositions unless they start the title. diff --git a/docs/examples/micropayment.rst b/docs/examples/micropayment.rst index b68de3cad..2ff293f48 100644 --- a/docs/examples/micropayment.rst +++ b/docs/examples/micropayment.rst @@ -114,7 +114,7 @@ In general, ECDSA signatures consist of two parameters, parameter called ``v``, that you can use to verify which account's private key was used to sign the message, and the transaction's sender. Solidity provides a built-in -function `ecrecover `_ that +function :ref:`ecrecover ` that accepts a message along with the ``r``, ``s`` and ``v`` parameters and returns the address that was used to sign the message. @@ -127,7 +127,7 @@ apart. You can do this on the client-side, but doing it inside the smart contract means you only need to send one signature parameter rather than three. Splitting apart a byte array into its constituent parts is a mess, so we use -`inline assembly `_ to do the job in the ``splitSignature`` +:doc:`inline assembly ` to do the job in the ``splitSignature`` function (the third function in the full contract at the end of this section). Computing the Message Hash diff --git a/docs/index.rst b/docs/index.rst index 470fc56fe..2468c4867 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -72,10 +72,10 @@ Community volunteers help translate this documentation into several languages. They have varying degrees of completeness and up-to-dateness. The English version stands as a reference. -* `French `_ (in progress) +* `French `_ (in progress) * `Italian `_ (in progress) * `Japanese `_ -* `Korean `_ (in progress) +* `Korean `_ (in progress) * `Russian `_ (rather outdated) * `Simplified Chinese `_ (in progress) * `Spanish `_ diff --git a/docs/installing-solidity.rst b/docs/installing-solidity.rst index e992e9491..7a5c52d71 100644 --- a/docs/installing-solidity.rst +++ b/docs/installing-solidity.rst @@ -205,7 +205,7 @@ The following are dependencies for all builds of Solidity: | `cvc4`_ (Optional) | For use with SMT checker. | +-----------------------------------+-------------------------------------------------------+ -.. _cvc4: http://cvc4.cs.stanford.edu/web/ +.. _cvc4: https://cvc4.cs.stanford.edu/web/ .. _Git: https://git-scm.com/download .. _Boost: https://www.boost.org .. _CMake: https://cmake.org/download/ @@ -243,10 +243,10 @@ command-line builds: sudo xcodebuild -license accept -Our OS X build script uses `the Homebrew `_ +Our OS X build script uses `the Homebrew `_ package manager for installing external dependencies. Here's how to `uninstall Homebrew -`_, +`_, if you ever want to start again from scratch. Prerequisites - Windows diff --git a/docs/introduction-to-smart-contracts.rst b/docs/introduction-to-smart-contracts.rst index 39454ece1..f2b12e930 100644 --- a/docs/introduction-to-smart-contracts.rst +++ b/docs/introduction-to-smart-contracts.rst @@ -285,7 +285,7 @@ likely it will be. since it is not up to the submitter of a transaction, but up to the miners to determine in which block the transaction is included. If you want to schedule future calls of your contract, you can use - the `alarm clock `_ or a similar oracle service. + the `alarm clock `_ or a similar oracle service. .. _the-ethereum-virtual-machine: diff --git a/docs/layout-of-source-files.rst b/docs/layout-of-source-files.rst index d80af49f7..6c0dd0a16 100644 --- a/docs/layout-of-source-files.rst +++ b/docs/layout-of-source-files.rst @@ -22,7 +22,7 @@ Every source file should start with a comment indicating its license: The compiler does not validate that the license is part of the `list allowed by SPDX `_, but -it does include the supplied string in the `bytecode metadata `_. +it does include the supplied string in the :ref:`bytecode metadata `. If you do not want to specify a license or if the source code is not open-source, please use the special value ``UNLICENSED``. diff --git a/docs/metadata.rst b/docs/metadata.rst index 240814adc..bd827a0d8 100644 --- a/docs/metadata.rst +++ b/docs/metadata.rst @@ -202,6 +202,6 @@ This automatically verifies the metadata since its hash is part of the bytecode. Excess data corresponds to the constructor input data, which should be decoded according to the interface and presented to the user. -In the repository `source-verify `_ +In the repository `sourcify `_ (`npm package `_) you can see example code that shows how to use this feature. diff --git a/docs/natspec-format.rst b/docs/natspec-format.rst index acb7a35d3..ad41fe579 100644 --- a/docs/natspec-format.rst +++ b/docs/natspec-format.rst @@ -36,7 +36,7 @@ for the purposes of NatSpec. - For Vyper, use ``"""`` indented to the inner contents with bare comments. See `Vyper - documentation `__. + documentation `__. The following example shows a contract and a function using all available tags. diff --git a/docs/resources.rst b/docs/resources.rst index 02c1930aa..01c4715a1 100644 --- a/docs/resources.rst +++ b/docs/resources.rst @@ -75,25 +75,14 @@ Solidity Integrations * `Vim Solidity `_ Plugin for the Vim editor providing syntax highlighting. - * `Vim Syntastic `_ + * `Vim Syntastic `_ Plugin for the Vim editor providing compile checking. * Visual Studio Code: - * `Visual Studio Code extension `_ + * `Visual Studio Code extension `_ Solidity plugin for Microsoft Visual Studio Code that includes syntax highlighting and the Solidity compiler. -Discontinued: - -* `Mix IDE `_ - Qt based IDE for designing, debugging and testing solidity smart contracts. - -* `Ethereum Studio `_ - Specialized web IDE that also provides shell access to a complete Ethereum environment. - -* `Visual Studio Extension `_ - Solidity plugin for Microsoft Visual Studio that includes the Solidity compiler. - Solidity Tools ~~~~~~~~~~~~~~ @@ -142,8 +131,5 @@ Solidity Tools Third-Party Solidity Parsers and Grammars ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* `solidity-parser `_ - Solidity parser for JavaScript - -* `Solidity Grammar for ANTLR 4 `_ - Solidity grammar for the ANTLR 4 parser generator +* `Solidity Parser for JavaScript `_ + A Solidity parser for JS built on top of a robust ANTLR4 grammar. diff --git a/docs/security-considerations.rst b/docs/security-considerations.rst index a471fdd00..3a6d5dfd6 100644 --- a/docs/security-considerations.rst +++ b/docs/security-considerations.rst @@ -259,7 +259,7 @@ more special edge cases for signed numbers. Try to use ``require`` to limit the size of inputs to a reasonable range and use the :ref:`SMT checker` to find potential overflows, or use a library like -`SafeMath `_ +`SafeMath `_ if you want all overflows to cause a revert. Code such as ``require((balanceOf[_to] + _value) >= balanceOf[_to])`` can also help you check if values are what you expect. diff --git a/docs/style-guide.rst b/docs/style-guide.rst index 30ceec3a9..73a65df08 100644 --- a/docs/style-guide.rst +++ b/docs/style-guide.rst @@ -1145,11 +1145,11 @@ NatSpec Solidity contracts can have a form of comments that are the basis of the Ethereum Natural Language Specification Format. -Add comments above functions or contracts following `doxygen `_ notation +Add comments above functions or contracts following `doxygen `_ notation of one or multiple lines starting with ``///`` or a multiline comment starting with ``/**`` and ending with ``*/``. -For example, the contract from `a simple smart contract `_ with the comments +For example, the contract from :ref:`a simple smart contract ` with the comments added looks like the one below:: // SPDX-License-Identifier: GPL-3.0 @@ -1176,6 +1176,6 @@ added looks like the one below:: } } -It is recommended that Solidity contracts are fully annotated using `NatSpec `_ for all public interfaces (everything in the ABI). +It is recommended that Solidity contracts are fully annotated using :ref:`NatSpec ` for all public interfaces (everything in the ABI). -Please see the section about `NatSpec `_ for a detailed explanation. +Please see the section about :ref:`NatSpec ` for a detailed explanation. diff --git a/docs/units-and-global-variables.rst b/docs/units-and-global-variables.rst index a32900a50..b67f84739 100644 --- a/docs/units-and-global-variables.rst +++ b/docs/units-and-global-variables.rst @@ -160,6 +160,8 @@ more details on error handling and when to use which function. .. index:: keccak256, ripemd160, sha256, ecrecover, addmod, mulmod, cryptography, +.. _mathematical-and-cryptographic-functions: + Mathematical and Cryptographic Functions ---------------------------------------- @@ -193,17 +195,17 @@ Mathematical and Cryptographic Functions ``ecrecover`` returns an ``address``, and not an ``address payable``. See :ref:`address payable
` for conversion, in case you need to transfer funds to the recovered address. - For further details, read `example usage `_. + For further details, read `example usage `_. .. warning:: If you use ``ecrecover``, be aware that a valid signature can be turned into a different valid signature without requiring knowledge of the corresponding private key. In the Homestead hard fork, this issue was fixed - for _transaction_ signatures (see `EIP-2 `_), but + for _transaction_ signatures (see `EIP-2 `_), but the ecrecover function remained unchanged. This is usually not a problem unless you require signatures to be unique or - use them to identify items. OpenZeppelin have a `ECDSA helper library `_ that you can use as a wrapper for ``ecrecover`` without this issue. + use them to identify items. OpenZeppelin have a `ECDSA helper library `_ that you can use as a wrapper for ``ecrecover`` without this issue. .. note:: diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index a825a6d84..87f889e8f 100755 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -101,7 +101,7 @@ case $(uname -s) in esac # Check for Homebrew install and abort if it is not installed. - brew -v > /dev/null 2>&1 || { echo >&2 "ERROR - solidity requires a Homebrew install. See http://brew.sh."; exit 1; } + brew -v > /dev/null 2>&1 || { echo >&2 "ERROR - solidity requires a Homebrew install. See https://brew.sh."; exit 1; } brew update brew install boost brew install cmake