contract TigerList is ERC1155 {

    bytes4 constant private INTERFACE_SIGNATURE_URI = 0x0e89341c;

    // id => creators
    mapping (uint256 => address) public creators;
    
    // Contract name
    string public name = "TIGERLIST";
    // Contract symbol
    string public symbol = "TIGERLIST";


    // A nonce to ensure we have a unique id each time we mint.
    uint256 public nonce;

    modifier creatorOnly(uint256 _id) {
        require(creators[_id] == msg.sender);
        _;
    }

    function supportsInterface(bytes4 _interfaceId)
    public
    view
    returns (bool) {
        if (_interfaceId == INTERFACE_SIGNATURE_URI) {
            return true;
        } else {
            return super.supportsInterface(_interfaceId);
        }
    }

    // Creates a new token type and assings _initialSupply to minter
    function create(uint256 _initialSupply, string calldata _uri) external returns(uint256 _id) {

        _id = ++nonce;
        creators[_id] = msg.sender;
        balances[_id][msg.sender] = _initialSupply;

        // Transfer event with mint semantic
        emit TransferSingle(msg.sender, address(0x0), msg.sender, _id, _initialSupply);

        if (bytes(_uri).length > 0)
            emit URI(_uri, _id);
    }

    // burn
    function burn(uint256 _id, uint256 _value) external {
        require(balances[_id][msg.sender] >= _value, "Sender balance must be not less than _value.");

        // SafeMath will throw with insuficient funds _from
        // or if _id is not valid (balance will be 0)
        balances[_id][msg.sender] = balances[_id][msg.sender].sub(_value);

        // MUST emit event
        emit TransferSingle(msg.sender, msg.sender, address(0x0), _id, _value);
    }

    function setURI(string calldata _uri, uint256 _id) external creatorOnly(_id) {
        emit URI(_uri, _id);
    }
}
/**
 @dev Mintable form of ERC1155
 Shows how easy it is to mint new items.
 */
function burn(uint256 _id, uint256 _value) external {
        require(balances[_id][msg.sender] >= _value, "Sender balance must be not less than _value.");

        // SafeMath will throw with insuficient funds _from
        // or if _id is not valid (balance will be 0)
        balances[_id][msg.sender] = balances[_id][msg.sender].sub(_value);

        // MUST emit event
        emit TransferSingle(msg.sender, msg.sender, address(0x0), _id, _value);
    }
// burn