0

I took the crowdsale code from the tutorial, copied the whole contract code and pasted it to remix (with Rinkeby testnet), and I'm getting straight an error:

browser/contract.sol:52:25: ParserError: Expected token Semicolon got 'LParen'
       emit FundTransfer(msg.sender, amount, true);
                        ^

What am I doing wrong?

1
  • This is strange. I've tried what you've posted and i only get the constructor warning. Could you add more detail? Commented Jun 15, 2018 at 19:18

1 Answer 1

1

You are using wrong compiler version. The emit keyword was added in Solidity version 0.4.21 - if you use any version below that you either have to remove the emit keyword (the event should work just fine without it then) or upgrade to a newer version.

Remix should support a recent enough compiler.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.