forked from Ledger-Lenz/Ledgerlens-contract
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.rs
More file actions
26 lines (25 loc) · 890 Bytes
/
Copy patherrors.rs
File metadata and controls
26 lines (25 loc) · 890 Bytes
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
use soroban_sdk::contracterror;
#[contracterror]
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
#[repr(u32)]
pub enum Error {
AlreadyInitialized = 1,
NotInitialized = 2,
Unauthorized = 3,
InvalidScore = 4,
InvalidConfidence = 5,
ScoreNotFound = 6,
/// Returned when any state-mutating call is attempted while the
/// contract is paused by the admin.
ContractPaused = 7,
/// Returned when `accept_admin` or `cancel_admin_transfer` is called
/// but no transfer has been initiated.
NoPendingAdminTransfer = 8,
/// Returned when `submit_scores_batch` is called with zero entries.
EmptyBatch = 9,
/// Returned when a batch exceeds the MAX_BATCH_SIZE limit.
BatchTooLarge = 10,
/// Returned when the weighted aggregate computation in
/// `get_aggregate_score` would overflow.
ArithmeticOverflow = 11,
}