I am receiving a “Derived contract must override function” error on both _beforeTokenTransfer & supportsInterface when using upgradeable contracts. I understand the root cause of the error, the functions being defined in both ERC721Upgradeable.sol and ERC721EnumerableUpgradeable.sol. However, since I have added the lines __ERC721XXX_init_unchained() as found below in my Initialize function, I thought this should be sufficient to avoid the error. Isn’t this the case?
contract CryptoAstres is Initializable, ERC721Upgradeable, ERC721PausableUpgradeable, OwnableUpgradeable,
ReentrancyGuardUpgradeable, ERC721EnumerableUpgradeable {
function initialize() public initializer {
__ERC721_init_unchained("Token", "TOK");
__ERC721Pausable_init_unchained();
__Ownable_init_unchained();
__ReentrancyGuard_init_unchained();
__ERC721Enumerable_init_unchained();
}
Ubuntu 20.04
Thank you. J