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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/// # Errors Module
///
/// This module provides error types for contract operations.
use soroban_sdk::contracterror;
#[contracterror]
#[derive(Copy, Clone, Debug, PartialEq)]
pub enum Error {
/// Invalid number of signatures provided
InvalidSignatureCount = 1,
/// The system is not enabled
SystemNotEnabled = 2,
/// Recipient address is zero
RecipientZeroAddress = 3,
/// Fee was not paid
FeeNotPaid = 4,
/// Transaction has already been processed
TransactionAlreadyProcessed = 5,
/// Relayer is not authorized
RelayerNotAuthorized = 6,
/// Caller is not a relayer
CallerNotRelayer = 7,
/// Gas refund failed
GasRefundFailed = 8,
/// Invalid key provided
InvalidKey = 9,
/// Duplicate signer detected
DuplicateSignerDetected = 10,
/// Insufficient project signatures
InsufficientProjectSignatures = 11,
/// Insufficient chain signatures
InsufficientChainSignatures = 12,
/// Insufficient VIA signatures
InsufficientVIASignatures = 13,
/// POS (Proof of Stake) validation failed
POSValidationFailed = 14,
/// Chains and endpoints arrays have mismatched lengths
ChainsEndpointsMislength = 15,
/// Message gateway is not set
MissingMessageGateway = 16,
/// Chain endpoint is not configured
MissingChainEndpoint = 17,
/// Caller is not the gateway
CallerNotGateway = 18,
/// Gas amount exceeds maximum allowed
GasAmountExceedsMaxGasAmount = 19,
/// Gas amount is not authorized
GasAmountNotAuthorized = 20,
/// Insufficient balance
InsufficientBalance = 21,
/// Gas token contract is not set
GasTokenContractNotSet = 22,
/// Maximum fee exceeds maximum fee amount
MaxFeeExceededMaxFeeAmount = 23,
/// Fee token contract is not set
FeeTokenContractNotSet = 24,
/// Fee amount is not authorized
FeeAmountNotAuthorized = 25,
/// Invalid recipient address
InvalidRecipient = 26,
/// Invalid amount (e.g., zero or negative)
InvalidAmount = 27,
/// Amount overflow occurred
AmountOverflow = 28,
/// Sender length doesn't match expected length
SenderLengthMismatch = 29,
/// Invalid chain sender
InvalidChainSender = 30,
/// Address XDR representation is too short
AddressXDRRepresentationTooShort = 31,
/// Owner is not set
OwnerNotSet = 32,
/// Chain details not found
ChainDetailsNotFound = 33,
/// Invalid public key
InvalidPublicKey = 34,
/// Owner has already been set
OwnerAlreadySet = 35,
/// Unauthorized contract caller
UnauthorizedContractCaller = 36,
/// Unauthorized bridge caller
UnauthorizedBridgeCaller = 37,
/// Text message is too long
TextTooLong = 38,
/// Invalid XDR address format
InvalidXDRAddress = 39,
}