Tom
Tom

Reputation: 33

Simple smart contract in ethereum remix - ParserError: Expected ';'

I trying test some simple smart contract but don't know I have error Can anybody tell me where I have a mistake?

I want to test this code but this error stops me.


interface IERC20Token {
    function balanceOf(address owner) public returns (uint256);
    function transfer(address to, uint256 amount) public returns (bool);
    function decimals() public returns (uint256);
}

contract TokenSale {
    IERC20Token public tokenContract = '0x12740510086c7062d5131BFe7C680c8b5D728c7f' // the token being sold
    uint256 public price = 1000000000000000;              // the price, in wei, per token
    address owner;

    uint256 public tokensSold;

    event Sold(address buyer, uint256 amount);

    function TokenSale(IERC20Token _tokenContract, uint256 _price) public {
        owner = msg.sender;
        tokenContract = _tokenContract;
        price = _price;
    }

SCREENSHOT REMIX SCREENSHOT

Upvotes: 0

Views: 301

Answers (1)

cseitz
cseitz

Reputation: 1226

Line 10. Add a semicolon before your comment.

IERC20Token public tokenContract = '0x12740510086c7062d5131BFe7C680c8b5D728c7f'; // the token being sold

Upvotes: 1

Related Questions