@@ -32,7 +32,6 @@ import "./extension/PlatformFee.sol";
32
32
import "./extension/Royalty.sol " ;
33
33
import "./extension/PrimarySale.sol " ;
34
34
import "./extension/Ownable.sol " ;
35
- import "./extension/DelayedReveal.sol " ;
36
35
import "./extension/SharedMetadata.sol " ;
37
36
import "./extension/PermissionsEnumerable.sol " ;
38
37
import "./extension/Drop.sol " ;
@@ -63,7 +62,7 @@ contract OpenEditionERC721 is
63
62
64
63
/// @dev Only transfers to or from TRANSFER_ROLE holders are valid, when transfers are restricted.
65
64
bytes32 private transferRole;
66
- /// @dev Only MINTER_ROLE holders can sign off on `MintRequest`s and lazy mint tokens.
65
+ /// @dev Only MINTER_ROLE holders can update the shared metadata of tokens.
67
66
bytes32 private minterRole;
68
67
69
68
/// @dev Max bps in the thirdweb system.
@@ -158,13 +157,16 @@ contract OpenEditionERC721 is
158
157
}
159
158
160
159
uint256 totalPrice = _quantityToClaim * _pricePerToken;
161
- address saleRecipient = _primarySaleRecipient == address (0 ) ? primarySaleRecipient () : _primarySaleRecipient;
162
160
161
+ bool validMsgValue;
163
162
if (_currency == CurrencyTransferLib.NATIVE_TOKEN) {
164
- if ( msg .value != totalPrice) {
165
- revert ( " !Price " );
166
- }
163
+ validMsgValue = msg .value == totalPrice;
164
+ } else {
165
+ validMsgValue = msg . value == 0 ;
167
166
}
167
+ require (validMsgValue, "!V " );
168
+
169
+ address saleRecipient = _primarySaleRecipient == address (0 ) ? primarySaleRecipient () : _primarySaleRecipient;
168
170
169
171
uint256 fees;
170
172
address feeRecipient;
@@ -178,7 +180,7 @@ contract OpenEditionERC721 is
178
180
fees = (totalPrice * platformFeeBps) / MAX_BPS;
179
181
}
180
182
181
- require (totalPrice >= fees, "Price < fees " );
183
+ require (totalPrice >= fees, "!F " );
182
184
183
185
CurrencyTransferLib.transferCurrency (_currency, _msgSender (), feeRecipient, fees);
184
186
CurrencyTransferLib.transferCurrency (_currency, _msgSender (), saleRecipient, totalPrice - fees);
@@ -224,7 +226,7 @@ contract OpenEditionERC721 is
224
226
return hasRole (DEFAULT_ADMIN_ROLE, _msgSender ());
225
227
}
226
228
227
- /// @dev Returns whether lazy minting can be done in the given execution context.
229
+ /// @dev Returns whether the shared metadata of tokens can be set in the given execution context.
228
230
function _canSetSharedMetadata () internal view virtual override returns (bool ) {
229
231
return hasRole (minterRole, _msgSender ());
230
232
}
0 commit comments