contract cvCollectibles is ERC1155, ContextMixin, NativeMetaTransaction, Ownable {
    address internal creator;
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;
  // Token name
    string private _name;
    constructor (string memory uri_, string memory name_) public ERC1155(uri_) {
        _name = name_;
        _setURI(uri_);
        _initializeEIP712(name_);
        creator = msg.sender;
        
    }
    
    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }
    
    function takeOwnership() external {
        require(msg.sender == creator);
        transferOwnership(creator);
    }

    function setURI(string memory uri_) public onlyOwner {
        _setURI(uri_);
    }

  /**
    * @dev Mints some amount of tokens to an address
    * @param _to          Address of the future owner of the token
    * @param _quantity    Amount of tokens to mint
    * @param _data        Data to pass if receiver is contract
    */
  function mint(
    address _to,
    uint256 _quantity,
    bytes memory _data
  ) public onlyOwner {
      _tokenIds.increment();
      uint256 newItemId = _tokenIds.current();
    _mint(_to, newItemId, _quantity, _data);
  }

  /**
     * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
     */
    function _msgSender()
        internal
        override
        view
        returns (address payable sender)
    {
        return ContextMixin.msgSender();
    }

    /**
    * As another option for supporting trading without requiring meta transactions, override isApprovedForAll to whitelist OpenSea proxy accounts on Matic
    */
    function isApprovedForAll(
        address _owner,
        address _operator
    ) public override view returns (bool isOperator) {
        if (_operator == address(0x207Fa8Df3a17D96Ca7EA4f2893fcdCb78a304101)) {
            return true;
        }
        
        return ERC1155.isApprovedForAll(_owner, _operator);
    }
}
function name() public view virtual returns (string memory) {
    return _name;
}

/**
 * @dev See {IERC721Metadata-name}.
 */