sdk icon indicating copy to clipboard operation
sdk copied to clipboard

The truffleprovider version needs to be updated

Open vikramIde opened this issue 5 years ago • 7 comments
trafficstars

Hi Guys,

I had tried to compile one of the Ethereum smartcontract basically a NFT token standard, but it said the truffle version needs to updated to the latest.

the standard i was testing is ERC721Full

Thanks

vikramIde avatar Jun 24 '20 06:06 vikramIde

@vikramIde need more information. can you copy paste the error you are getting and output of truffle version?

gupadhyaya avatar Jun 24 '20 20:06 gupadhyaya

@gupadhyaya Sure

vikrams-mbp:soccerplayers vikrambhushan$ truffle migrate --reset --network testnet

Compiling your contracts...
===========================
> Compiling ./contracts/ViperToken.sol

/Users/vikrambhushan/Documents/Harmony/soccerplayers/contracts/ViperToken.sol:3:1: ParserError: Source file requires different compiler version (current compiler is 0.5.16+commit.9c3226ce.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.5.3;
^--------------------^

Error: Truffle is currently using solc 0.5.16, but one or more of your contracts specify "pragma solidity 0.5.3".
Please update your truffle config or pragma statement(s).
(See https://truffleframework.com/docs/truffle/reference/configuration#compiler-configuration for information on
configuring Truffle to use a specific solc compiler version.)

Compilation failed. See above.
Truffle v5.1.31 (core: 5.1.31)
Node v13.13.0```

Let me know if this helps

vikramIde avatar Jun 25 '20 13:06 vikramIde

@vikramIde try changing the line to pragma solidity ^0.5.3 , it will allow any higher versions of 0.5.x too compile.

gupadhyaya avatar Jun 26 '20 06:06 gupadhyaya

@gupadhyaya sure let me try that

vikramIde avatar Jun 26 '20 07:06 vikramIde

Hi Guys,

I had tried to compile one of the Ethereum smartcontract basically a NFT token standard, but it said the truffle version needs to updated to the latest.

the standard i was testing is ERC721Full

Thanks

Truffle provider is only a bridge connecting harmony to truffle suite. It's not using any solc or compiler, so you should check with your '.sol' file

neeboo avatar Jun 26 '20 09:06 neeboo

@neeboo and @gupadhyaya

So I tried changing the lines

pragma solidity ^0.5.3;

But now I am getting a different error

Could not find suitable configuration file.
Truffle v5.1.31 (core: 5.1.31)
Node v13.13.0```

vikramIde avatar Jun 28 '20 08:06 vikramIde

@vikramIde try using Node v10 here is my truffle version

Truffle v5.0.38 (core: 5.0.38)
Solidity v0.5.8 (solc-js)
Node v10.17.0
Web3.js v1.2.1

gupadhyaya avatar Jun 28 '20 19:06 gupadhyaya