Hi
Just worked my way through the https://www.youtube.com/watch?v=tBMk1iZa85Y Ultimate NFT programming video.
Wondering now:
I want to mint 500 numered NFT’s, but with the same metadata-picture. Their only difference is their token number, so that OpenSea would display them as 500 different ones ( e.g. Apelien #1, Apelien #2, Apelien #3,…Apelien#n) instead of as 1 and the same NFT with 500 copies.
Would this be the best way to go about, or can this be done easier and more elegant?
//import ERC1155 token contract from Openzeppelin
(links)
contract NFTContract is ERC1155, Ownable {
uint256 public constant eu = 0;
uint256 public constant test =1;
constructor() ERC1155("https://epst1sikrgf5.moralishost.com/{id}.json") {
_mint(msg.sender, eu, 1, "");
_mint(msg.sender, eu, 2, "");
_mint(msg.sender, eu, ..., "");
_mint(msg.sender, eu, 500, "");
}
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);
}