Code to reproduce
pragma solidity = 0.5.16;
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract Token1 is ERC20Detailed,ERC20{
constructor() ERC20Detailed('Token 1','TK1',18) public{}
}
Environment
I am using solidity version 0.5.16. I have installed openzeppelin version 2.5.1. The error says that the openzeppelin contracts cant be imported. Later I found that it was because of the solidity version issue.
When I changed the solidity version this error disappears and everything is working well. But since I am using some other smart contracts written in solidity version 0.5.16, I cant change the version now.
What are the options I have to get this code to work. I am using Truffle.
Thanks for the help