Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default example doesn't compile #16

Open
aarontp opened this issue Jan 29, 2019 · 1 comment
Open

Default example doesn't compile #16

aarontp opened this issue Jan 29, 2019 · 1 comment

Comments

@aarontp
Copy link

aarontp commented Jan 29, 2019

The default example gives errors when compiling on remix.ethereum.org

When using compiler version 0.4.19+commit.c4cbbb05 it givers error:

browser/ballot.sol:78:16: ParserError: Expected identifier, got 'LParen'
    constructor() public {
               ^

When using compiler version 0.5.1+commit.c8a2cb62 I get:

browser/ballot.sol:46:35: ParserError: The state mutability modifier "constant" was removed in version 0.5.0. Use "view" or "pure" instead.
    function totalSupply() public constant returns (uint);
                                  ^------^

And if you replace all references from "constant" to "view" (still with compiler version 0.5.1+commit.c8a2cb62) I get:

browser/ballot.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.1+commit.c8a2cb62.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;

And

browser/ballot.sol:64:75: TypeError: Data location must be "memory" for parameter in function, but none was given.
    function receiveApproval(address from, uint256 tokens, address token, bytes data) public;
                                                                          ^--------^

And If I change it to the latest non nightly build version of "0.5.3+commit.10d17f24" I get:

browser/ballot.sol:21:1: ParserError: Source file requires different compiler version (current compiler is 0.5.3+commit.10d17f24.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
contract SafeMath {
^------^
@aarontp
Copy link
Author

aarontp commented Jan 29, 2019

It does compile with compiler version 0.4.24+commit.e67f0147. The article on https://medium.com/bitfwd/how-to-issue-your-own-token-on-ethereum-in-less-than-20-minutes-ac1f8f022793 mentions 0.4.19, so maybe that text just needs to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant