Skip to content

Commit e203e02

Browse files
Remove outdated comment in ERC-20 (#4968)
Co-authored-by: ernestognw <[email protected]>
1 parent 0c18fac commit e203e02

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

contracts/token/ERC20/ERC20.sol

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
133133
/**
134134
* @dev See {IERC20-transferFrom}.
135135
*
136-
* Emits an {Approval} event indicating the updated allowance. This is not
137-
* required by the ERC. See the note at the beginning of {ERC20}.
136+
* Skips emitting an {Approval} event indicating an allowance update. This is not
137+
* required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
138138
*
139139
* NOTE: Does not update the allowance if the current allowance
140140
* is the maximum `uint256`.
@@ -268,7 +268,8 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
268268
*
269269
* Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
270270
* true using the following override:
271-
* ```
271+
*
272+
* ```solidity
272273
* function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
273274
* super._approve(owner, spender, value, true);
274275
* }

0 commit comments

Comments
 (0)