Sorry. It will deply but none of the metadata shows on opensea. If it helps im using mumbai testnet on polygon.
It worked and all of the metadata showed on opensea when I changed it to the 64 digit hex, but will not work with the {id}
Here is the code i used from the moralis tutorial:
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 CAR = 0;
uint256 public constant moto = 1;
constructor() ERC1155("https://xxxxxxxxx.usemoralis.com/{id}.json") {
_mint(msg.sender, CAR, 1, "");
_mint(msg.sender, moto, 1, "");
}
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);
}
}