Error on this line: pragma solidity ^0.4.21 ;

1 answers
1 votes
Error on this line: pragma solidity ^0.4.21 ;
asked
I followed the video 'Intro to Cryptoeconomics' and wrote the code into the Remix from Etheruem, but the version in the video for pragma solidity seems to be outdated. I've tried replacing it with the newest version but it does no good. I can not run the program.
Full disclosure, this is my first coding or rather copy of the syllabus. 
Can anybody help?

Best answer

1
answered
remix IDE, you can opt for an older version of the compiler itself which is compatible with the version of solidity you are using. This way, you can easily execute an older version of the code explained in the course and make it work! Also note, we are in process of updating our code-related courses to keep up with the updating versions. You can check out ETH 101 updated 2019 course for a more recent taste of working on the Ethereum blockchain. That resolves the outdated issue!

Answers

newest most voted

Hi Reginald!

The pragma statement specifies to the compiler which version of Solidity the code is written in. If you are using remix IDE, you can opt for an older version of the compiler itself which is compatible with the version of solidity you are using. This way, you can easily execute an older version of the code explained in the course and make it work!

Also note, we are in process of updating our code-related courses to keep up with the updating versions. You can check out ETH 101 updated 2019 course for a more recent taste of working on the Ethereum blockchain. That resolves the outdated issue!

Hungry for knowledge?
New guides and courses each week
Looking to invest?
Market data, analysis, and reports
Just curious?
A community of blockchain experts to help

Get started today and earn 4 bonus blocks

Already have an account? Sign In