Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is recommended to add a line of code. #137

Open
mahuaibo opened this issue Jul 16, 2018 · 1 comment
Open

It is recommended to add a line of code. #137

mahuaibo opened this issue Jul 16, 2018 · 1 comment

Comments

@mahuaibo
Copy link

constructor:function EIP20

add code: emit Transfer(address(0), msg.sender, totalSupply);

@mahuaibo
Copy link
Author

mahuaibo commented Jul 16, 2018

function EIP20(uint256 _initialAmount, string _tokenName, uint8 _decimalUnits, string _tokenSymbol ) public {
balances[msg.sender] = _initialAmount; // Give the creator all initial tokens
emit Transfer(address(0), msg.sender, totalSupply); // ** add code **
totalSupply = _initialAmount; // Update total supply
name = _tokenName; // Set the name for display purposes
decimals = _decimalUnits; // Amount of decimals for display purposes
symbol = _tokenSymbol; // Set the symbol for display purposes
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant