I have imported openzeppelin's ERC20 contract into my own contract like the following,
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.13;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract GLDToken is ERC20 {
constructor(uint256 initialSupply) ERC20("Gold", "GLD") {
_mint(msg.sender, initialSupply);
}
}
The used slither analyzer tool to validate the above contract. I am getting the following output,
Different versions of Solidity is used:
- Version used: ['0.8.13', '^0.8.0']
- 0.8.13 (contracts/GLDToken.sol#3)
- ^0.8.0 (node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol#4)
- ^0.8.0 (node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol#4)
- ^0.8.0 (node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol#4)
- ^0.8.0 (node_modules/@openzeppelin/contracts/utils/Context.sol#4)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#different-pragma-directives-are-used
From the above statments I am having the following doubts,
- Can we use different solidity version?
- How to use latest solidity version when using openzeppelin? Because highest version in openzeppelin is 0.8.0