Skip to content

Commit

Permalink
👷 Rename ended to settled
Browse files Browse the repository at this point in the history
  • Loading branch information
Flocqst committed Sep 11, 2024
1 parent 4c2b6a7 commit f860c1e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Auction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ contract Auction is Ownable, Initializable {
error AuctionNotEnded();

/// @notice Thrown when trying to settle an auction that has already been settled
error AuctionEnded();
error AuctionAlreadySettled();

/// @notice Thrown when trying to lock bidding when it is already locked
error BiddingLockedErr();
Expand Down Expand Up @@ -99,8 +99,8 @@ contract Auction is Ownable, Initializable {
/// @notice Indicates if the auction has started.
bool public started;

/// @notice Indicates if the auction has ended.
bool public ended;
/// @notice Indicates if the auction has been settled.
bool public settled;

/// @notice Indicates if bidding is locked
bool public locked;
Expand Down Expand Up @@ -220,9 +220,9 @@ contract Auction is Ownable, Initializable {
function settleAuction() external {
if (!started) revert AuctionNotStarted();
if (block.timestamp < endAt) revert AuctionNotEnded();
if (ended) revert AuctionEnded();
if (settled) revert AuctionAlreadySettled();

ended = true;
settled = true;

if (highestBidder != address(0)) {
usdc.transfer(highestBidder, auctionAmount);
Expand Down

0 comments on commit f860c1e

Please sign in to comment.