Skip to content

Commit

Permalink
Misspelling and terms inconsistencies (ethereum#14280)
Browse files Browse the repository at this point in the history
* Installing solidity tweeks

* A few more misspells

* More inconsistencies fixed

* Removed contractions according to our guide.
  • Loading branch information
NunoFilipeSantos authored May 30, 2023
1 parent a0933fa commit 3eedc63
Show file tree
Hide file tree
Showing 31 changed files with 105 additions and 106 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ assignees: ''

<!--
Please provide a *minimal* source code example to trigger the bug you have found.
Please also mention any command line flags that are necessary for triggering the bug.
Please also mention any command-line flags that are necessary for triggering the bug.
Provide as much information as necessary to reproduce the bug.
```solidity
Expand Down
2 changes: 1 addition & 1 deletion CODING_STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Use `solAssert` and `solUnimplementedAssert` generously to check assumptions tha
1. {Typename} + {qualifiers} + {name}.
2. Only one per line.
3. Associate */& with type, not variable (at ends with parser, but more readable, and safe if in conjunction with (b)).
4. Favour declarations close to use; don't habitually declare at top of scope ala C.
4. Favour declarations close to use; do not habitually declare at top of scope ala C.
5. Pass non-trivial parameters as const reference, unless the data is to be copied into the function, then either pass by const reference or by value and use std::move.
6. If a function returns multiple values, use std::tuple (std::pair acceptable) or better introduce a struct type. Do not use */& arguments.
7. Use parameters of pointer type only if ``nullptr`` is a valid argument, use references otherwise. Often, ``std::optional`` is better suited than a raw pointer.
Expand Down
2 changes: 1 addition & 1 deletion ReleaseChecklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ At least a day before the release:
- [ ] Create a [release on GitHub](https://github.com/ethereum/solidity/releases/new).
Set the target to the ``develop`` branch and the tag to the new version, e.g. ``v0.8.5``.
Include the following warning: ``**The release is still in progress and the binaries may not yet be available from all sources.**``.
Don't publish it yet - click the ``Save draft`` button instead.
Do not publish it yet - click the ``Save draft`` button instead.
- [ ] Thank voluntary contributors in the GitHub release notes.
Use ``scripts/list_contributors.sh v<previous version>`` to get initial list of names.
Remove different variants of the same name manually before using the output.
Expand Down
10 changes: 5 additions & 5 deletions docs/050-breaking-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ For most of the topics the compiler will provide suggestions.
``payable`` or create a new internal function for the program logic that
uses ``msg.value``.

* For clarity reasons, the command line interface now requires ``-`` if the
* For clarity reasons, the command-line interface now requires ``-`` if the
standard input is used as source.

Deprecated Elements
Expand All @@ -147,18 +147,18 @@ This section lists changes that deprecate prior features or syntax. Note that
many of these changes were already enabled in the experimental mode
``v0.5.0``.

Command Line and JSON Interfaces
Command-line and JSON Interfaces
--------------------------------

* The command line option ``--formal`` (used to generate Why3 output for
* The command-line option ``--formal`` (used to generate Why3 output for
further formal verification) was deprecated and is now removed. A new
formal verification module, the SMTChecker, is enabled via ``pragma
experimental SMTChecker;``.

* The command line option ``--julia`` was renamed to ``--yul`` due to the
* The command-line option ``--julia`` was renamed to ``--yul`` due to the
renaming of the intermediate language ``Julia`` to ``Yul``.

* The ``--clone-bin`` and ``--combined-json clone-bin`` command line options
* The ``--clone-bin`` and ``--combined-json clone-bin`` command-line options
were removed.

* Remappings with empty prefix are disallowed.
Expand Down
12 changes: 6 additions & 6 deletions docs/060-breaking-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For the full list check
Changes the Compiler Might not Warn About
=========================================

This section lists changes where the behaviour of your code might
This section lists changes where the behavior of your code might
change without the compiler telling you about it.

* The resulting type of an exponentiation is the type of the base. It used to be the smallest type
Expand Down Expand Up @@ -105,23 +105,23 @@ Interface Changes
=================

This section lists changes that are unrelated to the language itself, but that have an effect on the interfaces of
the compiler. These may change the way how you use the compiler on the command line, how you use its programmable
the compiler. These may change the way how you use the compiler on the command-line, how you use its programmable
interface, or how you analyze the output produced by it.

New Error Reporter
~~~~~~~~~~~~~~~~~~

A new error reporter was introduced, which aims at producing more accessible error messages on the command line.
A new error reporter was introduced, which aims at producing more accessible error messages on the command-line.
It is enabled by default, but passing ``--old-reporter`` falls back to the the deprecated old error reporter.

Metadata Hash Options
~~~~~~~~~~~~~~~~~~~~~

The compiler now appends the `IPFS <https://ipfs.io/>`_ hash of the metadata file to the end of the bytecode by default
(for details, see documentation on :doc:`contract metadata <metadata>`). Before 0.6.0, the compiler appended the
`Swarm <https://ethersphere.github.io/swarm-home/>`_ hash by default, and in order to still support this behaviour,
the new command line option ``--metadata-hash`` was introduced. It allows you to select the hash to be produced and
appended, by passing either ``ipfs`` or ``swarm`` as value to the ``--metadata-hash`` command line option.
`Swarm <https://ethersphere.github.io/swarm-home/>`_ hash by default, and in order to still support this behavior,
the new command-line option ``--metadata-hash`` was introduced. It allows you to select the hash to be produced and
appended, by passing either ``ipfs`` or ``swarm`` as value to the ``--metadata-hash`` command-line option.
Passing the value ``none`` completely removes the hash.

These changes can also be used via the :ref:`Standard JSON Interface<compiler-api>` and effect the metadata JSON generated by the compiler.
Expand Down
10 changes: 5 additions & 5 deletions docs/080-breaking-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ For the full list check
Silent Changes of the Semantics
===============================

This section lists changes where existing code changes its behaviour without
This section lists changes where existing code changes its behavior without
the compiler notifying you about it.

* Arithmetic operations revert on underflow and overflow. You can use ``unchecked { ... }`` to use
the previous wrapping behaviour.
the previous wrapping behavior.

Checks for overflow are very common, so we made them the default to increase readability of code,
even if it comes at a slight increase of gas costs.

* ABI coder v2 is activated by default.

You can choose to use the old behaviour using ``pragma abicoder v1;``.
You can choose to use the old behavior using ``pragma abicoder v1;``.
The pragma ``pragma experimental ABIEncoderV2;`` is still valid, but it is deprecated and has no effect.
If you want to be explicit, please use ``pragma abicoder v2;`` instead.

Expand Down Expand Up @@ -57,7 +57,7 @@ New Restrictions

This section lists changes that might cause existing contracts to not compile anymore.

* There are new restrictions related to explicit conversions of literals. The previous behaviour in
* There are new restrictions related to explicit conversions of literals. The previous behavior in
the following cases was likely ambiguous:

1. Explicit conversions from negative literals and literals larger than ``type(uint160).max`` to
Expand Down Expand Up @@ -106,7 +106,7 @@ This section lists changes that might cause existing contracts to not compile an

* The global functions ``log0``, ``log1``, ``log2``, ``log3`` and ``log4`` have been removed.

These are low-level functions that were largely unused. Their behaviour can be accessed from inline assembly.
These are low-level functions that were largely unused. Their behavior can be accessed from inline assembly.

* ``enum`` definitions cannot contain more than 256 members.

Expand Down
2 changes: 1 addition & 1 deletion docs/abi-spec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ A function description is a JSON object with the fields:
blockchain state <pure-functions>`), ``view`` (:ref:`specified to not modify the blockchain
state <view-functions>`), ``nonpayable`` (function does not accept Ether - the default) and ``payable`` (function accepts Ether).

Constructor, receive, and fallback never have ``name`` or ``outputs``. Receive and fallback don't have ``inputs`` either.
Constructor, receive, and fallback never have ``name`` or ``outputs``. Receive and fallback do not have ``inputs`` either.

.. note::
Sending non-zero Ether to non-payable function will revert the transaction.
Expand Down
4 changes: 2 additions & 2 deletions docs/assembly.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ in memory is automatically considered memory-safe and does not need to be annota
.. warning::
It is your responsibility to make sure that the assembly actually satisfies the memory model. If you annotate
an assembly block as memory-safe, but violate one of the memory assumptions, this **will** lead to incorrect and
undefined behaviour that cannot easily be discovered by testing.
undefined behavior that cannot easily be discovered by testing.

In case you are developing a library that is meant to be compatible across multiple versions
of Solidity, you can use a special comment to annotate an assembly block as memory-safe:
Expand All @@ -375,4 +375,4 @@ of Solidity, you can use a special comment to annotate an assembly block as memo
}
Note that we will disallow the annotation via comment in a future breaking release; so, if you are not concerned with
backwards-compatibility with older compiler versions, prefer using the dialect string.
backward-compatibility with older compiler versions, prefer using the dialect string.
4 changes: 2 additions & 2 deletions docs/cheatsheet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Modifiers
- ``anonymous`` for events: Does not store event signature as topic.
- ``indexed`` for event parameters: Stores the parameter as topic.
- ``virtual`` for functions and modifiers: Allows the function's or modifier's
behaviour to be changed in derived contracts.
behavior to be changed in derived contracts.
- ``override``: States that this function, modifier or public state variable changes
the behaviour of a function or modifier in a base contract.
the behavior of a function or modifier in a base contract.

2 changes: 1 addition & 1 deletion docs/contracts/function-modifiers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Function Modifiers
******************

Modifiers can be used to change the behaviour of functions in a declarative way.
Modifiers can be used to change the behavior of functions in a declarative way.
For example,
you can use a modifier to automatically check a condition prior to executing the function.

Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Reverting a state change is not considered a "state modification", as only chang
state made previously in code that did not have the ``view`` or ``pure`` restriction
are reverted and that code has the option to catch the ``revert`` and not pass it on.

This behaviour is also in line with the ``STATICCALL`` opcode.
This behavior is also in line with the ``STATICCALL`` opcode.

.. warning::
It is not possible to prevent functions from reading the state at the level
Expand Down
8 changes: 4 additions & 4 deletions docs/contracts/inheritance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Details are given in the following example.
// accessed externally via `this`, though.
contract Destructible is Owned {
// The keyword `virtual` means that the function can change
// its behaviour in derived classes ("overriding").
// its behavior in derived classes ("overriding").
function destroy() virtual public {
if (msg.sender == owner) selfdestruct(owner);
}
Expand Down Expand Up @@ -115,7 +115,7 @@ Details are given in the following example.
// Here, we only specify `override` and not `virtual`.
// This means that contracts deriving from `PriceFeed`
// cannot change the behaviour of `destroy` anymore.
// cannot change the behavior of `destroy` anymore.
function destroy() public override(Destructible, Named) { Named.destroy(); }
function get() public view returns(uint r) { return info; }
Expand Down Expand Up @@ -293,7 +293,7 @@ and ends at a contract mentioning a function with that signature
that does not override.

If you do not mark a function that overrides as ``virtual``, derived
contracts can no longer change the behaviour of that function.
contracts can no longer change the behavior of that function.

.. note::

Expand Down Expand Up @@ -487,7 +487,7 @@ One way is directly in the inheritance list (``is Base(7)``). The other is in
the way a modifier is invoked as part of
the derived constructor (``Base(y * y)``). The first way to
do it is more convenient if the constructor argument is a
constant and defines the behaviour of the contract or
constant and defines the behavior of the contract or
describes it. The second way has to be used if the
constructor arguments of the base depend on those of the
derived contract. Arguments have to be given either in the
Expand Down
8 changes: 4 additions & 4 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ reporting issues, please mention the following details:
* Source code (if applicable).
* Operating system.
* Steps to reproduce the issue.
* Actual vs. expected behaviour.
* Actual vs. expected behavior.

Reducing the source code that caused the issue to a bare minimum is always
very helpful, and sometimes even clarifies a misunderstanding.
Expand Down Expand Up @@ -114,7 +114,7 @@ Running ``build/test/soltest`` or its wrapper ``scripts/soltest.sh`` is sufficie

The ``./scripts/tests.sh`` script executes most Solidity tests automatically,
including those bundled into the `Boost C++ Test Framework <https://www.boost.org/doc/libs/release/libs/test/doc/html/index.html>`_
application ``soltest`` (or its wrapper ``scripts/soltest.sh``), as well as command line tests and
application ``soltest`` (or its wrapper ``scripts/soltest.sh``), as well as command-line tests and
compilation tests.

The test system automatically tries to discover the location of
Expand Down Expand Up @@ -239,7 +239,7 @@ provides a way to edit, update or skip the current contract file, or quit the ap

It offers several options for failing tests:

- ``edit``: ``isoltest`` tries to open the contract in an editor so you can adjust it. It either uses the editor given on the command line (as ``isoltest --editor /path/to/editor``), in the environment variable ``EDITOR`` or just ``/usr/bin/editor`` (in that order).
- ``edit``: ``isoltest`` tries to open the contract in an editor so you can adjust it. It either uses the editor given on the command-line (as ``isoltest --editor /path/to/editor``), in the environment variable ``EDITOR`` or just ``/usr/bin/editor`` (in that order).
- ``update``: Updates the expectations for contract under test. This updates the annotations by removing unmet expectations and adding missing expectations. The test is then run again.
- ``skip``: Skips the execution of this particular test.
- ``quit``: Quits ``isoltest``.
Expand Down Expand Up @@ -350,7 +350,7 @@ The AFL documentation states that the corpus (the initial input files) should no
too large. The files themselves should not be larger than 1 kB and there should be
at most one input file per functionality, so better start with a small number of.
There is also a tool called ``afl-cmin`` that can trim input files
that result in similar behaviour of the binary.
that result in similar behavior of the binary.

Now run the fuzzer (the ``-m`` extends the size of memory to 60 MB):

Expand Down
8 changes: 4 additions & 4 deletions docs/control-structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,13 @@ i.e. the following is not valid: ``(x, uint y) = (1, 2);``
.. warning::
Be careful when assigning to multiple variables at the same time when
reference types are involved, because it could lead to unexpected
copying behaviour.
copying behavior.

Complications for Arrays and Structs
------------------------------------

The semantics of assignments are more complicated for non-value types like arrays and structs,
including ``bytes`` and ``string``, see :ref:`Data location and assignment behaviour <data-location-assignment>` for details.
including ``bytes`` and ``string``, see :ref:`Data location and assignment behavior <data-location-assignment>` for details.

In the example below the call to ``g(x)`` has no effect on ``x`` because it creates
an independent copy of the storage value in memory. However, ``h(x)`` successfully modifies ``x``
Expand Down Expand Up @@ -510,7 +510,7 @@ additional checks.
Since Solidity 0.8.0, all arithmetic operations revert on over- and underflow by default,
thus making the use of these libraries unnecessary.

To obtain the previous behaviour, an ``unchecked`` block can be used:
To obtain the previous behavior, an ``unchecked`` block can be used:

.. code-block:: solidity
Expand Down Expand Up @@ -719,7 +719,7 @@ The ``revert`` statement takes a custom error as direct argument without parenth

revert CustomError(arg1, arg2);

For backwards-compatibility reasons, there is also the ``revert()`` function, which uses parentheses
For backward-compatibility reasons, there is also the ``revert()`` function, which uses parentheses
and accepts a string:

revert();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/micropayment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Packing arguments
Now that we have identified what information to include in the signed message,
we are ready to put the message together, hash it, and sign it. For simplicity,
we concatenate the data. The `ethereumjs-abi <https://github.com/ethereumjs/ethereumjs-abi>`_
library provides a function called ``soliditySHA3`` that mimics the behaviour of
library provides a function called ``soliditySHA3`` that mimics the behavior of
Solidity's ``keccak256`` function applied to arguments encoded using ``abi.encodePacked``.
Here is a JavaScript function that creates the proper signature for the ``ReceiverPays`` example:

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/modular.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Modular Contracts
A modular approach to building your contracts helps you reduce the complexity
and improve the readability which will help to identify bugs and vulnerabilities
during development and code review.
If you specify and control the behaviour of each module in isolation, the
If you specify and control the behavior of each module in isolation, the
interactions you have to consider are only those between the module specifications
and not every other moving part of the contract.
In the example below, the contract uses the ``move`` method
Expand Down
Loading

0 comments on commit 3eedc63

Please sign in to comment.