owanhunte / ethereum-solidity-course-updated-code

Up-to-date Solidity / web3.js / Node.js / React / Next.js code for the udemy.com course Ethereum and Solidity: The Complete Developer's Guide.
183 stars 82 forks source link

Important Solidity compiler version note #2

Closed owanhunte closed 3 years ago

owanhunte commented 4 years ago

Currently the latest version of Solidity is 0.7.4. The purpose of this repo is to provide up-to-date Solidity (and other) code for the benefit of the students enrolled and enrolling in the udemy.com course Ethereum and Solidity: The Complete Developer's Guide and to this end it achieves that goal, that is, all of the updated Solidity code in this repo is fully compatible with version 0.5.0 and higher of Solidity. However if you want to deploy these smart contracts to the Rinkeby Test Network and then work with them without issues, you will need to use ABI and Bytecodes generated by a 0.5.x version of the Solidity compiler, e.g. 0.5.15.

I learned this the hard way as I was compiling using the 0.6.0 compiler when I started this repo only to realise that although I had no issue working with the contracts after deploying them to Ganache CLI's local test blockchain, this was not the case after deploying the same compiled bytecodes to Rinkeby, specifically all method calls to the contracts were only returning empty results.

Yuktasharma2055 commented 4 years ago

Loved your work . Are there any discussion communities for this course?

owanhunte commented 4 years ago

Hi @Yuktasharma2055 I am not aware of any discussion communities for this course, that is actually part of the reason I had created this repo. I actually need to spend some time updating this repo tho as some parts of it are not as up-to-date as I would like.

GitHub of course has a GitHub Discussions feature which is still in limited beta and has so far been rolled out for some popular, public, open source repositories. I have been thinking about enabling GitHub Discussions on this repo once that features comes out of beta.

owanhunte commented 3 years ago

I'm opting to close this issue now since the Rinkeby test network limitation described is no longer the case. Smart contracts compiled by the latest Solidity compiler version and deployed to the Rinkeby test network now work without issue.

b4nghh commented 3 years ago

Hi @owanhunte Thanks so much for your work!

I still got this issue with the latest version of solc. I'm not sure if it's an issue with Rinkeby test network or not. If I use the old abi code that you provided, it works normally.