Guys, i get this error while trying to compile a contract using truffle. I've updated the solc version in truffle-config file, and contracts versions are the same. But still doesn't work. Would you please tell me what should I do?
Jan 4, 2023, 10:25 AM
You would have to find that contract that is on pragma 0.4.17. If you have access to all the contracts you are using, and they are on a higher or different pragma, then the quickest way to fix this is change every pragma line of each contract using pragma range. For example "pragma >=0.4.16 <=0.5.16". Thus should fox your problem even if your sole in Truffle configuration is using 0.5.16.
Hope this helps.
Jan 4, 2023, 10:36 AM
the terminal is not considering your modifications.. may be you should restart the terminal... and check if you save your updates.. cause you're still having the same error..if you're using vscode.. make sure you've specify the right solc compiler version..
Jan 4, 2023, 10:36 AM
Thank you so much
Jan 4, 2023, 12:30 PM
did it work?
Jan 4, 2023, 12:39 PM
The problem was solved after reinstalling solc by nmp
Jan 4, 2023, 12:44 PM
I'm just curious. What was the problem with the initial install?
Jan 4, 2023, 12:52 PM
I don't know. But i tried different codes and get same error and i knew it's not about the contracts.
Jan 4, 2023, 2:34 PM