From 458697be32f41946e1ab66e946c7cf373c79577d Mon Sep 17 00:00:00 2001 From: GitHubPang <61439577+GitHubPang@users.noreply.github.com> Date: Wed, 23 Feb 2022 01:26:18 +0800 Subject: [PATCH] Fix typos (#3207) Fix misspelling in ERC20 contract comments. --- contracts/token/ERC20/extensions/ERC20FlashMint.sol | 4 ++-- contracts/token/ERC20/extensions/ERC20Snapshot.sol | 2 +- contracts/token/ERC20/extensions/ERC20Wrapper.sol | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/token/ERC20/extensions/ERC20FlashMint.sol b/contracts/token/ERC20/extensions/ERC20FlashMint.sol index 1c742faf79d..8451b6b7b9a 100644 --- a/contracts/token/ERC20/extensions/ERC20FlashMint.sol +++ b/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. diff --git a/contracts/token/ERC20/extensions/ERC20Snapshot.sol b/contracts/token/ERC20/extensions/ERC20Snapshot.sol index 96524bb22ec..6f59666ac1c 100644 --- a/contracts/token/ERC20/extensions/ERC20Snapshot.sol +++ b/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 diff --git a/contracts/token/ERC20/extensions/ERC20Wrapper.sol b/contracts/token/ERC20/extensions/ERC20Wrapper.sol index 151c96d8bee..32a3b830afe 100644 --- a/contracts/token/ERC20/extensions/ERC20Wrapper.sol +++ b/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) {