The truffleprovider version needs to be updated
vikramIde opened this issue · comments
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 need more information. can you copy paste the error you are getting and output of truffle version
?
@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 try changing the line to pragma solidity ^0.5.3
, it will allow any higher versions of 0.5.x too compile.
@gupadhyaya sure let me try that
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 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 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