@@ -34,10 +34,6 @@ abstract contract DropSinglePhase is IDropSinglePhase {
34
34
*/
35
35
mapping (bytes32 => TWBitMaps.BitMap) private usedAllowlistSpot;
36
36
37
- /*///////////////////////////////////////////////////////////////
38
- Errors
39
- //////////////////////////////////////////////////////////////*/
40
-
41
37
/*///////////////////////////////////////////////////////////////
42
38
Drop logic
43
39
//////////////////////////////////////////////////////////////*/
@@ -103,7 +99,7 @@ abstract contract DropSinglePhase is IDropSinglePhase {
103
99
/// @dev Lets a contract admin set claim conditions.
104
100
function setClaimConditions (ClaimCondition calldata _condition , bool _resetClaimEligibility ) external override {
105
101
if (! _canSetClaimConditions ()) {
106
- revert DropSinglePhase__NotAuthorized ( );
102
+ revert ( " Not authorized " );
107
103
}
108
104
109
105
bytes32 targetConditionId = conditionId;
@@ -115,7 +111,7 @@ abstract contract DropSinglePhase is IDropSinglePhase {
115
111
}
116
112
117
113
if (supplyClaimedAlready > _condition.maxClaimableSupply) {
118
- revert DropSinglePhase__MaxSupplyClaimedAlready (supplyClaimedAlready );
114
+ revert ( " max supply claimed already " );
119
115
}
120
116
121
117
claimCondition = ClaimCondition ({
@@ -144,40 +140,27 @@ abstract contract DropSinglePhase is IDropSinglePhase {
144
140
ClaimCondition memory currentClaimPhase = claimCondition;
145
141
146
142
if (_currency != currentClaimPhase.currency || _pricePerToken != currentClaimPhase.pricePerToken) {
147
- revert DropSinglePhase__InvalidCurrencyOrPrice (
148
- _currency,
149
- currentClaimPhase.currency,
150
- _pricePerToken,
151
- currentClaimPhase.pricePerToken
152
- );
143
+ revert ("Invalid price or currency " );
153
144
}
154
145
155
146
// If we're checking for an allowlist quantity restriction, ignore the general quantity restriction.
156
147
if (
157
148
_quantity == 0 ||
158
149
(verifyMaxQuantityPerTransaction && _quantity > currentClaimPhase.quantityLimitPerTransaction)
159
150
) {
160
- revert DropSinglePhase__InvalidQuantity ( );
151
+ revert ( " Invalid quantity " );
161
152
}
162
153
163
154
if (currentClaimPhase.supplyClaimed + _quantity > currentClaimPhase.maxClaimableSupply) {
164
- revert DropSinglePhase__ExceedMaxClaimableSupply (
165
- currentClaimPhase.supplyClaimed,
166
- currentClaimPhase.maxClaimableSupply
167
- );
155
+ revert ("exceeds max supply " );
168
156
}
169
157
170
158
(uint256 lastClaimedAt , uint256 nextValidClaimTimestamp ) = getClaimTimestamp (_claimer);
171
159
if (
172
160
currentClaimPhase.startTimestamp > block .timestamp ||
173
161
(lastClaimedAt != 0 && block .timestamp < nextValidClaimTimestamp)
174
162
) {
175
- revert DropSinglePhase__CannotClaimYet (
176
- block .timestamp ,
177
- currentClaimPhase.startTimestamp,
178
- lastClaimedAt,
179
- nextValidClaimTimestamp
180
- );
163
+ revert ("cant claim yet " );
181
164
}
182
165
}
183
166
@@ -196,15 +179,15 @@ abstract contract DropSinglePhase is IDropSinglePhase {
196
179
keccak256 (abi.encodePacked (_claimer, _allowlistProof.maxQuantityInAllowlist))
197
180
);
198
181
if (! validMerkleProof) {
199
- revert DropSinglePhase__NotInWhitelist ( );
182
+ revert ( " not in allowlist " );
200
183
}
201
184
202
185
if (usedAllowlistSpot[conditionId].get (merkleProofIndex)) {
203
- revert DropSinglePhase__ProofClaimed ( );
186
+ revert ( " proof claimed " );
204
187
}
205
188
206
189
if (_allowlistProof.maxQuantityInAllowlist != 0 && _quantity > _allowlistProof.maxQuantityInAllowlist) {
207
- revert DropSinglePhase__InvalidQuantityProof (_allowlistProof.maxQuantityInAllowlist );
190
+ revert ( " Invalid qty proof " );
208
191
}
209
192
}
210
193
}
0 commit comments