From 5557b2a79704415466f82e02d1fdbf803863cb65 Mon Sep 17 00:00:00 2001 From: AutoPR Date: Sun, 30 Apr 2023 18:39:36 +0000 Subject: [PATCH] Modify onlyOwner access modifier for reduceMaxSupply function --- ERC721CommunityBase.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ERC721CommunityBase.sol b/ERC721CommunityBase.sol index dc7eef2b..dd4492b8 100644 --- a/ERC721CommunityBase.sol +++ b/ERC721CommunityBase.sol @@ -44,6 +44,10 @@ contract ERC721CommunityBase is Context, Ownable, ERC721Enumerable, ERC721URISto require(newMaxSupply >= _totalMinted, "ERC721CommunityBase: New max supply is less than total minted"); _maxSupply = newMaxSupply; } + require(newMaxSupply <= _maxSupply, "ERC721CommunityBase: New max supply is greater than current max supply"); + require(newMaxSupply >= _totalMinted, "ERC721CommunityBase: New max supply is less than total minted"); + _maxSupply = newMaxSupply; + } // Overriden functions from OpenZeppelin's ERC721