contract ERC721InitMint is
    Context,
    ERC721Initializable,
    Ownable
{
    string private _baseTokenURI;
    uint256 private _totalSupply;
    string public provenance;
    bool public provlock;
    mapping(address => bool) public minter;

    /**
     * @dev Grants `DEFAULT_ADMIN_ROLE` to the
     * account that deploys the contract.
     *
     * Token URIs will be autogenerated based on `baseURI` and their token IDs.
     * See {ERC721-tokenURI}.
     */
    constructor() {
    }

    function setMinter(address addr, bool active)public onlyOwner {
        minter[addr] = active;
    }

    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    function setBaseURI(string memory baseURI) public onlyOwner {
        _baseTokenURI = baseURI;
    }

    function setProvenance(string memory prov) public onlyOwner {
        require(provlock == false);
        provlock = true;
        provenance = prov;
    }

    function _baseURI() internal view virtual override returns (string memory) {
        return _baseTokenURI;
    }

    /**
     * @dev Creates a new token for `to`. Its token ID will be automatically
     * assigned (and available on the emitted {IERC721-Transfer} event), and the token
     * URI autogenerated based on the base URI passed at construction.
     *
     * See {ERC721-_mint}.
     *
     * Requirements:
     *
     * - the caller must have the `MINTER_ROLE`.
     */
    function mint(address to, uint id) public virtual {
        require(minter[_msgSender()], "ERC721InitMint: must have minter role to mint");
        _totalSupply += 1;
        _mint(to, id);
    }
}
/**
 * @dev {ERC721} token, including:
 *
 *  - a minter role that allows for token minting (creation)
 *
 * This contract uses {AccessControl} to lock permissioned functions using the
 * different roles - head to its documentation for details.
 *
 * The account that deploys the contract will be granted the default admin
 * role, which will let it grant minter roles to other accounts.
 */
function mint(address to, uint id) public virtual {
    require(minter[_msgSender()], "ERC721InitMint: must have minter role to mint");
    _totalSupply += 1;
    _mint(to, id);
}

/**
 * @dev Creates a new token for `to`. Its token ID will be automatically
 * assigned (and available on the emitted {IERC721-Transfer} event), and the token
 * URI autogenerated based on the base URI passed at construction.
 *
 * See {ERC721-_mint}.
 *
 * Requirements:
 *
 * - the caller must have the `MINTER_ROLE`.
 */