The latest Sample Fixed Supply Token Contract in the 30 December 2017 revision of the ERC20 Token Standard has some great improvements that our team was wanting to add to our contract in test. It is now 224 lines long. However, there is one function that spans across lines 126-131 in the FixedSupplyToken contract that makes no sense to us.
// ------------------------------------------------------------------------
127 // Total supply
128 // ------------------------------------------------------------------------
129 function totalSupply() public constant returns (uint) {
130 return _totalSupply - balances[address(0)];
131 }
Above this function, there is
uint public _totalSupply;
which provides an automatic getter function for total supply. So I don't see why this function is needed, AND the
- balances[address(0)];
makes no sense to us whatsoever. There would never be a balance to a zero address - correct?
We ask this, because we are afraid that we may be missing something - thanks!