Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Compilation failed due to differ compiler version #3

Closed
baumstern opened this issue Mar 2, 2019 · 9 comments
Closed

Compilation failed due to differ compiler version #3

baumstern opened this issue Mar 2, 2019 · 9 comments

Comments

@baumstern
Copy link

When I installed latest truffle from npm install -g truffle ganache-cli and running test, then I got compile errors.

hyundp:Kudos721Contract daehyun$ truffle test --network test
No secrets.json found. If you are trying to publish EPM this will fail. Otherwise, you can ignore this message!

Compiling your contracts...
===========================
> Compiling ./contracts/Kudos.sol
> Compiling ./contracts/Migrations.sol
> Compiling openzeppelin-solidity/contracts/AddressUtils.sol
> Compiling openzeppelin-solidity/contracts/introspection/ERC165.sol
> Compiling openzeppelin-solidity/contracts/introspection/SupportsInterfaceWithLookup.sol
> Compiling openzeppelin-solidity/contracts/math/SafeMath.sol
> Compiling openzeppelin-solidity/contracts/ownership/Ownable.sol
> Compiling openzeppelin-solidity/contracts/token/ERC721/ERC721.sol
> Compiling openzeppelin-solidity/contracts/token/ERC721/ERC721Basic.sol
> Compiling openzeppelin-solidity/contracts/token/ERC721/ERC721BasicToken.sol
> Compiling openzeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol
> Compiling openzeppelin-solidity/contracts/token/ERC721/ERC721Token.sol

openzeppelin-solidity/contracts/introspection/ERC165.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
,openzeppelin-solidity/contracts/token/ERC721/ERC721Basic.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
,openzeppelin-solidity/contracts/token/ERC721/ERC721.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
,openzeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
,openzeppelin-solidity/contracts/math/SafeMath.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
,openzeppelin-solidity/contracts/AddressUtils.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
,openzeppelin-solidity/contracts/introspection/SupportsInterfaceWithLookup.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
,openzeppelin-solidity/contracts/token/ERC721/ERC721BasicToken.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
,openzeppelin-solidity/contracts/token/ERC721/ERC721Token.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
,openzeppelin-solidity/contracts/ownership/Ownable.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
,/Users/daehyun/Documents/Workspace/references/Kudos721Contract/contracts/Kudos.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
,/Users/daehyun/Documents/Workspace/references/Kudos721Contract/contracts/Migrations.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.23;
^----------------------^
,openzeppelin-solidity/contracts/token/ERC721/ERC721Basic.sol:84:5: TypeError: Data location must be "memory" for parameter in function, but none was given.
    bytes _data
    ^---------^
Compilation failed. See above.
Truffle v5.0.6 (core: 5.0.6)
Node v10.4.1
baumstern added a commit to baumstern/Kudos721Contract that referenced this issue Mar 2, 2019
@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.3 ETH (39.34 USD @ $131.13/ETH) attached to it.

@gitcoinbot
Copy link
Member

gitcoinbot commented Mar 3, 2019

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 12 months from now.
Please review their action plans below:

1) svipal has started work.

The pragmas specify the correct version of solidity for the project. You can add this to your truffle, to specify the version of the compiler needed :

module.exports = {
networks: {
...
},
compilers: {
solc: {
version: "0.4.24"
}
}
}

Learn more on the Gitcoin Issue Details page.

@svipal
Copy link
Contributor

svipal commented Mar 3, 2019

here's a pic for it to be clearer
image
In addition to the pragmas inside the projects' contract; the reason it is behaving so at the moment is because the project depends on an old version of opensolidity.

@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 0.3 ETH (39.34 USD @ $131.13/ETH) has been submitted by:

  1. @svipal

@owocki please take a look at the submitted work:


@owocki
Copy link
Contributor

owocki commented Mar 4, 2019

@gurrpi can you try now? thanks @svipal !

@baumstern
Copy link
Author

@owocki Well, yes it works. BTW, it would be good to notice Gitcoin contributor workflow more accessible for potential contributor. (Since I submitted the PR— without any knowledge about process— immediately after filed this issue).

@svipal
Copy link
Contributor

svipal commented Mar 5, 2019

@gurrpi , oh wow. I think he didn't see your PR before putting up the bounty. Neither did I . I think it's unfair for me to get the bounty in this case.
@owocki can you cancel the bounty and just transfer the eth to gurrpi ?

@baumstern
Copy link
Author

@svipal Thank you for your kindness. But I think there should be a reward for your effort— motivated by the bounty system.

@gitcoinbot
Copy link
Member

⚡️ A tip worth 0.20000 ETH (27.14 USD @ $135.7/ETH) has been granted to @gurrpi for this issue from @owocki. ⚡️

Nice work @gurrpi! To redeem your tip, login to Gitcoin at https://gitcoin.co/explorer and select 'Claim Tip' from dropdown menu in the top right, or check your email for a link to the tip redemption page.

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

No branches or pull requests

4 participants