fix setMaxSupply to check total minted
This commit is contained in:
parent
986bbaab00
commit
4ad6d1ea22
|
@ -68,8 +68,10 @@ abstract contract BaseToken is Context, ERC721Enumerable, CommunityOwnable {
|
|||
|
||||
// External functions
|
||||
|
||||
function setMaxSupply(uint256 newMaxSupply) external virtual onlyCommunityOwnerOrTokenMaster {
|
||||
if (newMaxSupply < totalSupply()) {
|
||||
function setMaxSupply(
|
||||
uint256 newMaxSupply
|
||||
) external virtual onlyCommunityOwnerOrTokenMaster {
|
||||
if (newMaxSupply < mintedCount()) {
|
||||
revert BaseToken_MaxSupplyLowerThanTotalSupply();
|
||||
}
|
||||
maxSupply = newMaxSupply;
|
||||
|
|
Loading…
Reference in New Issue