// contracts/CD.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract CD is ERC1155, Ownable {
uint256 public constant ZARA = 0;
uint256 public constant TORO = 1;
uint256 public constant NANI = 2;
uint256 public constant JIKA = 3;
constructor() ERC1155("https://www.mydomainename/CD/{id}.json") {
_mint(msg.sender, ZARA, 1000, "");
_mint(msg.sender, TORO, 300, "");
_mint(msg.sender, NANI, 2000, "");
_mint(msg.sender, JIKA, 50, "");
}
function uri(uint256 _tokenId) override public pure returns (string memory) {
return string(
abi.encodePacked(
"https://www.mydomainename/CD/",
Strings.toString(_tokenId),
".json"
)
);
}
}