Skip to content

Commit

Permalink
chore: Reorder internals to be alphabetical (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Manuel authored Mar 9, 2022
1 parent 756c110 commit cc1dc96
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions contracts/ERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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_);
}

}
16 changes: 8 additions & 8 deletions contracts/ERC20Permit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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_);
}

}

0 comments on commit cc1dc96

Please sign in to comment.