forked from Haroldwonder/TrustLink
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.rs
More file actions
93 lines (91 loc) · 3.56 KB
/
Copy patherrors.rs
File metadata and controls
93 lines (91 loc) · 3.56 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
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
88
89
90
91
92
93
//! Error definitions for TrustLink.
//!
//! All contract error codes are defined here and re-exported from the crate root.
use soroban_sdk::contracterror;
#[contracterror]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum Error {
AlreadyInitialized = 1,
NotInitialized = 2,
/// Caller lacks required permissions. Includes rejection when `issuer` equals `subject` in `create_attestation`.
Unauthorized = 3,
NotFound = 4,
DuplicateAttestation = 5,
AlreadyRevoked = 6,
Expired = 7,
InvalidValidFrom = 8,
InvalidExpiration = 9,
MetadataTooLong = 10,
/// Source reference string is missing or empty.
InvalidSourceReference = 44,
InvalidTimestamp = 11,
InvalidFee = 12,
FeeTokenRequired = 13,
TooManyTags = 14,
TagTooLong = 15,
/// Threshold must be >= 1 and <= number of required signers.
InvalidThreshold = 16,
/// The signer is not in the proposal's required_signers list.
NotRequiredSigner = 17,
/// The signer has already co-signed this proposal.
AlreadySigned = 18,
/// The proposal has already been finalized.
ProposalFinalized = 19,
/// The proposal has expired without reaching threshold.
ProposalExpired = 20,
/// The revocation reason exceeds the maximum allowed length of 128 characters.
ReasonTooLong = 21,
/// Endorser cannot endorse their own attestation.
CannotEndorseOwn = 22,
/// Endorser has already endorsed this attestation.
AlreadyEndorsed = 23,
/// The contract is paused; write operations are temporarily disabled.
ContractPaused = 24,
/// Subject is not on the issuer's whitelist and the issuer has whitelist mode enabled.
SubjectNotWhitelisted = 25,
/// Claim type string is empty, too long, or contains disallowed characters.
InvalidClaimType = 26,
/// Jurisdiction code is not a valid ISO 3166-1 alpha-2 code.
InvalidJurisdiction = 27,
/// Issuer has exceeded the minimum issuance interval (rate limit).
RateLimited = 28,
/// Storage limit exceeded for issuer or subject.
LimitExceeded = 29,
/// The proposal has been cancelled by the proposer.
ProposalCancelled = 30,
/// Dispute has already been raised for this attestation.
AlreadyDisputed = 31,
/// Metadata does not match required format or constraints.
InvalidMetadata = 32,
/// Constraint violation for claim type.
ConstraintViolation = 33,
/// Request has already been processed.
RequestAlreadyProcessed = 34,
/// Request has expired.
RequestExpired = 35,
/// Duplicate request.
DuplicateRequest = 36,
/// Council proposal has already been executed.
CouncilProposalExecuted = 37,
/// Timelock period has not elapsed yet.
TimelockNotReady = 38,
/// Attestation is not disputed.
NotDisputed = 39,
/// Cannot remove the last admin.
LastAdminCannotBeRemoved = 40,
/// Invalid fee token.
InvalidFeeToken = 41,
/// Cannot delegate to self.
CannotDelegateToSelf = 42,
/// Already approved.
AlreadyApproved = 43,
/// `chunk_size` passed to `set_chunk_size` is 0 or otherwise out of range.
InvalidChunkSize = 45,
/// Claim type is not in the registry when registration is required.
NotRegisteredClaimType = 46,
/// The caller's `expected_version` argument does not match the contract's
/// currently deployed version, as returned by `get_version()`. Returned
/// by state-changing entry points that opt into the version-guard
/// pattern documented on [`crate::validation::Validation::require_version_match`].
VersionMismatch = 47,
}