Given the following contract:
//SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;
import "./Constants.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155HolderUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";
contract MyContract is
EIP712Upgradeable,
PausableUpgradeable,
AccessControlUpgradeable,
UUPSUpgradeable,
ERC165StorageUpgradeable,
Constants,
ERC1155HolderUpgradeable,
ReentrancyGuardUpgradeable
{
uint256 private version;
function _authorizeUpgrade(address newImplementation)
internal
virtual
override
onlyRole(Constants.UPGRADER_ROLE)
{}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC165StorageUpgradeable,
AccessControlUpgradeable,
ERC1155ReceiverUpgradeable
)
returns (bool)
{
return super.supportsInterface(interfaceId);
}
// Pauses the contract
function pause() public virtual onlyRole(Constants.PAUSER_ROLE) {
_pause();
}
// Unpauses the contract
function unpause() public virtual onlyRole(Constants.PAUSER_ROLE) {
_unpause();
}
// Overide that takes into consideration versioning
function upgradeTo(address newImplementation)
external
virtual
override
{
version++;
super.upgradeTo(newImplementation);
}
}
Why is it not able to trace down the function signature to the only contract inherited in the linearization graph (UUPSUpgradeable)? I checked and it actually allows _upgradeTo (Which comes from ERC1967UpgradeUpgradeable and actually comes from upper in inheritance). Wondering your thoughts...