function () public payable {
        require(currentStage == Stages.icoStart);
        require(msg.value > 0);
        require(remainingTokens > 0);

Blockquote fallback typos error

        balances[msg.sender] = balances[msg.sender].add(tokens);
        emit Transfer(address(this), msg.sender, tokens);
        totalSupply_ = totalSupply_.add(tokens);
        owner.transfer(weiAmount);// Send money to owner

type error i got . kindly help this

1 Answer 1


I don't have access to a proper setup right now to test your code, but maybe this error comes from a syntax error. Try using function() instead of function ().

And btw, I doubt your function really needs to be public. You can optimize deployment size and reduce attack surface by declaring it as external instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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