Hello, Im trying to make a html NFT, i’ve done it before like here - https://opensea.io/assets/matic/0x7956584a9e97ba9c59c3f3c4cf2c688ac8d45418/0 , but this time it keeps going wrong and im not sure why, was hoping someone more experienced could find the issue.
The latest one is blank - https://opensea.io/assets/matic/0xedddd8e61ee2b317d246b404b10c11f3f2e63830/2
It might not need all the extentions im not sure, i want to make 10, each with their own preview image, html and json. maybe I’ve got the json format wrong, just lost
my remix code -
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract AurochNFT is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable, ERC721Burnable {
using Counters for Counters.Counter;
Counters.Counter public _tokenIdCounter;
constructor() ERC721("Auroch NFT", "AURV1") {}
function _baseURI() internal pure override returns (string memory) {
return "https://cloudflare-ipfs.com/ipfs/QmNbDtUPrmufk16fRxW5KXh2UngPvNxt7oRJtX7PuaPnBq/4.json";
}
function pause() public onlyOwner {
_pause();
}
function unpause() public onlyOwner {
_unpause();
}
function safeMint(address to, string memory uri) public onlyOwner {
uint256 tokenId = _tokenIdCounter.current();
_tokenIdCounter.increment();
_safeMint(to, tokenId);
_setTokenURI(tokenId, uri);
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
super._beforeTokenTransfer(from, to, tokenId);
}
// The following functions are overrides required by Solidity.
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
super._burn(tokenId);
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
return super.tokenURI(tokenId);
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
return super.supportsInterface(interfaceId);
}
}