0

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

2 Answers 2

0

... and that you have already minted items on the contract. Try to mint at least one token and then resubmit your contract.

2
  • I tried that too but no luck. Here is the minting TX 0x9150fe6d66f0ff49592d678be11b65d212c4edf89d2b05490ce8dcd6e37d6eec Apr 18, 2022 at 12:41
  • Late on this but I checked the TX and contract. It looks like it appeared on opensea. How did you resolve this?
    – Potion
    Aug 20, 2022 at 8:21
0

We faced the same issue with the opensea saying "Please ensure that this is a valid ERC721 or ERC1155 contract deployed on Rinkeby and that you have already minted items on the contract". Try to re deploy the smart contract again and try

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.