We have created a contract by inheriting ERC721Burnable, Ownable contract from openzepplin. The compiler version we are using in our smart contract is 0.6.0. I flattened the smart-contract by using truffle-flattener into one single .sol file, but i am getting an error while i am trying to analyze our smart contract through Mythx
Error: Error compiling source with solc v0.6.0: contracts/flattened.sol:60:1: ParserError: Source file requires different compiler version (current compiler is 0.6.0+commit.26b70077.Linux.g++ - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.6.2;
^---------------------^
> command: `/home/graphicaldot/.solcx/solc-v0.6.0 --allow-paths /home/graphicaldot/Programs/python_programs/dgm-contracts-security-audit-env/dgm-contracts-security-audit --standard-json`
> return code: `0`
> stderr:
{"errors":[{"component":"general","formattedMessage":"contracts/flattened.sol:60:1: ParserError: Source file requires different compiler version (current compiler is 0.6.0+commit.26b70077.Linux.g++ - note that nightly builds are considered to be strictly less than the released version\npragma solidity ^0.6.2;\n^---------------------^\n","message":"Source file requires different compiler version (current compiler is 0.6.0+commit.26b70077.Linux.g++ - note that nightly builds are considered to be strictly less than the released version","severity":"error","sourceLocation":{"end":1971,"file":"contracts/flattened.sol","start":1948},"type":"ParserError"}],"sources":{}}
When I looked at the Openzepplin code, different smart contracts in the ERC721 folder of openzepplin master branch, have two different -0.6.0 and 0.6.2 - solidity versions.
My question is, how to solve this issue without changing the solidity version in the flattened smart contract ?