that solidity compiling is a mess :frowning:
I’m trying hours to find out why my contracts sometime compile and sometimes not … Now I got it …
I'm using a local ganache server and the online IDE remix.ethereum.org
Want to compile that file:
pragma solidity >=0.6.12;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol";
And get this error:
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/GSN/Context.sol:1:1: ParserError: Source file requires different compiler version (current compiler is 0.6.12+commit.27d51765.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version pragma solidity ^0.5.0; ^---------------------^
When I look into the Context.sol (clicking in remix on the error popup):
pragma solidity ^0.5.0;
At github (following the inport link) is it the version:
pragma solidity >=0.6.0 <0.8.0;
Shouldn’t my import import the .sol from its own path? What is going on? Is it possible to “refresh” the compiled files in remix after deploying? - I guess thats the point, because I have another contract that use the older version.
Thanks hope for help :D
EDIT Okay I found out that it doesn't happened when I use the remix with firefox instead of using it with chrome. There is also a libary "github" where openzeppelin is inside, with all the contracts that I import (only that one) but not at the local directory...