Skip to content

Commit

Permalink
prevent treasury to mint over total supply
Browse files Browse the repository at this point in the history
  • Loading branch information
FredCoen committed May 6, 2022
1 parent 750b60d commit 823a8ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ERC721CryptoTesters.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ contract ERC721CryptoTesters is ERC721, Controller {
uint256 public constant mintPrice = 0.3 ether;
uint256 public currentTokenId;

mapping(address => bool) whitelistClaimed;
mapping(address => bool) public whitelistClaimed;

/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
Expand All @@ -39,7 +39,7 @@ contract ERC721CryptoTesters is ERC721, Controller {

/// @dev Approx. 4 million gas well below block limit
function preMintForTreasury() public onlyOwner {
require(currentTokenId < totalSupply, "Max supply reached");
require(currentTokenId + 150 <= totalSupply, "Max supply reached");
for (uint id = 0; id < 150; id++) {
uint256 newTokenId = ++currentTokenId;
_safeMint(msg.sender, newTokenId);
Expand Down

0 comments on commit 823a8ac

Please sign in to comment.