From cc1dc96a7bc113f48186b1b7f268b1abe4775a30 Mon Sep 17 00:00:00 2001 From: Lucas Manuel Date: Wed, 9 Mar 2022 11:45:59 -0500 Subject: [PATCH] chore: Reorder internals to be alphabetical (#22) --- contracts/ERC20.sol | 16 ++++++++-------- contracts/ERC20Permit.sol | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/contracts/ERC20.sol b/contracts/ERC20.sol index 78cd35e..98ed44e 100644 --- a/contracts/ERC20.sol +++ b/contracts/ERC20.sol @@ -59,11 +59,11 @@ contract ERC20 is IERC20 { emit Approval(owner_, spender_, allowance[owner_][spender_] = amount_); } - function _transfer(address owner_, address recipient_, uint256 amount_) internal { - balanceOf[owner_] -= amount_; - balanceOf[recipient_] += amount_; + function _burn(address owner_, uint256 amount_) internal { + balanceOf[owner_] -= amount_; + totalSupply -= amount_; - emit Transfer(owner_, recipient_, amount_); + emit Transfer(owner_, address(0), amount_); } function _mint(address recipient_, uint256 amount_) internal { @@ -73,11 +73,11 @@ contract ERC20 is IERC20 { emit Transfer(address(0), recipient_, amount_); } - function _burn(address owner_, uint256 amount_) internal { - balanceOf[owner_] -= amount_; - totalSupply -= amount_; + function _transfer(address owner_, address recipient_, uint256 amount_) internal { + balanceOf[owner_] -= amount_; + balanceOf[recipient_] += amount_; - emit Transfer(owner_, address(0), amount_); + emit Transfer(owner_, recipient_, amount_); } } diff --git a/contracts/ERC20Permit.sol b/contracts/ERC20Permit.sol index 918968a..a0911c1 100644 --- a/contracts/ERC20Permit.sol +++ b/contracts/ERC20Permit.sol @@ -102,11 +102,11 @@ contract ERC20Permit is IERC20Permit { emit Approval(owner_, spender_, allowance[owner_][spender_] = amount_); } - function _transfer(address owner_, address recipient_, uint256 amount_) internal { - balanceOf[owner_] -= amount_; - balanceOf[recipient_] += amount_; + function _burn(address owner_, uint256 amount_) internal { + balanceOf[owner_] -= amount_; + totalSupply -= amount_; - emit Transfer(owner_, recipient_, amount_); + emit Transfer(owner_, address(0), amount_); } function _mint(address recipient_, uint256 amount_) internal { @@ -116,11 +116,11 @@ contract ERC20Permit is IERC20Permit { emit Transfer(address(0), recipient_, amount_); } - function _burn(address owner_, uint256 amount_) internal { - balanceOf[owner_] -= amount_; - totalSupply -= amount_; + function _transfer(address owner_, address recipient_, uint256 amount_) internal { + balanceOf[owner_] -= amount_; + balanceOf[recipient_] += amount_; - emit Transfer(owner_, address(0), amount_); + emit Transfer(owner_, recipient_, amount_); } }