Compiliation failed. Expected token LBrace got 'View'
manxiaqu opened this issue · 1 comments
I got a problem(ParserError: Expected token LBrace got 'View') when compile the code(in HumanStandardTokenFactory.sol, StandardToken.sol, Token.sol) using "truffle compile" .
the output of error:
/home/ubuntu/git/Tokens/contracts/HumanStandardTokenFactory.sol:19:70: ParserError: Expected token LBrace got 'View'
function verifyHumanStandardToken(address _tokenContract) public view returns (bool) {
,/home/ubuntu/git/Tokens/contracts/StandardToken.sol:43:40: ParserError: Expected token LBrace got 'View'
function balanceOf(address _owner) view public returns (uint256 balance) {
,/home/ubuntu/git/Tokens/contracts/Token.sol:20:47: ParserError: Expected token LBrace got 'View'
function balanceOf(address _owner) public view returns (uint256 balance);
the output of "truffle version":
Truffle v3.4.11 (core: 3.4.11)
Solidity v0.4.15 (solc-js)
is there anything wrong with my environment?
yes, the view
keyword is from a feature of Solidity 0.4.16, you'll need to upgrade truffle.