abstract contract BaseCollectible is ERC721Enumerable, OperatorAccess {

    address public metadata;

    string private _veryBaseURI;

    event BaseUriSet(string uri);
    event MetadataSet(address registry);

    function mint(address _to, uint256 _amount) external virtual onlyOperator {
        for (uint i; i < _amount; i++) {
            _mint(_to, totalSupply());
        }
    }

    // @dev Setup base URI.
    // Permission: only owner
    function setBaseURI(string memory _uri) external onlyOwner {
        _veryBaseURI = _uri;
        emit BaseUriSet(_uri);
    }
    
    // @dev Set onchain metedata endpoint
    function setMetadata(address _registry) external onlyOwner {
        metadata = _registry;
        emit MetadataSet(_registry);
    }

    function _baseURI() internal view virtual override(ERC721) returns (string memory) {
        return _veryBaseURI;
    }
}
// Dependency file: contracts/BaseCollectible.sol
// pragma solidity >=0.8.0 <1.0.0;
// import "contracts/access/OperatorAccess.sol";
function setMetadata(address _registry) external onlyOwner {
    metadata = _registry;
    emit MetadataSet(_registry);
}

// @dev Set onchain metedata endpoint