After implementing the following simple ERC721 contact, then deploying to Rinkby:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract NFT is ERC721, Ownable {
using Strings for uint256;
uint256[] private allTokens;
uint256 private tokensMinted;
uint MAX_SUPPLY;
constructor() ERC721("My-NFT", "NFT") {
tokensMinted = 0;
MAX_SUPPLY = 10000;
}
function mintNft(address receiver) external onlyOwner returns (uint256) {
require(tokensMinted < MAX_SUPPLY, "Already at max supply.");
tokensMinted = tokensMinted + 1;
allTokens.push(tokensMinted);
_mint(receiver, tokensMinted);
return tokensMinted;
}
function totalSupply() external view returns (uint256) {
return tokensMinted;
}
function _baseURI() internal pure override returns (string memory) {
return "https://REDACTED/api/v1/token/";
}
}
I received the following error from https://testnets.opensea.io/get-listed/step-two
We couldn't find this contract. Please ensure that this is a valid ERC721 or ERC1155 contract deployed on Rinkeby and that you have already minted items on the contract.
The contract is successfully deployed to Rinkby here: https://rinkeby.etherscan.io/address/0xe7129FC868858130BB3dd5B7e7Ea097894ebA0e4