From d454cec1bd8c95d0ab850a199bf9696dcebe14a5 Mon Sep 17 00:00:00 2001 From: Cryptomental Date: Tue, 10 Jul 2018 09:15:39 +0200 Subject: circleci: Integrate codespell. Run codespell against documentation and during Linux test run. Use codespell_whitelist.txt dictionary to whitelist words that should not be considered as misspelled. Currently whitelist "iff" and "nd". Refs: #4442 --- .circleci/config.yml | 18 ++++++++++++++++++ scripts/codespell_whitelist.txt | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 scripts/codespell_whitelist.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index 30dccead..c577be7b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -158,6 +158,23 @@ jobs: - store_artifacts: *solc_artifact - persist_to_workspace: *all_artifacts + test_check_spelling: + docker: + - image: circleci/python:3.6 + environment: + TERM: xterm + steps: + - checkout + - attach_workspace: + at: build + - run: + name: Install dependencies + command: | + pip install --user codespell + - run: + name: Check spelling + command: ~/.local/bin/codespell -S "*.enc,.git" -I ./scripts/codespell_whitelist.txt + test_x86_linux: docker: - image: buildpack-deps:artful @@ -220,6 +237,7 @@ workflows: version: 2 build_all: jobs: + - test_check_spelling: *build_on_tags - build_emscripten: *build_on_tags - test_emscripten_solcjs: <<: *build_on_tags diff --git a/scripts/codespell_whitelist.txt b/scripts/codespell_whitelist.txt new file mode 100644 index 00000000..31f03981 --- /dev/null +++ b/scripts/codespell_whitelist.txt @@ -0,0 +1,3 @@ +iff +nd +assignend -- cgit From eb92d5f760995aef4c79fcaa3f8c2437718ffc7f Mon Sep 17 00:00:00 2001 From: Cryptomental Date: Tue, 10 Jul 2018 09:17:33 +0200 Subject: docs: Fix typos. Used codespell and manual fixes. Refs: #4442 --- docs/abi-spec.rst | 8 ++++---- docs/assembly.rst | 8 ++++---- docs/contracts.rst | 4 ++-- docs/contributing.rst | 6 +++--- docs/control-structures.rst | 2 +- docs/frequently-asked-questions.rst | 4 ++-- docs/miscellaneous.rst | 2 +- docs/solidity-by-example.rst | 4 ++-- docs/style-guide.rst | 10 +++++----- docs/units-and-global-variables.rst | 2 +- docs/yul.rst | 6 +++--- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst index 07596ec2..ab1650d8 100644 --- a/docs/abi-spec.rst +++ b/docs/abi-spec.rst @@ -279,13 +279,13 @@ All together, the encoding is (newline after function selector and each 32-bytes Let us apply the same principle to encode the data for a function with a signature ``g(uint[][],string[])`` with values ``([[1, 2], [3]], ["one", "two", "three"])`` but start from the most atomic parts of the encoding: -First we encode the length and data of the first embeded dynamic array ``[1, 2]`` of the first root array ``[[1, 2], [3]]``: +First we encode the length and data of the first embedded dynamic array ``[1, 2]`` of the first root array ``[[1, 2], [3]]``: - ``0x0000000000000000000000000000000000000000000000000000000000000002`` (number of elements in the first array, 2; the elements themselves are ``1`` and ``2``) - ``0x0000000000000000000000000000000000000000000000000000000000000001`` (first element) - ``0x0000000000000000000000000000000000000000000000000000000000000002`` (second element) -Then we encode the length and data of the second embeded dynamic array ``[3]`` of the first root array ``[[1, 2], [3]]``: +Then we encode the length and data of the second embedded dynamic array ``[3]`` of the first root array ``[[1, 2], [3]]``: - ``0x0000000000000000000000000000000000000000000000000000000000000001`` (number of elements in the second array, 1; the element is ``3``) - ``0x0000000000000000000000000000000000000000000000000000000000000003`` (first element) @@ -307,7 +307,7 @@ Offset ``a`` points to the start of the content of the array ``[1, 2]`` which is Offset ``b`` points to the start of the content of the array ``[3]`` which is line 5 (160 bytes); thus ``b = 0x00000000000000000000000000000000000000000000000000000000000000a0``. -Then we encode the embeded strings of the second root array: +Then we encode the embedded strings of the second root array: - ``0x0000000000000000000000000000000000000000000000000000000000000003`` (number of characters in word ``"one"``) - ``0x6f6e650000000000000000000000000000000000000000000000000000000000`` (utf8 representation of word ``"one"``) @@ -337,7 +337,7 @@ Offset ``d`` points to the start of the content of the string ``"two"`` which is Offset ``e`` points to the start of the content of the string ``"three"`` which is line 7 (224 bytes); thus ``e = 0x00000000000000000000000000000000000000000000000000000000000000e0``. -Note that the encodings of the embeded elements of the root arrays are not dependent on each other and have the same encodings for a fuction with a signature ``g(string[],uint[][])``. +Note that the encodings of the embedded elements of the root arrays are not dependent on each other and have the same encodings for a function with a signature ``g(string[],uint[][])``. Then we encode the length of the first root array: diff --git a/docs/assembly.rst b/docs/assembly.rst index 3bab289e..cf114c12 100644 --- a/docs/assembly.rst +++ b/docs/assembly.rst @@ -212,9 +212,9 @@ In the grammar, opcodes are represented as pre-defined identifiers. +-------------------------+-----+---+-----------------------------------------------------------------+ | sar(x, y) | | C | arithmetic shift right y by x bits | +-------------------------+-----+---+-----------------------------------------------------------------+ -| addmod(x, y, m) | | F | (x + y) % m with arbitrary precision arithmetics | +| addmod(x, y, m) | | F | (x + y) % m with arbitrary precision arithmetic | +-------------------------+-----+---+-----------------------------------------------------------------+ -| mulmod(x, y, m) | | F | (x * y) % m with arbitrary precision arithmetics | +| mulmod(x, y, m) | | F | (x * y) % m with arbitrary precision arithmetic | +-------------------------+-----+---+-----------------------------------------------------------------+ | signextend(i, x) | | F | sign extend from (i*8+7)th bit counting from least significant | +-------------------------+-----+---+-----------------------------------------------------------------+ @@ -228,9 +228,9 @@ In the grammar, opcodes are represented as pre-defined identifiers. +-------------------------+-----+---+-----------------------------------------------------------------+ | pop(x) | `-` | F | remove the element pushed by x | +-------------------------+-----+---+-----------------------------------------------------------------+ -| dup1 ... dup16 | | F | copy ith stack slot to the top (counting from top) | +| dup1 ... dup16 | | F | copy nth stack slot to the top (counting from top) | +-------------------------+-----+---+-----------------------------------------------------------------+ -| swap1 ... swap16 | `*` | F | swap topmost and ith stack slot below it | +| swap1 ... swap16 | `*` | F | swap topmost and nth stack slot below it | +-------------------------+-----+---+-----------------------------------------------------------------+ | mload(p) | | F | mem[p...(p+32)) | +-------------------------+-----+---+-----------------------------------------------------------------+ diff --git a/docs/contracts.rst b/docs/contracts.rst index 53e50656..a745bea8 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -20,7 +20,7 @@ Contracts can be created "from outside" via Ethereum transactions or from within IDEs, such as `Remix `_, make the creation process seamless using UI elements. -Creating contracts programatically on Ethereum is best done via using the JavaScript API `web3.js `_. +Creating contracts programmatically on Ethereum is best done via using the JavaScript API `web3.js `_. As of today it has a method called `web3.eth.Contract `_ to facilitate contract creation. @@ -1042,7 +1042,7 @@ constant and defines the behaviour 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 -inheritance list or in modifier-style in the derived constuctor. +inheritance list or in modifier-style in the derived constructor. Specifying arguments in both places is an error. If a derived contract doesn't specify the arguments to all of its base diff --git a/docs/contributing.rst b/docs/contributing.rst index 231cbdfc..ddc02883 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -110,13 +110,13 @@ Example: ``./test/libsolidity/syntaxTests/double_stateVariable_declaration.sol`` // ---- // DeclarationError: Identifier already declared. -A syntax test must contain at least the contract under test itself, followed by the seperator ``----``. The additional comments above are used to describe the +A syntax test must contain at least the contract under test itself, followed by the separator ``----``. The additional comments above are used to describe the expected compiler errors or warnings. This section can be empty in case that the contract should compile without any errors or warnings. In the above example, the state variable ``variable`` was declared twice, which is not allowed. This will result in a ``DeclarationError`` stating that the identifier was already declared. The tool that is being used for those tests is called ``isoltest`` and can be found under ``./test/tools/``. It is an interactive tool which allows -editing of failing contracts using your prefered text editor. Let's try to break this test by removing the second declaration of ``variable``: +editing of failing contracts using your preferred text editor. Let's try to break this test by removing the second declaration of ``variable``: :: @@ -237,7 +237,7 @@ Othwerise, upon execution the fuzzer will halt with an error saying binary is no Location : check_binary(), afl-fuzz.c:6920 -Next, you need some example source files. This will make it much easer for the fuzzer +Next, you need some example source files. This will make it much easier for the fuzzer to find errors. You can either copy some files from the syntax tests or extract test files from the documentation or the other tests: diff --git a/docs/control-structures.rst b/docs/control-structures.rst index 7beca65e..50c401e2 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -39,7 +39,7 @@ write:: pragma solidity ^0.4.16; contract Simple { - function arithmetics(uint _a, uint _b) + function arithmetic(uint _a, uint _b) public pure returns (uint o_sum, uint o_product) diff --git a/docs/frequently-asked-questions.rst b/docs/frequently-asked-questions.rst index 75693bdd..e64849ea 100644 --- a/docs/frequently-asked-questions.rst +++ b/docs/frequently-asked-questions.rst @@ -69,7 +69,7 @@ Can you return an array or a ``string`` from a solidity function call? Yes. See `array_receiver_and_returner.sol `_. What is problematic, though, is returning any variably-sized data (e.g. a -variably-sized array like ``uint[]``) from a fuction **called from within Solidity**. +variably-sized array like ``uint[]``) from a function **called from within Solidity**. This is a limitation of the EVM and will be solved with the next protocol update. Returning variably-sized data as part of an external transaction or call is fine. @@ -260,7 +260,7 @@ The third one is the stack, which is used to hold small local variables. It is almost free to use, but can only hold a limited amount of values. For almost all types, you cannot specify where they should be stored, because -they are copied everytime they are used. +they are copied every time they are used. The types where the so-called storage location is important are structs and arrays. If you e.g. pass such variables in function calls, their diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst index 1d5add9a..c0c7cb1b 100644 --- a/docs/miscellaneous.rst +++ b/docs/miscellaneous.rst @@ -319,7 +319,7 @@ Global Variables ================ - ``abi.encode(...) returns (bytes)``: :ref:`ABI `-encodes the given arguments -- ``abi.encodePacked(...) returns (bytes)``: Performes :ref:`packed encoding ` of the given arguments +- ``abi.encodePacked(...) returns (bytes)``: Performs :ref:`packed encoding ` of the given arguments - ``abi.encodeWithSelector(bytes4 selector, ...) returns (bytes)``: :ref:`ABI `-encodes the given arguments starting from the second and prepends the given four-byte selector - ``abi.encodeWithSignature(string signature, ...) returns (bytes)``: Equivalent to ``abi.encodeWithSelector(bytes4(keccak256(bytes(signature)), ...)``` diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst index 07cb76c9..b1985426 100644 --- a/docs/solidity-by-example.rst +++ b/docs/solidity-by-example.rst @@ -679,7 +679,7 @@ Creating the signature ---------------------- Alice does not need to interact with Ethereum network to -sign the transaction, the proccess is completely offline. +sign the transaction, the process is completely offline. In this tutorial, we will sign messages in the browser using ``web3.js`` and ``MetaMask``. In particular, we will use the standard way described in `EIP-762 `_, @@ -1034,7 +1034,7 @@ The full contract } /// if the timeout is reached without the recipient closing the channel, - /// then the Ether is realeased back to the sender. + /// then the Ether is released back to the sender. function clainTimeout() public { require(now >= expiration); selfdestruct(sender); diff --git a/docs/style-guide.rst b/docs/style-guide.rst index 8311e925..19e3aae5 100644 --- a/docs/style-guide.rst +++ b/docs/style-guide.rst @@ -188,8 +188,8 @@ Event Definitions and Event Emitters Yes:: event LongAndLotsOfArgs( - adress sender, - adress recipient, + address sender, + address recipient, uint256 publicKey, uint256 amount, bytes32[] options @@ -205,8 +205,8 @@ Yes:: No:: - event LongAndLotsOfArgs(adress sender, - adress recipient, + event LongAndLotsOfArgs(address sender, + address recipient, uint256 publicKey, uint256 amount, bytes32[] options); @@ -830,7 +830,7 @@ The naming recommendations given here are intended to improve the readability, and thus they are not rules, but rather guidelines to try and help convey the most information through the names of things. -Lastly, consistency within a codebase should always supercede any conventions +Lastly, consistency within a codebase should always supersede any conventions outlined in this document. diff --git a/docs/units-and-global-variables.rst b/docs/units-and-global-variables.rst index 455231cd..61ae51a8 100644 --- a/docs/units-and-global-variables.rst +++ b/docs/units-and-global-variables.rst @@ -100,7 +100,7 @@ ABI Encoding Functions ---------------------- - ``abi.encode(...) returns (bytes)``: ABI-encodes the given arguments -- ``abi.encodePacked(...) returns (bytes)``: Performes :ref:`packed encoding ` of the given arguments +- ``abi.encodePacked(...) returns (bytes)``: Performs :ref:`packed encoding ` of the given arguments - ``abi.encodeWithSelector(bytes4 selector, ...) returns (bytes)``: ABI-encodes the given arguments starting from the second and prepends the given four-byte selector - ``abi.encodeWithSignature(string signature, ...) returns (bytes)``: Equivalent to ``abi.encodeWithSelector(bytes4(keccak256(bytes(signature)), ...)``` diff --git a/docs/yul.rst b/docs/yul.rst index 4f5ef98f..87ec0c03 100644 --- a/docs/yul.rst +++ b/docs/yul.rst @@ -338,7 +338,7 @@ The following functions must be available: +---------------------------------------------+-----------------------------------------------------------------+ | xor(x:bool, y:bool) -> z:bool | xor | +---------------------------------------------+-----------------------------------------------------------------+ -| *Arithmetics* | +| *Arithmetic* | +---------------------------------------------+-----------------------------------------------------------------+ | addu256(x:u256, y:u256) -> z:u256 | x + y | +---------------------------------------------+-----------------------------------------------------------------+ @@ -358,9 +358,9 @@ The following functions must be available: +---------------------------------------------+-----------------------------------------------------------------+ | expu256(x:u256, y:u256) -> z:u256 | x to the power of y | +---------------------------------------------+-----------------------------------------------------------------+ -| addmodu256(x:u256, y:u256, m:u256) -> z:u256| (x + y) % m with arbitrary precision arithmetics | +| addmodu256(x:u256, y:u256, m:u256) -> z:u256| (x + y) % m with arbitrary precision arithmetic | +---------------------------------------------+-----------------------------------------------------------------+ -| mulmodu256(x:u256, y:u256, m:u256) -> z:u256| (x * y) % m with arbitrary precision arithmetics | +| mulmodu256(x:u256, y:u256, m:u256) -> z:u256| (x * y) % m with arbitrary precision arithmetic | +---------------------------------------------+-----------------------------------------------------------------+ | ltu256(x:u256, y:u256) -> z:bool | true if x < y, false otherwise | +---------------------------------------------+-----------------------------------------------------------------+ -- cgit From 4116704442aff035acb5b707c6b211ac1f5524fe Mon Sep 17 00:00:00 2001 From: Cryptomental Date: Tue, 10 Jul 2018 09:18:19 +0200 Subject: test: Fix typos. Fix typos using codespell. Refs: #4442 --- test/compilationTests/corion/ico.sol | 12 ++++---- test/compilationTests/corion/module.sol | 2 +- test/compilationTests/corion/moduleHandler.sol | 32 +++++++++++----------- test/compilationTests/corion/premium.sol | 2 +- test/compilationTests/corion/provider.sol | 24 ++++++++-------- test/compilationTests/corion/publisher.sol | 2 +- test/compilationTests/corion/schelling.sol | 8 +++--- .../milestonetracker/MilestoneTracker.sol | 2 +- test/compilationTests/zeppelin/Bounty.sol | 2 +- test/compilationTests/zeppelin/ReentrancyGuard.sol | 2 +- .../zeppelin/token/LimitedTransferToken.sol | 4 +-- .../zeppelin/token/MintableToken.sol | 2 +- .../zeppelin/token/SimpleToken.sol | 2 +- .../zeppelin/token/StandardToken.sol | 4 +-- .../zeppelin/token/VestedToken.sol | 14 +++++----- test/contracts/Wallet.cpp | 2 +- test/libsolidity/SolidityABIJSON.cpp | 2 +- test/libsolidity/SolidityEndToEndTest.cpp | 16 +++++------ test/libsolidity/SolidityExpressionCompiler.cpp | 4 +-- test/libsolidity/SolidityOptimizer.cpp | 2 +- test/libsolidity/ViewPureChecker.cpp | 2 +- .../412_early_exit_on_fatal_errors.sol | 4 +-- 22 files changed, 73 insertions(+), 73 deletions(-) diff --git a/test/compilationTests/corion/ico.sol b/test/compilationTests/corion/ico.sol index 80444395..7b27c201 100644 --- a/test/compilationTests/corion/ico.sol +++ b/test/compilationTests/corion/ico.sol @@ -277,7 +277,7 @@ contract ico is safeMath { function () external payable { /* - Callback function. Simply calls the buy function as a beneficiary and there is no affilate address. + Callback function. Simply calls the buy function as a beneficiary and there is no affiliate address. If they call the contract without any function then this process will be taken place. */ require( isICO() ); @@ -290,9 +290,9 @@ contract ico is safeMath { If there is not at least 0.2 ether balance on the beneficiaryAddress then the amount of the ether which was intended for the purchase will be reduced by 0.2 and that will be sent to the address of the beneficiary. From the remaining amount calculate the reward with the help of the getIcoReward function. - Only that affilate address is valid which has some token on it’s account. - If there is a valid affilate address then calculate and credit the reward as well in the following way: - With more than 1e12 token contract credit 5% reward based on the calculation that how many tokens did they buy when he was added as an affilate. + Only that affiliate address is valid which has some token on it’s account. + If there is a valid affiliate address then calculate and credit the reward as well in the following way: + With more than 1e12 token contract credit 5% reward based on the calculation that how many tokens did they buy when he was added as an affiliate. More than 1e11 token: 4% More than 1e10 token: 3% More than 1e9 token: 2% below 1% @@ -345,7 +345,7 @@ contract ico is safeMath { /* Crediting the premium token - @owner The corion token balance of this address will be set based on the calculation which shows that how many times can be the amount of the purchased tokens devided by 5000. So after each 5000 token we give 1 premium token. + @owner The corion token balance of this address will be set based on the calculation which shows that how many times can be the amount of the purchased tokens divided by 5000. So after each 5000 token we give 1 premium token. */ uint256 _reward = (brought[owner].cor / 5e9) - brought[owner].corp; if ( _reward > 0 ) { @@ -372,5 +372,5 @@ contract ico is safeMath { return startBlock <= block.number && block.number <= icoDelay && ( ! aborted ) && ( ! closed ); } - event EICO(address indexed Address, uint256 indexed value, address Affilate, uint256 AffilateValue); + event EICO(address indexed Address, uint256 indexed value, address Affiliate, uint256 AffilateValue); } diff --git a/test/compilationTests/corion/module.sol b/test/compilationTests/corion/module.sol index 362283ef..62f44af7 100644 --- a/test/compilationTests/corion/module.sol +++ b/test/compilationTests/corion/module.sol @@ -131,7 +131,7 @@ contract module { /* Check self for ready for functions or not. - @success Function call was successfull or not + @success Function call was successful or not @active Ready for functions or not */ return (true, moduleStatus == status.Connected && block.number >= disabledUntil); diff --git a/test/compilationTests/corion/moduleHandler.sol b/test/compilationTests/corion/moduleHandler.sol index 441f7fba..fddd2a29 100644 --- a/test/compilationTests/corion/moduleHandler.sol +++ b/test/compilationTests/corion/moduleHandler.sol @@ -63,7 +63,7 @@ contract moduleHandler is multiOwner, announcementTypes { function addModule(modules_s input, bool call) internal { /* Inside function for registration of the modules in the database. - If the call is false, wont happen any direct call. + If the call is false, won't happen any direct call. @input _Structure of module. @call Is connect to the module or not. @@ -88,7 +88,7 @@ contract moduleHandler is multiOwner, announcementTypes { @name Name of module. @addr Address of module. @found Is there any result. - @success Was the transaction succesfull or not. + @success Was the transaction successful or not. */ (bool _success, bool _found, uint256 _id) = getModuleIDByName(name); if ( _success && _found ) { return (true, true, modules[_id].addr); } @@ -204,7 +204,7 @@ contract moduleHandler is multiOwner, announcementTypes { Deleting module from the database. Can be called only by the Publisher contract. @name Name of module to delete. - @bool Was the function successfull? + @bool Was the function successful? @callCallback Call the replaceable module to confirm replacement or not. */ (bool _success, bool _found, uint256 _id) = getModuleIDByAddress(msg.sender); @@ -245,7 +245,7 @@ contract moduleHandler is multiOwner, announcementTypes { @from from who. @to to who. @value amount. - @bool Was the function successfull? + @bool Was the function successful? */ (bool _success, bool _found, uint256 _id) = getModuleIDByAddress(msg.sender); require( _success && _found && modules[_id].name == keccak256('Token') ); @@ -264,7 +264,7 @@ contract moduleHandler is multiOwner, announcementTypes { @roundID Number of Schelling round. @reward Coin emission in this Schelling round. - @bool Was the function successfull? + @bool Was the function successful? */ (bool _success, bool _found, uint256 _id) = getModuleIDByAddress(msg.sender); require( _success && _found && modules[_id].name == keccak256('Schelling') ); @@ -283,7 +283,7 @@ contract moduleHandler is multiOwner, announcementTypes { Every module will be informed about the ModuleHandler replacement. @newHandler Address of the new ModuleHandler. - @bool Was the function successfull? + @bool Was the function successful? */ (bool _success, bool _found, uint256 _id) = getModuleIDByAddress(msg.sender); require( _success ); @@ -304,7 +304,7 @@ contract moduleHandler is multiOwner, announcementTypes { @owner address @value balance. - @success was the function successfull? + @success was the function successful? */ (bool _success, bool _found, uint256 _id) = getModuleIDByName('Token'); require( _success && _found ); @@ -315,7 +315,7 @@ contract moduleHandler is multiOwner, announcementTypes { Query of the whole token amount. @value amount. - @success was the function successfull? + @success was the function successful? */ (bool _success, bool _found, uint256 _id) = getModuleIDByName('Token'); require( _success && _found ); @@ -326,7 +326,7 @@ contract moduleHandler is multiOwner, announcementTypes { Query of ICO state @ico Is ICO in progress?. - @success was the function successfull? + @success was the function successful? */ (bool _success, bool _found, uint256 _id) = getModuleIDByName('Token'); require( _success && _found ); @@ -337,7 +337,7 @@ contract moduleHandler is multiOwner, announcementTypes { Query of number of the actual Schelling round. @round Schelling round. - @success was the function successfull? + @success was the function successful? */ (bool _success, bool _found, uint256 _id) = getModuleIDByName('Schelling'); require( _success && _found ); @@ -350,7 +350,7 @@ contract moduleHandler is multiOwner, announcementTypes { @to Place of new token @value Token amount - @success Was the function successfull? + @success Was the function successful? */ (bool _success, bool _found, uint256 _id) = getModuleIDByAddress(msg.sender); require( _success && _found && modules[_id].name == keccak256('Provider') ); @@ -367,7 +367,7 @@ contract moduleHandler is multiOwner, announcementTypes { @to To who. @value Token amount. @fee Transaction fee will be charged or not? - @success Was the function successfull? + @success Was the function successful? */ (bool _success, bool _found, uint256 _id) = getModuleIDByAddress(msg.sender); require( _success && _found ); @@ -382,7 +382,7 @@ contract moduleHandler is multiOwner, announcementTypes { @from From who. @value Token amount. - @success Was the function successfull? + @success Was the function successful? */ (bool _success, bool _found, uint256 _id) = getModuleIDByAddress(msg.sender); require( _success && _found && modules[_id].name == keccak256('Provider') ); @@ -397,7 +397,7 @@ contract moduleHandler is multiOwner, announcementTypes { @from From who. @value Token amount. - @success Was the function successfull? + @success Was the function successful? */ (bool _success, bool _found, uint256 _id) = getModuleIDByAddress(msg.sender); require( _success && _found && modules[_id].name == keccak256('Schelling') ); @@ -413,7 +413,7 @@ contract moduleHandler is multiOwner, announcementTypes { @moduleName Module name which will be configured @aType Type of variable (announcementType). @value New value - @success Was the function successfull? + @success Was the function successful? */ (bool _success, bool _found, uint256 _id) = getModuleIDByAddress(msg.sender); require( _success ); @@ -431,7 +431,7 @@ contract moduleHandler is multiOwner, announcementTypes { function freezing(bool forever) external { /* Freezing CORION Platform. Can be called only by the owner. - Freez can not be recalled! + Freeze can not be recalled! @forever Is it forever or not? */ diff --git a/test/compilationTests/corion/premium.sol b/test/compilationTests/corion/premium.sol index 14f18ad2..e1f12ed0 100644 --- a/test/compilationTests/corion/premium.sol +++ b/test/compilationTests/corion/premium.sol @@ -118,7 +118,7 @@ contract premium is module, safeMath { @extraData Extra data to be received by the receiver @nonce Transaction count - @sucess Was the Function successful? + @success Was the Function successful? */ _approve(spender, amount, nonce); require( thirdPartyPContractAbstract(spender).approvedCorionPremiumToken(msg.sender, amount, extraData) ); diff --git a/test/compilationTests/corion/provider.sol b/test/compilationTests/corion/provider.sol index 83edcc01..35ade69f 100644 --- a/test/compilationTests/corion/provider.sol +++ b/test/compilationTests/corion/provider.sol @@ -18,7 +18,7 @@ contract provider is module, safeMath, announcementTypes { } function transferEvent(address from, address to, uint256 value) external returns (bool success) { /* - Transaction completed. This function is ony available for the modulehandler. + Transaction completed. This function is only available for the modulehandler. It should be checked if the sender or the acceptor does not connect to the provider or it is not a provider itself if so than the change should be recorded. @from From whom? @@ -35,7 +35,7 @@ contract provider is module, safeMath, announcementTypes { /* New schelling round. This function is only available for the moduleHandler. We are recording the new schelling round and we are storing the whole current quantity of the tokens. - We generate a reward quantity of tokens directed to the providers address. The collected interest will be tranfered from this contract. + We generate a reward quantity of tokens directed to the providers address. The collected interest will be transferred from this contract. @roundID Number of the schelling round. @reward token emission @@ -228,7 +228,7 @@ contract provider is module, safeMath, announcementTypes { @website Provider’s website @country Provider’s country @info Provider’s short introduction. - @rate Rate of the emission what is going to be transfered to the client by the provider. + @rate Rate of the emission what is going to be transferred to the client by the provider. @isForRent is for Rent or not? @admin The admin’s address */ @@ -328,7 +328,7 @@ contract provider is module, safeMath, announcementTypes { @addr Address of the provider @height Height - @rate The rate of the emission which will be transfered to the client. + @rate The rate of the emission which will be transferred to the client. @isForRent Rent or not. @clientsCount Number of the clients. @priv Private or not? @@ -356,7 +356,7 @@ contract provider is module, safeMath, announcementTypes { } function closeProvider() isReady external { /* - Closing and inactivate the provider. + Closing and deactivating the provider. It is only possible to close that active provider which is owned by the sender itself after calling the whole share of the emission. Whom were connected to the provider those clients will have to disconnect after they’ve called their share of emission which was not called before. */ @@ -373,7 +373,7 @@ contract provider is module, safeMath, announcementTypes { /* Permition of the user to be able to connect to the provider. This can only be invited by the provider’s admin. - With this kind of call only 100 address can be permited. + With this kind of call only 100 address can be permitted. @addr Array of the addresses for whom the connection is allowed. */ @@ -391,7 +391,7 @@ contract provider is module, safeMath, announcementTypes { /* Disable of the user not to be able to connect to the provider. It is can called only for the admin of the provider. - With this kind of call only 100 address can be permited. + With this kind of call only 100 address can be permitted. @addr Array of the addresses for whom the connection is allowed. */ @@ -411,7 +411,7 @@ contract provider is module, safeMath, announcementTypes { Providers can not connect to other providers. If is a client at any provider, then it is not possible to connect to other provider one. It is only possible to connect to valid and active providers. - If is an active provider then the client can only connect, if address is permited at the provider (Whitelist). + If is an active provider then the client can only connect, if address is permitted at the provider (Whitelist). At private providers, the number of the client is restricted. If it reaches the limit no further clients are allowed to connect. This process has a transaction fee based on the senders whole token quantity. @@ -487,12 +487,12 @@ contract provider is module, safeMath, announcementTypes { /* Polling the share from the token emission token emission for clients and for providers. - It is optionaly possible to give an address of a beneficiary for whom we can transfer the accumulated amount. In case we don’t enter any address then the amount will be transfered to the caller’s address. + It is optionally possible to give an address of a beneficiary for whom we can transfer the accumulated amount. In case we don’t enter any address then the amount will be transferred to the caller’s address. As the interest should be checked at each schelling round in order to get the share from that so to avoid the overflow of the gas the number of the check-rounds should be limited. - Opcionalisan megadhato az ellenorzes koreinek szama. It is possible to enter optionaly the number of the check-rounds. If it is 0 then it is automatic. + Opcionalisan megadhato az ellenorzes koreinek szama. It is possible to enter optionally the number of the check-rounds. If it is 0 then it is automatic. Provider variable should only be entered if the real owner of the provider is not the caller’s address. In case the client/provider was far behind then it is possible that this function should be called several times to check the total generated schelling rounds and to collect the share. - If is neighter a client nor a provider then the function is not available. + If is neither a client nor a provider then the function is not available. The tokens will be sent to the beneficiary from the address of the provider without any transaction fees. @beneficiary Address of the beneficiary @@ -784,7 +784,7 @@ contract provider is module, safeMath, announcementTypes { /* Inner function to check the ICO status. - @isICO Is the ICO in proccess or not? + @isICO Is the ICO in process or not? */ (bool _success, bool _isICO) = moduleHandler(moduleHandlerAddress).isICO(); require( _success ); diff --git a/test/compilationTests/corion/publisher.sol b/test/compilationTests/corion/publisher.sol index 3a332706..44bc5964 100644 --- a/test/compilationTests/corion/publisher.sol +++ b/test/compilationTests/corion/publisher.sol @@ -264,7 +264,7 @@ contract publisher is announcementTypes, module, safeMath { function checkICO() internal returns (bool isICO) { /* Inner function to check the ICO status. - @bool Is the ICO in proccess or not? + @bool Is the ICO in process or not? */ (bool _success, bool _isICO) = moduleHandler(moduleHandlerAddress).isICO(); require( _success ); diff --git a/test/compilationTests/corion/schelling.sol b/test/compilationTests/corion/schelling.sol index 0f84239d..b8beaa3a 100644 --- a/test/compilationTests/corion/schelling.sol +++ b/test/compilationTests/corion/schelling.sol @@ -147,7 +147,7 @@ contract schelling is module, announcementTypes, schellingVars { @from From who @to To who @value Amount - @bool Was the transaction succesfull? + @bool Was the transaction successful? */ require( super.isModuleHandler(msg.sender) ); if ( to == address(this) ) { @@ -442,14 +442,14 @@ contract schelling is module, announcementTypes, schellingVars { if ( ! round.voted ) { newRound.reward = round.reward; } - uint256 aboves; + uint256 above; for ( uint256 a=currentRound ; a>=currentRound-interestCheckRounds ; a-- ) { if (a == 0) { break; } prevRound = getRound(a); - if ( prevRound.totalAboveWeight > prevRound.totalBelowWeight ) { aboves++; } + if ( prevRound.totalAboveWeight > prevRound.totalBelowWeight ) { above++; } } uint256 expansion; - if ( aboves >= interestCheckAboves ) { + if ( above >= interestCheckAboves ) { expansion = getTotalSupply() * interestRate / interestRateM / 100; } diff --git a/test/compilationTests/milestonetracker/MilestoneTracker.sol b/test/compilationTests/milestonetracker/MilestoneTracker.sol index 545acb0a..fc7008cd 100644 --- a/test/compilationTests/milestonetracker/MilestoneTracker.sol +++ b/test/compilationTests/milestonetracker/MilestoneTracker.sol @@ -22,7 +22,7 @@ pragma solidity ^0.4.6; /// @dev This contract tracks the -/// is rules the relation betwen a donor and a recipient +/// is rules the relation between a donor and a recipient /// in order to guaranty to the donor that the job will be done and to guaranty /// to the recipient that he will be paid diff --git a/test/compilationTests/zeppelin/Bounty.sol b/test/compilationTests/zeppelin/Bounty.sol index 6341610b..5b2124ca 100644 --- a/test/compilationTests/zeppelin/Bounty.sol +++ b/test/compilationTests/zeppelin/Bounty.sol @@ -16,7 +16,7 @@ contract Bounty is PullPayment, Destructible { event TargetCreated(address createdAddress); /** - * @dev Fallback function allowing the contract to recieve funds, if they haven't already been claimed. + * @dev Fallback function allowing the contract to receive funds, if they haven't already been claimed. */ function() external payable { if (claimed) { diff --git a/test/compilationTests/zeppelin/ReentrancyGuard.sol b/test/compilationTests/zeppelin/ReentrancyGuard.sol index ca8b643b..60c7927b 100644 --- a/test/compilationTests/zeppelin/ReentrancyGuard.sol +++ b/test/compilationTests/zeppelin/ReentrancyGuard.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.11; /** - * @title Helps contracts guard agains rentrancy attacks. + * @title Helps contracts guard against rentrancy attacks. * @author Remco Bloemen * @notice If you mark a function `nonReentrant`, you should also * mark it `external`. diff --git a/test/compilationTests/zeppelin/token/LimitedTransferToken.sol b/test/compilationTests/zeppelin/token/LimitedTransferToken.sol index 5a056f78..052c28e6 100644 --- a/test/compilationTests/zeppelin/token/LimitedTransferToken.sol +++ b/test/compilationTests/zeppelin/token/LimitedTransferToken.sol @@ -29,7 +29,7 @@ contract LimitedTransferToken is ERC20 { /** * @dev Checks modifier and allows transfer if tokens are not locked. - * @param _to The address that will recieve the tokens. + * @param _to The address that will receive the tokens. * @param _value The amount of tokens to be transferred. */ function transfer(address _to, uint256 _value) canTransfer(msg.sender, _value) public { @@ -39,7 +39,7 @@ contract LimitedTransferToken is ERC20 { /** * @dev Checks modifier and allows transfer if tokens are not locked. * @param _from The address that will send the tokens. - * @param _to The address that will recieve the tokens. + * @param _to The address that will receive the tokens. * @param _value The amount of tokens to be transferred. */ function transferFrom(address _from, address _to, uint256 _value) public canTransfer(_from, _value) { diff --git a/test/compilationTests/zeppelin/token/MintableToken.sol b/test/compilationTests/zeppelin/token/MintableToken.sol index 4c4787e3..f99964d0 100644 --- a/test/compilationTests/zeppelin/token/MintableToken.sol +++ b/test/compilationTests/zeppelin/token/MintableToken.sol @@ -27,7 +27,7 @@ contract MintableToken is StandardToken, Ownable { /** * @dev Function to mint tokens - * @param _to The address that will recieve the minted tokens. + * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ diff --git a/test/compilationTests/zeppelin/token/SimpleToken.sol b/test/compilationTests/zeppelin/token/SimpleToken.sol index d0232bca..6c3f5740 100644 --- a/test/compilationTests/zeppelin/token/SimpleToken.sol +++ b/test/compilationTests/zeppelin/token/SimpleToken.sol @@ -18,7 +18,7 @@ contract SimpleToken is StandardToken { uint256 public INITIAL_SUPPLY = 10000; /** - * @dev Contructor that gives msg.sender all of existing tokens. + * @dev Constructor that gives msg.sender all of existing tokens. */ constructor() public { totalSupply = INITIAL_SUPPLY; diff --git a/test/compilationTests/zeppelin/token/StandardToken.sol b/test/compilationTests/zeppelin/token/StandardToken.sol index a55d961c..94b12e57 100644 --- a/test/compilationTests/zeppelin/token/StandardToken.sol +++ b/test/compilationTests/zeppelin/token/StandardToken.sol @@ -21,7 +21,7 @@ contract StandardToken is ERC20, BasicToken { * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to - * @param _value uint256 the amout of tokens to be transfered + * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public { uint256 _allowance = allowed[_from][msg.sender]; @@ -56,7 +56,7 @@ contract StandardToken is ERC20, BasicToken { * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. - * @return A uint256 specifing the amount of tokens still avaible for the spender. + * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowed[_owner][_spender]; diff --git a/test/compilationTests/zeppelin/token/VestedToken.sol b/test/compilationTests/zeppelin/token/VestedToken.sol index 17141bdf..893a51db 100644 --- a/test/compilationTests/zeppelin/token/VestedToken.sol +++ b/test/compilationTests/zeppelin/token/VestedToken.sol @@ -69,7 +69,7 @@ contract VestedToken is StandardToken, LimitedTransferToken { } /** - * @dev Revoke the grant of tokens of a specifed address. + * @dev Revoke the grant of tokens of a specified address. * @param _holder The address which will have its tokens revoked. * @param _grantId The id of the token grant. */ @@ -135,13 +135,13 @@ contract VestedToken is StandardToken, LimitedTransferToken { } /** - * @dev Calculate amount of vested tokens at a specifc time. - * @param tokens uint256 The amount of tokens grantted. + * @dev Calculate amount of vested tokens at a specific time. + * @param tokens uint256 The amount of tokens granted. * @param time uint64 The time to be checked - * @param start uint64 A time representing the begining of the grant + * @param start uint64 A time representing the beginning of the grant * @param cliff uint64 The cliff period. * @param vesting uint64 The vesting period. - * @return An uint256 representing the amount of vested tokensof a specif grant. + * @return An uint256 representing the amount of vested tokens of a specific grant. * transferableTokens * | _/-------- vestedTokens rect * | _/ @@ -186,7 +186,7 @@ contract VestedToken is StandardToken, LimitedTransferToken { } /** - * @dev Get all information about a specifc grant. + * @dev Get all information about a specific grant. * @param _holder The address which will have its tokens revoked. * @param _grantId The id of the token grant. * @return Returns all the values that represent a TokenGrant(address, value, start, cliff, @@ -226,7 +226,7 @@ contract VestedToken is StandardToken, LimitedTransferToken { * @dev Calculate the amount of non vested tokens at a specific time. * @param grant TokenGrant The grant to be checked. * @param time uint64 The time to be checked - * @return An uint256 representing the amount of non vested tokens of a specifc grant on the + * @return An uint256 representing the amount of non vested tokens of a specific grant on the * passed time frame. */ function nonVestedTokens(TokenGrant grant, uint64 time) private view returns (uint256) { diff --git a/test/contracts/Wallet.cpp b/test/contracts/Wallet.cpp index fb104300..b3a096a3 100644 --- a/test/contracts/Wallet.cpp +++ b/test/contracts/Wallet.cpp @@ -385,7 +385,7 @@ contract Wallet is multisig, multiowned, daylimit { emit Deposit(msg.sender, msg.value); } - // Outside-visible transact entry point. Executes transacion immediately if below daily spend limit. + // Outside-visible transact entry point. Executes transaction immediately if below daily spend limit. // If not, goes into multisig process. We provide a hash on return to allow the sender to provide // shortcuts for the other confirmations (allowing them to avoid replicating the _to, _value // and _data arguments). They still get the option of using them if they want, anyways. diff --git a/test/libsolidity/SolidityABIJSON.cpp b/test/libsolidity/SolidityABIJSON.cpp index c366e866..736b0b33 100644 --- a/test/libsolidity/SolidityABIJSON.cpp +++ b/test/libsolidity/SolidityABIJSON.cpp @@ -199,7 +199,7 @@ BOOST_AUTO_TEST_CASE(multiple_params) BOOST_AUTO_TEST_CASE(multiple_methods_order) { - // methods are expected to be in alpabetical order + // methods are expected to be in alphabetical order char const* sourceCode = R"( contract test { function f(uint a) public returns (uint d) { return a * 7; } diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 822b8192..c6c11df5 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -6387,9 +6387,9 @@ BOOST_AUTO_TEST_CASE(return_multiple_strings_of_various_sizes) "ABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZ" "ABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZ" ); - vector lengthes{0, 30, 32, 63, 64, 65, 210, 300}; - for (auto l1: lengthes) - for (auto l2: lengthes) + vector lengths{0, 30, 32, 63, 64, 65, 210, 300}; + for (auto l1: lengths) + for (auto l2: lengths) { bytes dyn1 = encodeArgs(u256(l1), s1.substr(0, l1)); bytes dyn2 = encodeArgs(u256(l2), s2.substr(0, l2)); @@ -6456,9 +6456,9 @@ BOOST_AUTO_TEST_CASE(bytes_in_function_calls) compileAndRun(sourceCode, 0, "Main"); string s1("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"); string s2("ABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZ"); - vector lengthes{0, 31, 64, 65}; - for (auto l1: lengthes) - for (auto l2: lengthes) + vector lengths{0, 31, 64, 65}; + for (auto l1: lengths) + for (auto l2: lengths) { bytes dyn1 = encodeArgs(u256(l1), s1.substr(0, l1)); bytes dyn2 = encodeArgs(u256(l2), s2.substr(0, l2)); @@ -6497,8 +6497,8 @@ BOOST_AUTO_TEST_CASE(return_bytes_internal) )"; compileAndRun(sourceCode, 0, "Main"); string s1("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"); - vector lengthes{0, 31, 64, 65}; - for (auto l1: lengthes) + vector lengths{0, 31, 64, 65}; + for (auto l1: lengths) { bytes dyn1 = encodeArgs(u256(l1), s1.substr(0, l1)); bytes args1 = encodeArgs(u256(0x20)) + dyn1; diff --git a/test/libsolidity/SolidityExpressionCompiler.cpp b/test/libsolidity/SolidityExpressionCompiler.cpp index 949045ea..26b7914f 100644 --- a/test/libsolidity/SolidityExpressionCompiler.cpp +++ b/test/libsolidity/SolidityExpressionCompiler.cpp @@ -77,7 +77,7 @@ Declaration const& resolveDeclaration( ) { ASTNode const* scope = &_sourceUnit; - // bracers are required, cause msvc couldnt handle this macro in for statement + // bracers are required, cause msvc couldn't handle this macro in for statement for (string const& namePart: _namespacedName) { auto declarations = _resolver.resolveName(namePart, scope); @@ -319,7 +319,7 @@ BOOST_AUTO_TEST_CASE(short_circuiting) BOOST_CHECK_EQUAL_COLLECTIONS(code.begin(), code.end(), expectation.begin(), expectation.end()); } -BOOST_AUTO_TEST_CASE(arithmetics) +BOOST_AUTO_TEST_CASE(arithmetic) { char const* sourceCode = R"( contract test { diff --git a/test/libsolidity/SolidityOptimizer.cpp b/test/libsolidity/SolidityOptimizer.cpp index d375beff..a144068d 100644 --- a/test/libsolidity/SolidityOptimizer.cpp +++ b/test/libsolidity/SolidityOptimizer.cpp @@ -104,7 +104,7 @@ public: "\nOptimized: " + toHex(optimizedOutput)); } - /// @returns the number of intructions in the given bytecode, not taking the metadata hash + /// @returns the number of instructions in the given bytecode, not taking the metadata hash /// into account. size_t numInstructions(bytes const& _bytecode, boost::optional _which = boost::optional{}) { diff --git a/test/libsolidity/ViewPureChecker.cpp b/test/libsolidity/ViewPureChecker.cpp index bb5480b2..299cd084 100644 --- a/test/libsolidity/ViewPureChecker.cpp +++ b/test/libsolidity/ViewPureChecker.cpp @@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(environment_access) "this", "address(1).balance" }; - // ``block.blockhash`` and ``blockhash`` are tested seperately below because their usage will + // ``block.blockhash`` and ``blockhash`` are tested separately below because their usage will // produce warnings that can't be handled in a generic way. vector pure{ "msg.data", diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/412_early_exit_on_fatal_errors.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/412_early_exit_on_fatal_errors.sol index 8e5d81e2..56fc4051 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/412_early_exit_on_fatal_errors.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/412_early_exit_on_fatal_errors.sol @@ -1,4 +1,4 @@ -// This tests a crash that occured because we did not stop for fatal errors. +// This tests a crash that occurred because we did not stop for fatal errors. contract C { struct S { ftring a; @@ -8,4 +8,4 @@ contract C { } } // ---- -// DeclarationError: (113-119): Identifier not found or not unique. +// DeclarationError: (114-120): Identifier not found or not unique. -- cgit From 140dbfdbd8f4319d1d02339feea0a8636a3738e5 Mon Sep 17 00:00:00 2001 From: Cryptomental Date: Tue, 10 Jul 2018 09:18:59 +0200 Subject: Code, Changelog, ReleaseChecklist: Fix typos. Refs: #4442 --- Changelog.md | 2 +- ReleaseChecklist.md | 2 +- cmake/EthCompilerSettings.cmake | 2 +- libevmasm/ControlFlowGraph.h | 2 +- libevmasm/LinkerObject.cpp | 2 +- libevmasm/RuleList.h | 2 +- libevmasm/SimplificationRules.cpp | 2 +- libjulia/backends/evm/AbstractAssembly.h | 2 +- libjulia/backends/evm/EVMAssembly.h | 2 +- libjulia/optimiser/DataFlowAnalyzer.h | 2 +- libjulia/optimiser/SimplificationRules.cpp | 2 +- libsolidity/analysis/TypeChecker.cpp | 2 +- libsolidity/analysis/TypeChecker.h | 2 +- libsolidity/ast/AST.h | 6 +++--- libsolidity/ast/Types.cpp | 2 +- libsolidity/ast/Types.h | 2 +- libsolidity/codegen/ABIFunctions.h | 2 +- libsolidity/codegen/CompilerUtils.cpp | 4 ++-- libsolidity/codegen/ExpressionCompiler.cpp | 4 ++-- libsolidity/formal/SMTChecker.cpp | 2 +- libsolidity/interface/AssemblyStack.cpp | 2 +- libsolidity/interface/CompilerStack.h | 2 +- libsolidity/interface/Natspec.h | 2 +- libsolidity/interface/StandardCompiler.h | 2 +- libsolidity/parsing/Scanner.h | 2 +- solc/CommandLineInterface.cpp | 2 +- 26 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Changelog.md b/Changelog.md index bdbf85fb..e1dd14ed 100644 --- a/Changelog.md +++ b/Changelog.md @@ -708,7 +708,7 @@ Bugfixes: * Conditional: `x ? y : z` * Bugfix: Fixed several bugs where the optimizer generated invalid code. * Bugfix: Enums and structs were not accessible to other contracts. - * Bugfix: Fixed segfault connected to function paramater types, appeared during gas estimation. + * Bugfix: Fixed segfault connected to function parameter types, appeared during gas estimation. * Bugfix: Type checker crash for wrong number of base constructor parameters. * Bugfix: Allow function overloads with different array types. * Bugfix: Allow assignments of type `(x) = 7`. diff --git a/ReleaseChecklist.md b/ReleaseChecklist.md index ebdb7539..b84ae4c4 100644 --- a/ReleaseChecklist.md +++ b/ReleaseChecklist.md @@ -8,7 +8,7 @@ Checklist for making a release: - [ ] Make a final check that there are no platform-dependency issues in the ``solc-test-bytecode`` repository. - [ ] Wait for the tests for the commit on ``release``, create a release in Github, creating the tag. - [ ] Thank voluntary contributors in the Github release page (use ``git shortlog -s -n -e origin/release..origin/develop``). - - [ ] Wait for the CI runs on the tag itself (they should push artefacts onto the Github release page). + - [ ] Wait for the CI runs on the tag itself (they should push artifacts onto the Github release page). - [ ] Run ``scripts/release_ppa.sh release`` to create the PPA release (you need the relevant openssl key). - [ ] Check that the Docker release was pushed to Docker Hub (this still seems to have problems, run ``./scripts/docker_deploy_manual.sh release``). - [ ] Update the homebrew realease in https://github.com/ethereum/homebrew-ethereum/blob/master/solidity.rb (version and hash) diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake index 3ae5bf2a..468a8593 100644 --- a/cmake/EthCompilerSettings.cmake +++ b/cmake/EthCompilerSettings.cmake @@ -90,7 +90,7 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA if (EMSCRIPTEN) # Do not emit a separate memory initialiser file set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --memory-init-file 0") - # Leave only exported symbols as public and agressively remove others + # Leave only exported symbols as public and aggressively remove others set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -ffunction-sections -Wl,--gc-sections -fvisibility=hidden") # Optimisation level set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") diff --git a/libevmasm/ControlFlowGraph.h b/libevmasm/ControlFlowGraph.h index ebef543f..f0c9356c 100644 --- a/libevmasm/ControlFlowGraph.h +++ b/libevmasm/ControlFlowGraph.h @@ -39,7 +39,7 @@ using KnownStatePointer = std::shared_ptr; /** * Identifier for a block, coincides with the tag number of an AssemblyItem but adds a special - * ID for the inital block. + * ID for the initial block. */ class BlockId { diff --git a/libevmasm/LinkerObject.cpp b/libevmasm/LinkerObject.cpp index 8b7d9e06..1d5efecb 100644 --- a/libevmasm/LinkerObject.cpp +++ b/libevmasm/LinkerObject.cpp @@ -68,7 +68,7 @@ LinkerObject::matchLibrary( if (it != _libraryAddresses.end()) return &it->second; // If the user did not supply a fully qualified library name, - // try to match only the simple libary name + // try to match only the simple library name size_t colon = _linkRefName.find(':'); if (colon == string::npos) return nullptr; diff --git a/libevmasm/RuleList.h b/libevmasm/RuleList.h index 2b7da01b..7a2bc484 100644 --- a/libevmasm/RuleList.h +++ b/libevmasm/RuleList.h @@ -59,7 +59,7 @@ std::vector> simplificationRuleList( { std::vector> rules; rules += std::vector>{ - // arithmetics on constants + // arithmetic on constants {{Instruction::ADD, {A, B}}, [=]{ return A.d() + B.d(); }, false}, {{Instruction::MUL, {A, B}}, [=]{ return A.d() * B.d(); }, false}, {{Instruction::SUB, {A, B}}, [=]{ return A.d() - B.d(); }, false}, diff --git a/libevmasm/SimplificationRules.cpp b/libevmasm/SimplificationRules.cpp index 53a5f9fc..504dbc24 100644 --- a/libevmasm/SimplificationRules.cpp +++ b/libevmasm/SimplificationRules.cpp @@ -67,7 +67,7 @@ void Rules::addRule(SimplificationRule const& _rule) Rules::Rules() { - // Multiple occurences of one of these inside one rule must match the same equivalence class. + // Multiple occurrences of one of these inside one rule must match the same equivalence class. // Constants. Pattern A(Push); Pattern B(Push); diff --git a/libjulia/backends/evm/AbstractAssembly.h b/libjulia/backends/evm/AbstractAssembly.h index 46fa7796..6b1b5c23 100644 --- a/libjulia/backends/evm/AbstractAssembly.h +++ b/libjulia/backends/evm/AbstractAssembly.h @@ -68,7 +68,7 @@ public: virtual LabelID newLabelId() = 0; /// Returns a label identified by the given name. Creates it if it does not yet exist. virtual LabelID namedLabel(std::string const& _name) = 0; - /// Append a reference to a to-be-linked symobl. + /// Append a reference to a to-be-linked symbol. /// Currently, we assume that the value is always a 20 byte number. virtual void appendLinkerSymbol(std::string const& _name) = 0; diff --git a/libjulia/backends/evm/EVMAssembly.h b/libjulia/backends/evm/EVMAssembly.h index 593cee6a..56ae7655 100644 --- a/libjulia/backends/evm/EVMAssembly.h +++ b/libjulia/backends/evm/EVMAssembly.h @@ -54,7 +54,7 @@ public: virtual LabelID newLabelId() override; /// Returns a label identified by the given name. Creates it if it does not yet exist. virtual LabelID namedLabel(std::string const& _name) override; - /// Append a reference to a to-be-linked symobl. + /// Append a reference to a to-be-linked symbol. /// Currently, we assume that the value is always a 20 byte number. virtual void appendLinkerSymbol(std::string const& _name) override; diff --git a/libjulia/optimiser/DataFlowAnalyzer.h b/libjulia/optimiser/DataFlowAnalyzer.h index 4cb3d4cd..66df2f48 100644 --- a/libjulia/optimiser/DataFlowAnalyzer.h +++ b/libjulia/optimiser/DataFlowAnalyzer.h @@ -56,7 +56,7 @@ protected: /// Registers the assignment. void handleAssignment(std::set const& _names, Expression* _value); - /// Clears information about the valuse assigned to the given variables, + /// Clears information about the values assigned to the given variables, /// for example at points where control flow is merged. void clearValues(std::set const& _names); diff --git a/libjulia/optimiser/SimplificationRules.cpp b/libjulia/optimiser/SimplificationRules.cpp index 070d5484..a5e296c3 100644 --- a/libjulia/optimiser/SimplificationRules.cpp +++ b/libjulia/optimiser/SimplificationRules.cpp @@ -64,7 +64,7 @@ void SimplificationRules::addRule(SimplificationRule const& _rule) SimplificationRules::SimplificationRules() { - // Multiple occurences of one of these inside one rule must match the same equivalence class. + // Multiple occurrences of one of these inside one rule must match the same equivalence class. // Constants. Pattern A(PatternKind::Constant); Pattern B(PatternKind::Constant); diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 78536664..d181462e 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -448,7 +448,7 @@ void TypeChecker::overrideError(FunctionDefinition const& function, FunctionDefi { m_errorReporter.typeError( function.location(), - SecondarySourceLocation().append("Overriden function is here:", super.location()), + SecondarySourceLocation().append("Overridden function is here:", super.location()), message ); } diff --git a/libsolidity/analysis/TypeChecker.h b/libsolidity/analysis/TypeChecker.h index 2245abd6..8dc6b376 100644 --- a/libsolidity/analysis/TypeChecker.h +++ b/libsolidity/analysis/TypeChecker.h @@ -68,7 +68,7 @@ private: void checkContractDuplicateFunctions(ContractDefinition const& _contract); void checkContractDuplicateEvents(ContractDefinition const& _contract); void checkContractIllegalOverrides(ContractDefinition const& _contract); - /// Reports a type error with an appropiate message if overriden function signature differs. + /// Reports a type error with an appropriate message if overridden function signature differs. /// Also stores the direct super function in the AST annotations. void checkFunctionOverride(FunctionDefinition const& function, FunctionDefinition const& super); void overrideError(FunctionDefinition const& function, FunctionDefinition const& super, std::string message); diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h index 9906fa68..e862fd62 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -1169,11 +1169,11 @@ public: Statement const& body() const { return *m_body; } private: - /// For statement's initialization expresion. for(XXX; ; ). Can be empty + /// For statement's initialization expression. for(XXX; ; ). Can be empty ASTPointer m_initExpression; - /// For statement's condition expresion. for(; XXX ; ). Can be empty + /// For statement's condition expression. for(; XXX ; ). Can be empty ASTPointer m_condExpression; - /// For statement's loop expresion. for(;;XXX). Can be empty + /// For statement's loop expression. for(;;XXX). Can be empty ASTPointer m_loopExpression; /// The body of the loop ASTPointer m_body; diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 23614e58..0a4f199d 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -949,7 +949,7 @@ TypePointer RationalNumberType::binaryOperatorResult(Token::Value _operator, Typ RationalNumberType const& other = dynamic_cast(*_other); if (Token::isCompareOp(_operator)) { - // Since we do not have a "BoolConstantType", we have to do the acutal comparison + // Since we do not have a "BoolConstantType", we have to do the actual comparison // at runtime and convert to mobile typse first. Such a comparison is not a very common // use-case and will be optimized away. TypePointer thisMobile = mobileType(); diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h index 4415fb4b..135f4a0e 100644 --- a/libsolidity/ast/Types.h +++ b/libsolidity/ast/Types.h @@ -1031,7 +1031,7 @@ public: /// @param _selfType if the function is bound, this has to be supplied and is the type of the /// expression the function is called on. bool canTakeArguments(TypePointers const& _arguments, TypePointer const& _selfType = TypePointer()) const; - /// @returns true if the types of parameters are equal (does't check return parameter types) + /// @returns true if the types of parameters are equal (doesn't check return parameter types) bool hasEqualArgumentTypes(FunctionType const& _other) const; /// @returns true if the ABI is used for this call (only meaningful for external calls) diff --git a/libsolidity/codegen/ABIFunctions.h b/libsolidity/codegen/ABIFunctions.h index 6bfb3f15..3caaa1d9 100644 --- a/libsolidity/codegen/ABIFunctions.h +++ b/libsolidity/codegen/ABIFunctions.h @@ -203,7 +203,7 @@ private: std::string arrayLengthFunction(ArrayType const& _type); /// @returns the name of a function that computes the number of bytes required /// to store an array in memory given its length (internally encoded, not ABI encoded). - /// The function reverts for too large lengthes. + /// The function reverts for too large lengths. std::string arrayAllocationSizeFunction(ArrayType const& _type); /// @returns the name of a function that converts a storage slot number /// or a memory pointer to the slot number / memory pointer for the data position of an array diff --git a/libsolidity/codegen/CompilerUtils.cpp b/libsolidity/codegen/CompilerUtils.cpp index 2f45765a..2e335ca5 100644 --- a/libsolidity/codegen/CompilerUtils.cpp +++ b/libsolidity/codegen/CompilerUtils.cpp @@ -363,8 +363,8 @@ void CompilerUtils::encodeToMemory( // Stack during operation: // ... ... - // The values dyn_head_i are added during the first loop and they point to the head part - // of the ith dynamic parameter, which is filled once the dynamic parts are processed. + // The values dyn_head_n are added during the first loop and they point to the head part + // of the nth dynamic parameter, which is filled once the dynamic parts are processed. // store memory start pointer m_context << Instruction::DUP1; diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index 2e548e32..483faae4 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -1751,7 +1751,7 @@ void ExpressionCompiler::appendShiftOperatorCode(Token::Value _operator, Type co { if (c_valueSigned) // In the following assembly snippet, xor_mask will be zero, if value_to_shift is positive. - // Therefor xor'ing with xor_mask is the identity and the computation reduces to + // Therefore xor'ing with xor_mask is the identity and the computation reduces to // div(value_to_shift, exp(2, shift_amount)), which is correct, since for positive values // arithmetic right shift is dividing by a power of two (which, as a bitwise operation, results // in discarding bits on the right and filling with zeros from the left). @@ -1879,7 +1879,7 @@ void ExpressionCompiler::appendExternalFunctionCall( { m_context << u256(0); utils().fetchFreeMemoryPointer(); - // This touches too much, but that way we save some rounding arithmetics + // This touches too much, but that way we save some rounding arithmetic m_context << u256(retSize) << Instruction::ADD << Instruction::MSTORE; } } diff --git a/libsolidity/formal/SMTChecker.cpp b/libsolidity/formal/SMTChecker.cpp index a4d9500b..e2a51267 100644 --- a/libsolidity/formal/SMTChecker.cpp +++ b/libsolidity/formal/SMTChecker.cpp @@ -95,7 +95,7 @@ bool SMTChecker::visit(FunctionDefinition const& _function) void SMTChecker::endVisit(FunctionDefinition const&) { - // TOOD we could check for "reachability", i.e. satisfiability here. + // TODO we could check for "reachability", i.e. satisfiability here. // We only handle local variables, so we clear at the beginning of the function. // If we add storage variables, those should be cleared differently. removeLocalVariables(); diff --git a/libsolidity/interface/AssemblyStack.cpp b/libsolidity/interface/AssemblyStack.cpp index a4b0265e..46fa1d6b 100644 --- a/libsolidity/interface/AssemblyStack.cpp +++ b/libsolidity/interface/AssemblyStack.cpp @@ -119,7 +119,7 @@ MachineAssemblyObject AssemblyStack::assemble(Machine _machine) const julia::EVMAssembly assembly(true); julia::CodeTransform(assembly, *m_analysisInfo, m_language == Language::Yul, true)(*m_parserResult); object.bytecode = make_shared(assembly.finalize()); - /// TOOD: fill out text representation + /// TODO: fill out text representation return object; } case Machine::eWasm: diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h index 4359c3fa..0578ac86 100644 --- a/libsolidity/interface/CompilerStack.h +++ b/libsolidity/interface/CompilerStack.h @@ -93,7 +93,7 @@ public: m_errorList(), m_errorReporter(m_errorList) {} - /// @returns the list of errors that occured during parsing and type checking. + /// @returns the list of errors that occurred during parsing and type checking. ErrorList const& errors() const { return m_errorReporter.errors(); } /// @returns the current state. diff --git a/libsolidity/interface/Natspec.h b/libsolidity/interface/Natspec.h index 0701f821..6a827d3b 100644 --- a/libsolidity/interface/Natspec.h +++ b/libsolidity/interface/Natspec.h @@ -45,7 +45,7 @@ public: /// @param _contractDef The contract definition /// @return A JSON representation of the contract's user documentation static Json::Value userDocumentation(ContractDefinition const& _contractDef); - /// Genereates the Developer's documentation of the contract + /// Generates the Developer's documentation of the contract /// @param _contractDef The contract definition /// @return A JSON representation /// of the contract's developer documentation diff --git a/libsolidity/interface/StandardCompiler.h b/libsolidity/interface/StandardCompiler.h index 11a0b4c2..2772394a 100644 --- a/libsolidity/interface/StandardCompiler.h +++ b/libsolidity/interface/StandardCompiler.h @@ -31,7 +31,7 @@ namespace solidity { /** - * Standard JSON compiler interface, which expects a JSON input and returns a JSON ouput. + * Standard JSON compiler interface, which expects a JSON input and returns a JSON output. * See docs/using-the-compiler#compiler-input-and-output-json-description. */ class StandardCompiler: boost::noncopyable diff --git a/libsolidity/parsing/Scanner.h b/libsolidity/parsing/Scanner.h index 0adaa6fd..8a3011eb 100644 --- a/libsolidity/parsing/Scanner.h +++ b/libsolidity/parsing/Scanner.h @@ -223,7 +223,7 @@ private: bool isSourcePastEndOfInput() const { return m_source.isPastEndOfInput(); } TokenDesc m_skippedComment; // desc for current skipped comment - TokenDesc m_nextSkippedComment; // desc for next skiped comment + TokenDesc m_nextSkippedComment; // desc for next skipped comment TokenDesc m_currentToken; // desc for current token (as returned by Next()) TokenDesc m_nextToken; // desc for next token (one token look-ahead) diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 8b331c75..4811f767 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -447,7 +447,7 @@ bool CommandLineInterface::readInputFilesAndConfigureRemappings() m_sourceCodes[g_stdinFileName] = dev::readStandardInput(); if (m_sourceCodes.size() == 0) { - cerr << "No input files given. If you wish to use the standard input please specify \"-\" explicity." << endl; + cerr << "No input files given. If you wish to use the standard input please specify \"-\" explicitly." << endl; return false; } -- cgit