We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c156b9 commit 9aad6a2Copy full SHA for 9aad6a2
program-analysis/slither/exercises/exercise2/coin.sol
@@ -15,8 +15,9 @@ contract Owned {
15
}
16
17
contract Coin is Owned {
18
+ uint256 decimals = 18;
19
+
20
mapping(address => uint256) balances;
- uint256 decimals = 1 ** 18;
21
22
event Mint(address indexed destination, uint256 amount);
23
@@ -45,7 +46,7 @@ contract Coin is Owned {
45
46
47
/// @notice Return the user's balance
48
/// @param dst User address
- function balanceOf(address dst) public returns (uint256) {
49
- return balances[msg.sender];
+ function balanceOf(address dst) public view returns (uint256) {
50
+ return balances[dst];
51
52
0 commit comments