I notice there has been changes made to solidity and that the word emit
is now to be used in front of event triggers (to distinguish from functions being called).
However when I include these in contracts using the truffle framework to compile I get an error
PS D:\Programming\Solidity\ICO REDO> truffle compile
Error parsing D:\Programming\Solidity\ICO REDO\contracts\Token.sol: ParsedContract.sol:75:22: ParserError: Expected token Semicolon got 'LParen'
emit Transfer(msg.sender, _to, _value);
Does anyone know why this is, or how I can get these contracts to compile with the emit word being used or should I just omit it and move on (is this now bad practice?)?
The code is:
function Token() public {
Ownable(msg.sender);
balances[msg.sender] = TOTALSUPPLY;
emit Transfer(address(0), msg.sender, TOTALSUPPLY);
}