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

Problems compiling SimpleStorage.sol with truffle #1

Open
enrutador opened this issue Jun 5, 2019 · 0 comments
Open

Problems compiling SimpleStorage.sol with truffle #1

enrutador opened this issue Jun 5, 2019 · 0 comments

Comments

@enrutador
Copy link

Hi very increible work ¡¡¡ Congratulations.
I have a problem wit the compilation of the contract SimpleStorage.sol with Truffle:

root@etherserver01:~/truffle/contracts# truffle compile

Node v10.15.2
Truffle v5.0.20 (core: 5.0.20)


Compiling your contracts...
===========================
Error: CompileError: ParsedContract.sol:10:20: ParserError: The state mutability modifier "constant" was removed in version 0.5.0. Use "view" or "pure" instead.
    function get() constant returns (string x) {
                   ^------^

Compilation failed. See above.
    at async.whilst.error (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-compile/profiler.js:368:1)
    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-compile/~/async/dist/async.js:969:1
    at next (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-compile/~/async/dist/async.js:5222:1)
    at Promise.all.then.results (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-compile/profiler.js:350:1)
Truffle v5.0.20 (core: 5.0.20)
Node v10.15.2

I use "view or pure" versus constant return , and put pragma solidity >=0.4.21 <0.6.0; , but dont compile. Can you help me ?
Thanks

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