1
1
// SPDX-License-Identifier: Apache-2.0
2
+ // thirdweb Contract
3
+
2
4
pragma solidity ^ 0.8.11 ;
3
5
4
6
import "./EnglishAuctionsStorage.sol " ;
@@ -21,6 +23,9 @@ import "../../extension/plugin/ReentrancyGuardLogic.sol";
21
23
import "../../extension/plugin/PermissionsEnumerableLogic.sol " ;
22
24
import { CurrencyTransferLib } from "../../lib/CurrencyTransferLib.sol " ;
23
25
26
+ /**
27
+ * @author thirdweb.com
28
+ */
24
29
contract EnglishAuctionsLogic is IEnglishAuctions , ReentrancyGuardLogic , ERC2771ContextConsumer {
25
30
/*///////////////////////////////////////////////////////////////
26
31
Constants / Immutables
@@ -129,6 +134,7 @@ contract EnglishAuctionsLogic is IEnglishAuctions, ReentrancyGuardLogic, ERC2771
129
134
_targetAuction.endTimestamp > block .timestamp && _targetAuction.startTimestamp <= block .timestamp ,
130
135
"Marketplace: inactive auction. "
131
136
);
137
+ require (_bidAmount != 0 , "Marketplace: Bidding with zero amount. " );
132
138
133
139
Bid memory newBid = Bid ({ auctionId: _auctionId, bidder: _msgSender (), bidAmount: _bidAmount });
134
140
@@ -325,7 +331,10 @@ contract EnglishAuctionsLogic is IEnglishAuctions, ReentrancyGuardLogic, ERC2771
325
331
_params.startTimestamp + 60 minutes >= block .timestamp && _params.startTimestamp < _params.endTimestamp,
326
332
"Marketplace: invalid timestamps. "
327
333
);
328
- require (_params.buyoutBidAmount >= _params.minimumBidAmount, "Marketplace: invalid bid amounts. " );
334
+ require (
335
+ _params.buyoutBidAmount == 0 || _params.buyoutBidAmount >= _params.minimumBidAmount,
336
+ "Marketplace: invalid bid amounts. "
337
+ );
329
338
}
330
339
331
340
/// @dev Processes an incoming bid in an auction.
0 commit comments