squads_multisig_program/
errors.rs

1use anchor_lang::prelude::*;
2
3#[error_code]
4pub enum MultisigError {
5    #[msg("Found multiple members with the same pubkey")]
6    DuplicateMember,
7    #[msg("Members array is empty")]
8    EmptyMembers,
9    #[msg("Too many members, can be up to 65535")]
10    TooManyMembers,
11    #[msg("Invalid threshold, must be between 1 and number of members with Vote permission")]
12    InvalidThreshold,
13    #[msg("Attempted to perform an unauthorized action")]
14    Unauthorized,
15    #[msg("Provided pubkey is not a member of multisig")]
16    NotAMember,
17    #[msg("TransactionMessage is malformed.")]
18    InvalidTransactionMessage,
19    #[msg("Proposal is stale")]
20    StaleProposal,
21    #[msg("Invalid proposal status")]
22    InvalidProposalStatus,
23    #[msg("Invalid transaction index")]
24    InvalidTransactionIndex,
25    #[msg("Member already approved the transaction")]
26    AlreadyApproved,
27    #[msg("Member already rejected the transaction")]
28    AlreadyRejected,
29    #[msg("Member already cancelled the transaction")]
30    AlreadyCancelled,
31    #[msg("Wrong number of accounts provided")]
32    InvalidNumberOfAccounts,
33    #[msg("Invalid account provided")]
34    InvalidAccount,
35    #[msg("Cannot remove last member")]
36    RemoveLastMember,
37    #[msg("Members don't include any voters")]
38    NoVoters,
39    #[msg("Members don't include any proposers")]
40    NoProposers,
41    #[msg("Members don't include any executors")]
42    NoExecutors,
43    #[msg("`stale_transaction_index` must be <= `transaction_index`")]
44    InvalidStaleTransactionIndex,
45    #[msg("Instruction not supported for controlled multisig")]
46    NotSupportedForControlled,
47    #[msg("Proposal time lock has not been released")]
48    TimeLockNotReleased,
49    #[msg("Config transaction must have at least one action")]
50    NoActions,
51    #[msg("Missing account")]
52    MissingAccount,
53    #[msg("Invalid mint")]
54    InvalidMint,
55    #[msg("Invalid destination")]
56    InvalidDestination,
57    #[msg("Spending limit exceeded")]
58    SpendingLimitExceeded,
59    #[msg("Decimals don't match the mint")]
60    DecimalsMismatch,
61    #[msg("Member has unknown permission")]
62    UnknownPermission,
63    #[msg("Account is protected, it cannot be passed into a CPI as writable")]
64    ProtectedAccount,
65    #[msg("Time lock exceeds the maximum allowed (90 days)")]
66    TimeLockExceedsMaxAllowed,
67    #[msg("Account is not owned by Multisig program")]
68    IllegalAccountOwner,
69    #[msg("Rent reclamation is disabled for this multisig")]
70    RentReclamationDisabled,
71    #[msg("Invalid rent collector address")]
72    InvalidRentCollector,
73    #[msg("Proposal is for another multisig")]
74    ProposalForAnotherMultisig,
75    #[msg("Transaction is for another multisig")]
76    TransactionForAnotherMultisig,
77    #[msg("Transaction doesn't match proposal")]
78    TransactionNotMatchingProposal,
79    #[msg("Transaction is not last in batch")]
80    TransactionNotLastInBatch,
81    #[msg("Batch is not empty")]
82    BatchNotEmpty,
83    #[msg("Invalid SpendingLimit amount")]
84    SpendingLimitInvalidAmount,
85}