Skip to content

Commit

Permalink
remove redundant variable
Browse files Browse the repository at this point in the history
  • Loading branch information
3esmit committed Sep 26, 2023
1 parent 66ae31e commit 53cc5c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .gas-report
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
| contracts/MiniMeToken.sol:MiniMeToken contract | | | | | |
|------------------------------------------------|-----------------|-------|--------|-------|---------|
| Deployment Cost | Deployment Size | | | | |
| 2086437 | 11846 | | | | |
| 2088237 | 11855 | | | | |
| Function Name | min | avg | median | max | # calls |
| DOMAIN_SEPARATOR | 387 | 387 | 387 | 387 | 10 |
| allowance | 0 | 190 | 0 | 763 | 16 |
Expand All @@ -10,7 +10,7 @@
| balanceOf | 0 | 622 | 0 | 2753 | 67 |
| balanceOfAt | 0 | 830 | 0 | 3766 | 78 |
| changeController | 0 | 596 | 0 | 3580 | 6 |
| claimTokens | 9559 | 40647 | 56192 | 56192 | 3 |
| claimTokens | 9559 | 40641 | 56183 | 56183 | 3 |
| controller | 0 | 0 | 0 | 0 | 10 |
| decimals | 0 | 0 | 0 | 0 | 10 |
| destroyTokens | 3864 | 5115 | 3864 | 7617 | 3 |
Expand All @@ -26,7 +26,7 @@
| totalSupply | 0 | 255 | 0 | 2480 | 23 |
| totalSupplyAt | 0 | 797 | 0 | 3398 | 17 |
| transfer | 548 | 38822 | 49621 | 92685 | 20 |
| transferFrom | 0 | 19397 | 3495 | 65545 | 11 |
| transferFrom | 0 | 19396 | 3494 | 65544 | 11 |



Expand Down
8 changes: 4 additions & 4 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ AllowanceTest:testApproveTransferDisabled() (gas: 7994)
AllowanceTest:testDeployment() (gas: 26711)
AllowanceTest:testNoAllowance() (gas: 9462)
AllowanceTest:testRejectedApproval() (gas: 13683)
ClaimTokensTest:testClaimERC20() (gas: 62778)
ClaimTokensTest:testClaimERC20() (gas: 62769)
ClaimTokensTest:testClaimETH() (gas: 13659)
ClaimTokensTest:testClaimSelf() (gas: 60260)
ClaimTokensTest:testClaimSelf() (gas: 60251)
ClaimTokensTest:testDeployment() (gas: 26595)
CreateCloneTokenTest:testCloneFutureSnapshot() (gas: 100903)
CreateCloneTokenTest:testCreateCloneToken() (gas: 2125492)
CreateCloneTokenTest:testCreateCloneToken() (gas: 2127292)
CreateCloneTokenTest:testDeployment() (gas: 26550)
CreateCloneTokenTest:testGenerateTokens() (gas: 101254)
DestroyTokensTest:testDeployment() (gas: 26595)
Expand All @@ -26,7 +26,7 @@ MiniMeTokenTest:testDeployment() (gas: 26535)
ReceiveTest:testAcceptingEther() (gas: 18628)
ReceiveTest:testDeployment() (gas: 26595)
ReceiveTest:testRejectingEther() (gas: 18691)
ReentrancyTest:testAttack() (gas: 227887)
ReentrancyTest:testAttack() (gas: 227886)
TestPermit:testDeployment() (gas: 26573)
TestPermit:testInvalidAllowance() (gas: 84299)
TestPermit:testInvalidBalance() (gas: 67380)
Expand Down
5 changes: 2 additions & 3 deletions contracts/MiniMeBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,8 @@ abstract contract MiniMeBase is Controlled, IERC20, IERC20Permit, EIP712, Nonces
return;
}

IERC20 token = _token;
uint256 balance = token.balanceOf(address(this));
token.transfer(controller, balance);
uint256 balance = _token.balanceOf(address(this));
_token.transfer(controller, balance);
emit ClaimedTokens(address(_token), controller, balance);
}

Expand Down

0 comments on commit 53cc5c2

Please sign in to comment.