From ded2b0a55c9c13731963ab7b85a70c8e73504bab Mon Sep 17 00:00:00 2001 From: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com> Date: Wed, 2 Sep 2020 04:19:17 +1000 Subject: [PATCH] Fix minor typos and grammar in docs (#2338) * Fix typos and formatting * Add Solidity release dates: releases-stability --- contracts/GSN/IRelayHub.sol | 4 ++-- contracts/math/SignedSafeMath.sol | 2 +- contracts/presets/ERC721PresetMinterPauserAutoId.sol | 2 +- contracts/token/ERC20/ERC20.sol | 4 ++-- contracts/token/ERC20/README.adoc | 2 +- contracts/token/ERC721/README.adoc | 2 +- contracts/token/ERC777/README.adoc | 2 +- docs/modules/ROOT/pages/access-control.adoc | 2 +- docs/modules/ROOT/pages/index.adoc | 2 +- docs/modules/ROOT/pages/releases-stability.adoc | 4 ++-- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/contracts/GSN/IRelayHub.sol b/contracts/GSN/IRelayHub.sol index 30b0ab951..7e4be7cfb 100644 --- a/contracts/GSN/IRelayHub.sol +++ b/contracts/GSN/IRelayHub.sol @@ -41,7 +41,7 @@ interface IRelayHub { function registerRelay(uint256 transactionFee, string calldata url) external; /** - * @dev Emitted when a relay is registered or re-registerd. Looking at these events (and filtering out + * @dev Emitted when a relay is registered or re-registered. Looking at these events (and filtering out * {RelayRemoved} events) lets a client discover the list of available relays. */ event RelayAdded(address indexed relay, address indexed owner, uint256 transactionFee, uint256 stake, uint256 unstakeDelay, string url); @@ -105,7 +105,7 @@ interface IRelayHub { event Deposited(address indexed recipient, address indexed from, uint256 amount); /** - * @dev Returns an account's deposits. These can be either a contracts's funds, or a relay owner's revenue. + * @dev Returns an account's deposits. These can be either a contract's funds, or a relay owner's revenue. */ function balanceOf(address target) external view returns (uint256); diff --git a/contracts/math/SignedSafeMath.sol b/contracts/math/SignedSafeMath.sol index a8f51dc3d..ab87c27c9 100644 --- a/contracts/math/SignedSafeMath.sol +++ b/contracts/math/SignedSafeMath.sol @@ -9,7 +9,7 @@ pragma solidity ^0.6.0; library SignedSafeMath { int256 constant private _INT256_MIN = -2**255; - /** + /** * @dev Returns the multiplication of two signed integers, reverting on * overflow. * diff --git a/contracts/presets/ERC721PresetMinterPauserAutoId.sol b/contracts/presets/ERC721PresetMinterPauserAutoId.sol index 9a9ce0dee..18605c7b0 100644 --- a/contracts/presets/ERC721PresetMinterPauserAutoId.sol +++ b/contracts/presets/ERC721PresetMinterPauserAutoId.sol @@ -62,7 +62,7 @@ contract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnabl function mint(address to) public virtual { require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint"); - // We can just use balanceOf to create the new tokenId because tokens + // We cannot just use balanceOf to create the new tokenId because tokens // can be burned (destroyed), so we need a separate counter. _mint(to, _tokenIdTracker.current()); _tokenIdTracker.increment(); diff --git a/contracts/token/ERC20/ERC20.sol b/contracts/token/ERC20/ERC20.sol index a8ab97f27..dce6f4593 100644 --- a/contracts/token/ERC20/ERC20.sol +++ b/contracts/token/ERC20/ERC20.sol @@ -258,9 +258,9 @@ contract ERC20 is Context, IERC20 { } /** - * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. + * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * - * This is internal function is equivalent to `approve`, and can be used to + * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. diff --git a/contracts/token/ERC20/README.adoc b/contracts/token/ERC20/README.adoc index e12e57621..f47f94b94 100644 --- a/contracts/token/ERC20/README.adoc +++ b/contracts/token/ERC20/README.adoc @@ -5,7 +5,7 @@ NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/ This set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-20[ERC20 Token Standard]. -TIP: For an overview of ERC20 tokens and a walkthrough on how to create a token contract read our xref:ROOT:erc20.adoc[ERC20 guide]. +TIP: For an overview of ERC20 tokens and a walk through on how to create a token contract read our xref:ROOT:erc20.adoc[ERC20 guide]. There a few core contracts that implement the behavior specified in the EIP: diff --git a/contracts/token/ERC721/README.adoc b/contracts/token/ERC721/README.adoc index 69191ab30..5f584eee1 100644 --- a/contracts/token/ERC721/README.adoc +++ b/contracts/token/ERC721/README.adoc @@ -5,7 +5,7 @@ NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/ This set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-721[ERC721 Non-Fungible Token Standard]. -TIP: For a walkthrough on how to create an ERC721 token read our xref:ROOT:erc721.adoc[ERC721 guide]. +TIP: For a walk through on how to create an ERC721 token read our xref:ROOT:erc721.adoc[ERC721 guide]. The EIP consists of three interfaces, found here as {IERC721}, {IERC721Metadata}, and {IERC721Enumerable}. Only the first one is required in a contract to be ERC721 compliant. However, all three are implemented in {ERC721}. diff --git a/contracts/token/ERC777/README.adoc b/contracts/token/ERC777/README.adoc index e078f86ec..4dee8a661 100644 --- a/contracts/token/ERC777/README.adoc +++ b/contracts/token/ERC777/README.adoc @@ -5,7 +5,7 @@ NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/ This set of interfaces and contracts are all related to the [ERC777 token standard](https://eips.ethereum.org/EIPS/eip-777). -TIP: For an overview of ERC777 tokens and a walkthrough on how to create a token contract read our xref:ROOT:erc777.adoc[ERC777 guide]. +TIP: For an overview of ERC777 tokens and a walk through on how to create a token contract read our xref:ROOT:erc777.adoc[ERC777 guide]. The token behavior itself is implemented in the core contracts: {IERC777}, {ERC777}. diff --git a/docs/modules/ROOT/pages/access-control.adoc b/docs/modules/ROOT/pages/access-control.adoc index 20ac4cf03..acb0b6765 100644 --- a/docs/modules/ROOT/pages/access-control.adoc +++ b/docs/modules/ROOT/pages/access-control.adoc @@ -131,7 +131,7 @@ By default, **accounts with a role cannot grant it or revoke it from other accou Every role has an associated admin role, which grants permission to call the `grantRole` and `revokeRole` functions. A role can be granted or revoked by using these if the calling account has the corresponding admin role. Multiple roles may have the same admin role to make management easier. A role's admin can even be the same role itself, which would cause accounts with that role to be able to also grant and revoke it. -This mechanism can be used to create complex permissioning structures resembling organizational charts, but it also provides an easy way to manage simpler applications. `AccessControl` includes a special role, called `DEFAULT_ADMIN_ROLE`, which acts as the **default admin role for all roles**. An account with this role will be able to manage any other role, unless `\_setRoleAdmin` is used to select a new admin role. +This mechanism can be used to create complex permissioning structures resembling organizational charts, but it also provides an easy way to manage simpler applications. `AccessControl` includes a special role, called `DEFAULT_ADMIN_ROLE`, which acts as the **default admin role for all roles**. An account with this role will be able to manage any other role, unless `_setRoleAdmin` is used to select a new admin role. Let's take a look at the ERC20 token example, this time taking advantage of the default admin role: diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index b43cbe086..8c76b298e 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -52,7 +52,7 @@ The guides in the sidebar will teach about different concepts, and how to use th * xref:gsn.adoc[Gas Station Network]: let your users interact with your contracts without having to pay for gas themselves. * xref:utilities.adoc[Utilities]: generic useful tools, including non-overflowing math, signature verification, and trustless paying systems. -The xref:api:token/ERC20.adoc[full API] is also thoroughly documented, and serves as a great reference when developing your smart contract application. You can also ask for help or follow Contracts's development in the https://forum.openzeppelin.com[community forum]. +The xref:api:token/ERC20.adoc[full API] is also thoroughly documented, and serves as a great reference when developing your smart contract application. You can also ask for help or follow Contracts' development in the https://forum.openzeppelin.com[community forum]. Finally, you may want to take a look at the https://blog.openzeppelin.com/guides/[guides on our blog], which cover several common use cases and good practices.. The following articles provide great background reading, though please note, some of the referenced tools have changed as the tooling in the ecosystem continues to rapidly evolve. diff --git a/docs/modules/ROOT/pages/releases-stability.adoc b/docs/modules/ROOT/pages/releases-stability.adoc index b12cdb974..5708c193f 100644 --- a/docs/modules/ROOT/pages/releases-stability.adoc +++ b/docs/modules/ROOT/pages/releases-stability.adoc @@ -69,12 +69,12 @@ While attempts will generally be made to lower the gas costs of working with Ope [[bugfixes]] === Bug Fixes -The API stability guarantees may need to be broken in order to fix a bug, and we will do so. This decision won't be made lightly however, and all options will be explored to make the change as non-disruptive as possible. When sufficient, contracts or functions which may result in unsafe behaviour will be deprecated instead of removed (e.g. https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1543[#1543] and https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1550[#1550]). +The API stability guarantees may need to be broken in order to fix a bug, and we will do so. This decision won't be made lightly however, and all options will be explored to make the change as non-disruptive as possible. When sufficient, contracts or functions which may result in unsafe behavior will be deprecated instead of removed (e.g. https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1543[#1543] and https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1550[#1550]). [[solidity-compiler-version]] === Solidity Compiler Version -Starting on version 0.5.0, the Solidity team switched to a faster release cycle, with minor releases every few weeks (v0.5.0 was released on November 2018, and v0.5.5 on March 2019), and major, breaking-change releases every couple months (with v0.6.0 scheduled for late March 2019). Including the compiler version in OpenZeppelin Contract's stability guarantees would therefore force the library to either stick to old compilers, or release frequent major updates simply to keep up with newer Solidity releases. +Starting on version 0.5.0, the Solidity team switched to a faster release cycle, with minor releases every few weeks (v0.5.0 was released on November 2018, and v0.5.5 on March 2019), and major, breaking-change releases every couple of months (with v0.6.0 released on December 2019 and v0.7.0 on July 2020). Including the compiler version in OpenZeppelin Contract's stability guarantees would therefore force the library to either stick to old compilers, or release frequent major updates simply to keep up with newer Solidity releases. Because of this, *the minimum required Solidity compiler version is not part of the stability guarantees*, and users may be required to upgrade their compiler when using newer versions of Contracts. Bug fixes will still be backported to older library releases so that all versions currently in use receive these updates.