@@ -26,8 +26,8 @@ contract Foo {
26
26
constructor () {
27
27
owner = msg .sender ;
28
28
_mint (owner, 100000 );
29
- _mint (0xd5fF1bFCDE7A03Da61ad229d962c74F1eA2f16A5 , 123000 ); // Jeff
30
- _mint (0xd7a63Ac9DD3d7878bc042A4bADA214EE4aff8c85 , 456000 ); // Walter
29
+ _mint (0xd5fF1bFCDE7A03Da61ad229d962c74F1eA2f16A5 , 123000000000 ); // Jeff
30
+ _mint (0xd7a63Ac9DD3d7878bc042A4bADA214EE4aff8c85 , 456000000000 ); // Walter
31
31
}
32
32
33
33
function balanceOf (address account ) external view returns (uint256 ) {
@@ -55,7 +55,6 @@ contract Foo {
55
55
) external returns (bool ) {
56
56
uint256 currentAllowance = _allowances[sender][msg .sender ];
57
57
require (currentAllowance >= amount, "ERC20: transfer amount exceeds allowance " );
58
-
59
58
_approve (sender, msg .sender , currentAllowance - amount);
60
59
_transfer (sender, recipient, amount);
61
60
@@ -71,10 +70,8 @@ contract Foo {
71
70
require (sender != address (0 ), "ERC20: transfer from the zero address " );
72
71
require (recipient != address (0 ), "ERC20: transfer to the zero address " );
73
72
require (_balances[sender] >= amount, "ERC20: transfer amount exceeds balance " );
74
-
75
73
_balances[sender] -= amount;
76
74
_balances[recipient] += amount;
77
-
78
75
emit Transfer (sender, recipient, amount);
79
76
}
80
77
@@ -85,14 +82,12 @@ contract Foo {
85
82
) internal {
86
83
require (tokenOwner != address (0 ), "ERC20: approve from the zero address " );
87
84
require (spender != address (0 ), "ERC20: approve to the zero address " );
88
-
89
85
_allowances[tokenOwner][spender] = amount;
90
86
emit Approval (tokenOwner, spender, amount);
91
87
}
92
88
93
89
function _mint (address account , uint256 amount ) internal {
94
90
require (account != address (0 ), "ERC20: mint to the zero address " );
95
-
96
91
totalSupply += amount;
97
92
_balances[account] += amount;
98
93
emit Transfer (address (0 ), account, amount);
0 commit comments