Open mahuaibo opened 6 years ago
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 }
constructor:function EIP20
add code: emit Transfer(address(0), msg.sender, totalSupply);