npm install @openzeppelin/contracts → only installs pragma solidity ^0.5.0 so I end up with an error
These files import other files that use a different and incompatible version of Solidity:
** contracts/GLDToken.sol (^0.8.0) imports @openzeppelin/contracts/token/ERC20/ERC20.sol (^0.5.0)**
npm install @openzeppelin/contracts@solc-0.7 → doesn’t work, error ‘No matching version found for @openzeppelin/contracts@solc-0.7’
I think when you ran npm install @openzeppelin/contracts, it will install the latest version, and the latest version is the 4.1.0, and it use the solidity version is 0.8.x, I just had a try, it worked well:
and if you want to install the solidity version of 0.7.x, I think you should run npm i @openzeppelin/contracts@3.4.1-solc-0.7-2 or npm i @openzeppelin/contracts@3.4.1
Hi, thanks for your feedback, maybe I was not explicit enough, but in the tutorial link you will see you can create your own token with Solidity 0.8.
When I do that I get the error below: