StandardToken encapsulation (#1197)

* make StandardToken state variables private

* simplify mocks

* document new internal functions

* fix link to ERC20 document

* revert order of Transfer and Mint events

* Revert "simplify mocks"

This reverts commit 371fe3e567.

* add tests for new internal functions

* add check for null account

* add checks for balances and allowance

* add inline docs to BurnableToken._burn

* remove redundant checks and clarify why
This commit is contained in:
Francisco Giordano
2018-08-16 13:03:40 -03:00
committed by GitHub
parent 8d11dcc0e5
commit 4dcdd293e8
12 changed files with 230 additions and 43 deletions

View File

@ -22,9 +22,7 @@ contract SimpleToken is StandardToken {
* @dev Constructor that gives msg.sender all of existing tokens.
*/
constructor() public {
totalSupply_ = INITIAL_SUPPLY;
balances[msg.sender] = INITIAL_SUPPLY;
emit Transfer(address(0), msg.sender, INITIAL_SUPPLY);
_mint(msg.sender, INITIAL_SUPPLY);
}
}