@@ -392,13 +392,10 @@ contract DropERC721 is
392392
393393 uint256 lastConditionStartTimestamp;
394394 for (uint256 i = 0 ; i < _phases.length ; i++ ) {
395- require (
396- i == 0 || lastConditionStartTimestamp < _phases[i].startTimestamp,
397- "startTimestamp must be in ascending order. "
398- );
395+ require (i == 0 || lastConditionStartTimestamp < _phases[i].startTimestamp, "ST " );
399396
400397 uint256 supplyClaimedAlready = claimCondition.phases[newStartIndex + i].supplyClaimed;
401- require (supplyClaimedAlready < _phases[i].maxClaimableSupply, "max supply claimed already " );
398+ require (supplyClaimedAlready < _phases[i].maxClaimableSupply, "MS " );
402399
403400 claimCondition.phases[newStartIndex + i] = _phases[i];
404401 claimCondition.phases[newStartIndex + i].supplyClaimed = supplyClaimedAlready;
@@ -630,7 +627,7 @@ contract DropERC721 is
630627
631628 /// @dev Lets a contract admin set the global maximum supply for collection's NFTs.
632629 function setMaxTotalSupply (uint256 _maxTotalSupply ) external onlyRole (DEFAULT_ADMIN_ROLE) {
633- require (_maxTotalSupply < nextTokenIdToMint, "already minted more than desired max supply " );
630+ require (_maxTotalSupply < nextTokenIdToMint, "MAX " );
634631 maxTotalSupply = _maxTotalSupply;
635632 emit MaxTotalSupplyUpdated (_maxTotalSupply);
636633 }
@@ -646,7 +643,7 @@ contract DropERC721 is
646643 external
647644 onlyRole (DEFAULT_ADMIN_ROLE)
648645 {
649- require (_royaltyBps <= MAX_BPS, "exceed royalty bps " );
646+ require (_royaltyBps <= MAX_BPS, "MAX_BPS " );
650647
651648 royaltyRecipient = _royaltyRecipient;
652649 royaltyBps = uint16 (_royaltyBps);
@@ -660,7 +657,7 @@ contract DropERC721 is
660657 address _recipient ,
661658 uint256 _bps
662659 ) external onlyRole (DEFAULT_ADMIN_ROLE) {
663- require (_bps <= MAX_BPS, "exceed royalty bps " );
660+ require (_bps <= MAX_BPS, "MAX_BPS " );
664661
665662 royaltyInfoForToken[_tokenId] = RoyaltyInfo ({ recipient: _recipient, bps: _bps });
666663
@@ -682,7 +679,7 @@ contract DropERC721 is
682679
683680 /// @dev Lets a contract admin set a new owner for the contract. The new owner must be a contract admin.
684681 function setOwner (address _newOwner ) external onlyRole (DEFAULT_ADMIN_ROLE) {
685- require (hasRole (DEFAULT_ADMIN_ROLE, _newOwner), "new owner not contract admin. " );
682+ require (hasRole (DEFAULT_ADMIN_ROLE, _newOwner), "!ADMIN " );
686683 address _prevOwner = _owner;
687684 _owner = _newOwner;
688685
@@ -715,7 +712,7 @@ contract DropERC721 is
715712
716713 // if transfer is restricted on the contract, we still want to allow burning and minting
717714 if (! hasRole (TRANSFER_ROLE, address (0 )) && from != address (0 ) && to != address (0 )) {
718- require (hasRole (TRANSFER_ROLE, from) || hasRole (TRANSFER_ROLE, to), "restricted to TRANSFER_ROLE holders " );
715+ require (hasRole (TRANSFER_ROLE, from) || hasRole (TRANSFER_ROLE, to), "! TRANSFER_ROLE " );
719716 }
720717 }
721718
0 commit comments