contract PeaceDove is ERC721A("PeaceDove", "PD"), Ownable, ReentrancyGuard {
    using Strings for uint256;

    address private immutable _dev;

    string public baseURI = "https://www.peacedao.space/api/metadata/";

    constructor() {
        _dev = _msgSender();
    }

    // ========= Business Logic =========

    function mint(uint256 quantity) public payable nonReentrant {
        require(totalSupply() + quantity <= 20000, "Max limit");
        require(msg.value >= quantity * 1e16, "Insufficient price");
        payable(_dev).transfer(msg.value);
        _safeMint(_msgSender(), quantity);
    }

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

    function exists(uint256 tokenId) public view returns (bool) {
        return _exists(tokenId);
    }

    function tokenURI(uint256 _tokenId) public view override returns (string memory) {
        require(_exists(_tokenId), "ERC721Metadata: URI query for nonexistent token");

        return string(abi.encodePacked(baseURI, _tokenId.toString()));
    }
}
// import "erc721a/contracts/ERC721A.sol";
// import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
// import "@openzeppelin/contracts/access/Ownable.sol";
// import "@openzeppelin/contracts/utils/Strings.sol";
function mint(uint256 quantity) public payable nonReentrant {
    require(totalSupply() + quantity <= 20000, "Max limit");
    require(msg.value >= quantity * 1e16, "Insufficient price");
    payable(_dev).transfer(msg.value);
    _safeMint(_msgSender(), quantity);
}

// ========= Business Logic =========