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

Warnings on dev@HEAD #232

Closed
verdverm opened this issue Feb 21, 2018 · 8 comments
Closed

Warnings on dev@HEAD #232

verdverm opened this issue Feb 21, 2018 · 8 comments

Comments

@verdverm
Copy link
Contributor

I just pulled this repo and ...

yarn
truffle migrate --all

I got the following errors during compilation. ( working to clean them up now )


aragon/aragonOS/contracts/lib/ens/PublicResolver.sol:197:5: Warning: No visibility specified. Defaulting to "public".
    function text(bytes32 node, string key) constant returns (string ret) {}
aragon/aragonOS/contracts/lib/ens/ENS.sol:20:48: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
        if (records[node].owner != msg.sender) throw;
                                               ^---^
aragon/aragonOS/contracts/evmscript/IEVMScriptRegistry.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.4.19+commit.c4cbbb05.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.4.18;
^---------------------^
aragon/aragonOS/contracts/lib/ens/ENS.sol:81:40: Warning: This declaration shadows an existing declaration.
    function setResolver(bytes32 node, address resolver) only_owner(node) {
                                       ^--------------^
aragon/aragonOS/contracts/lib/ens/ENS.sol:41:5: The shadowed declaration is here:
    function resolver(bytes32 node) constant returns (address) {
aragon/aragonOS/contracts/lib/ens/ENS.sol:28:17: Warning: Decimal literal assigned to bytesXX variable will be left-aligned. Use an explicit conversion to silence this warning.
        records[0].owner = msg.sender;
aragon/aragonOS/contracts/evmscript/executors/DelegateScript.sol:60:13: Warning: The "returndatacopy" instruction is only available after the Metropolis hard fork. Before that it acts as an invalid instruction.
            returndatacopy(add(ret, 0x20), 0, size) // copy return data
@cpurta
Copy link
Contributor

cpurta commented Feb 21, 2018

If you're using truffle@v4.0.6 it is using solidity@0.4.19 which is causing the SyntaxError and stopping the migration. If you use v4.0.5 it will successfully compile and migrate. It would be nice to address the rest of those warnings.

@verdverm
Copy link
Contributor Author

Yup:

Truffle v4.0.6 (core: 4.0.6)
Solidity v0.4.19 (solc-js)

I also made sure that all the contracts are consistent to pragma solidity ^0.4.18

@cpurta
Copy link
Contributor

cpurta commented Feb 21, 2018

If you are updating the solidity version you will want to remove the ^ for non-interface files due to security reasons. For reference #169

@verdverm
Copy link
Contributor Author

welp, guess I have to figure out which files those are now!

@verdverm
Copy link
Contributor Author

There are files which have contracts AND the ^, should I remove the ^ if it's a contract?

@bingen
Copy link
Contributor

bingen commented Feb 21, 2018

@verdverm You are using Truffle v4.0.6 globally, right? dev branch should use locally 4.0.5. See #228

@verdverm
Copy link
Contributor Author

I probably need to do npm run or yarn ... while compiling / migrating then

@verdverm verdverm changed the title Errors on dev@HEAD Warnings on dev@HEAD Feb 21, 2018
@izqui
Copy link
Contributor

izqui commented Feb 22, 2018

There are files which have contracts AND the ^, should I remove the ^ if it's a contract?

No. Versions are locked on purpose.

Is it clear now, can we close the issue? :)

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

4 participants