forked from Creditra/Creditra-Contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.rs
More file actions
41 lines (39 loc) · 1.58 KB
/
Copy patherrors.rs
File metadata and controls
41 lines (39 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Auction contract error codes.
//!
//! # Stability
//! Discriminants are part of the contract ABI. Existing variants must not be
//! reordered or renumbered; new variants must be appended at the end.
use soroban_sdk::contracterror;
#[contracterror]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[repr(u32)]
pub enum AuctionError {
/// Caller is not the winning bidder for the auction being claimed.
NotWinner = 1,
/// The winning bidder has already claimed the auction proceeds.
AlreadyClaimed = 2,
/// Operation requires the auction to be in the `Closed` state.
NotClosed = 3,
/// The credit / factory contract address has not been configured.
NoFactoryContract = 4,
/// Caller is not authorized to perform this admin-only operation.
Unauthorized = 5,
/// Auction is in a state incompatible with the requested operation.
InvalidState = 6,
/// Submitted bid does not meet the minimum next-bid threshold.
BidTooLow = 7,
/// Operation requires the auction to be in the `Open` state.
AuctionNotOpen = 8,
/// Operation requires the auction to be in the `Closed` state (settlement).
AuctionNotClosed = 9,
/// Reentrant call detected through the reentrancy guard.
Reentrancy = 10,
/// Auction closed without a valid winning bid.
NoWinner = 11,
/// Auction with the requested id was not found.
NotFound = 12,
/// `settle_default_liquidation` was called a second time for the same auction.
AlreadySettled = 13,
/// The liquidation grace window has not yet elapsed; bidding is blocked.
GracePeriodActive = 14,
}