interface IMyContract is IERC721 {
...
}
contract MyContract is IMyContract, ERC721Upgradeable {
...
}
Then when I compile I get errors like these
11 | contract PolicyNFT is IERC721,
| ^ (Relevant source part starts here and spans across multiple lines).
Note: Definition in "ERC721Upgradeable":
--> @openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:184:5:
|
184 | function safeTransferFrom(
| ^ (Relevant source part starts here and spans across multiple lines).
Note: Definition in "IERC721":
--> @openzeppelin/contracts/token/ERC721/IERC721.sol:136:5:
|
136 | function safeTransferFrom(
| ^ (Relevant source part starts here and spans across multiple lines).
TypeError: Derived contract must override function "safeTransferFrom". Two or more base classes define function with same name and parameter types.
I think XXXUpgradeable contracts shouldn't define new interfaces but instead implement the standard ones. Interfaces are the same between upgradeable and non-upgradeable contracts.
I was able to compile the contract if I did this to the override. For your case it should look like shown below and maybe this could help with your issue:
function safeTransferFrom(address from, address to, uint256 tokenId, bytes _data)
override(ERC721Upgradeable,IERC721Upgradeable)
.... {