浏览代码

Fix typos (#3207)

Fix misspelling in ERC20 contract comments.
GitHubPang 3 年之前
父节点
当前提交
458697be32

+ 2 - 2
contracts/token/ERC20/extensions/ERC20FlashMint.sol

@@ -21,7 +21,7 @@ abstract contract ERC20FlashMint is ERC20, IERC3156FlashLender {
     /**
      * @dev Returns the maximum amount of tokens available for loan.
      * @param token The address of the token that is requested.
-     * @return The amont of token that can be loaned.
+     * @return The amount of token that can be loaned.
      */
     function maxFlashLoan(address token) public view virtual override returns (uint256) {
         return token == address(this) ? type(uint256).max - ERC20.totalSupply() : 0;
@@ -54,7 +54,7 @@ abstract contract ERC20FlashMint is ERC20, IERC3156FlashLender {
      * supported.
      * @param amount The amount of tokens to be loaned.
      * @param data An arbitrary datafield that is passed to the receiver.
-     * @return `true` is the flash loan was successful.
+     * @return `true` if the flash loan was successful.
      */
     // This function can reenter, but it doesn't pose a risk because it always preserves the property that the amount
     // minted at the beginning is always recovered and burned at the end, or else the entire function will revert.

+ 1 - 1
contracts/token/ERC20/extensions/ERC20Snapshot.sol

@@ -22,7 +22,7 @@ import "../../../utils/Counters.sol";
  * and the account address.
  *
  * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it
- * return `block.number` will trigger the creation of snapshot at the begining of each new block. When overridding this
+ * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this
  * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.
  *
  * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient

+ 1 - 1
contracts/token/ERC20/extensions/ERC20Wrapper.sol

@@ -41,7 +41,7 @@ abstract contract ERC20Wrapper is ERC20 {
     }
 
     /**
-     * @dev Mint wrapped token to cover any underlyingTokens that would have been transfered by mistake. Internal
+     * @dev Mint wrapped token to cover any underlyingTokens that would have been transferred by mistake. Internal
      * function that can be exposed with access control if desired.
      */
     function _recover(address account) internal virtual returns (uint256) {