Using this tutorial - https://www.youtube.com/watch?v=tBMk1iZa85Y Iāve deployed the following smart contract to Rinkeby:
pragma solidity ^0.8.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol";
contract NFTContract is ERC1155, Ownable {
uint256 public constant ARTWORK = 0;
uint256 public constant PHOTO = 1;
constructor() ERC1155("https://llx9ou26wikn.bigmoralis.com/{id}.json") {
_mint(msg.sender, ARTWORK, 1, "");
_mint(msg.sender, PHOTO, 2, "");
}
function mint(address account, uint256 id, uint256 amount) public onlyOwner {
_mint(account, id, amount, "");
}
function burn(address account, uint256 id, uint256 amount) public {
require(msg.sender == account);
_burn(account, id, amount);
}
}
Everything worked and I was able to view my NFT on Opensea with image and metadata. Iāve tried to deploy the same contract to Polygon Mumbai, and the NFT is visible on Opensea, but thereās no metadata - https://testnets.opensea.io/assets/mumbai/0x60cfcd3a1c9c9b0290090d784024d24b14b3ffc3/1
What could be the reason? Itās the same smart contract.