Hey folks,
I'm learning and experimenting with NFT royalties, for example, something like this:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/common/ERC2981.sol";
contract MyToken is ERC721, Ownable, ERC2981 {
constructor() ERC721("MyToken", "MTK") {}
function safeMint(address to, uint256 tokenId) public onlyOwner {
_safeMint(to, tokenId);
}
}
this does not work though, I get:
Derived contract must override function "supportsInterface". Two or more base classes define function with same name and parameter types.
What would that function look like?
Thanks!