JediBetDapp
JediBetDapp copied to clipboard
Error: Expected token LBrace got 'View'
Following the instructions from this post:
https://medium.com/coinmonks/optimizing-your-solidity-contracts-gas-usage-9d65334db6c7
line 132 is throwing an error when attempting to compile the contract:
function checkPermissions(address sender) view private {
//only the originator or taker can call this function
require(sender == game.originator.addr || sender == game.taker.addr);
}
error
browser/ballot.sol:132:47: Error: Expected token LBrace got 'View'
function checkPermissions(address sender) view private {

Try changing the Solidity version to 4.24
in the Bet.sol and Migrations.sol:
change pragma solidity ^0.4.8
to pragma solidity ^0.4.24
Also there are 2 truffle .js configs in this repo, by default truffle uses truffle-config.js which is empty so paste this and save:
module.exports = { compilers: { solc: { version: "0.4.24", } }, };
Try to compile the contract now it should work!