Skip to content

Commit 8565f15

Browse files
committed
Merge branch 'refactor/erc20/mint-burn-transfer' of https://github.com/JulissaDantes/openzeppelin-contracts into refactor/erc20/mint-burn-transfer
2 parents c3350bd + dcbc275 commit 8565f15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contracts/token/ERC20/ERC20.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ contract ERC20 is Context, IERC20, IERC20Metadata {
214214
* This internal function is equivalent to {transfer}, and can be used to
215215
* e.g. implement automatic token fees, slashing mechanisms, etc.
216216
*
217-
* Will mint (or burn) if `from` (or `to`) is address(0).
217+
* Will mint (or burn) if `from` (or `to`) is the zero address.
218218
*
219219
* Emits a {Transfer} event.
220220
*
@@ -224,7 +224,7 @@ contract ERC20 is Context, IERC20, IERC20Metadata {
224224
address to,
225225
uint256 amount
226226
) internal virtual {
227-
require(from != address(0) || to != address(0), "ERC20: invalid transfer operation");
227+
require(!(from == address(0) && to == address(0)), "ERC20: invalid transfer operation");
228228

229229
uint256 fromBalance = _balances[from];
230230
if (from == address(0)) {

0 commit comments

Comments
 (0)