forked from Movalabs-crew/mova-store
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.rs
More file actions
21 lines (20 loc) · 752 Bytes
/
Copy patherrors.rs
File metadata and controls
21 lines (20 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use soroban_sdk::contracterror;
#[contracterror]
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
#[repr(u32)]
pub enum Error {
/// Contract has not been initialized with a merchant yet.
NotInitialized = 1,
/// Contract has already been initialized.
AlreadyInitialized = 2,
/// Amount must be a positive integer number of token units.
InvalidAmount = 3,
/// This order has already received funds (paid, shipped, or refunded).
OrderAlreadyPaid = 4,
/// The token contract is not on the merchant's approved list.
TokenNotAllowed = 5,
/// No order exists for the given order id.
OrderNotFound = 6,
/// The order is not in a state that allows this transition.
InvalidOrderStatus = 7,
}