-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy patherror.rs
More file actions
97 lines (96 loc) · 4.05 KB
/
error.rs
File metadata and controls
97 lines (96 loc) · 4.05 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
94
95
96
97
use super::*;
#[error_code]
pub enum FutarchyError {
#[msg("Amms must have been created within 5 minutes (counted in slots) of proposal initialization")]
AmmTooOld,
#[msg("An amm has an `initial_observation` that doesn't match the `dao`'s config")]
InvalidInitialObservation,
#[msg(
"An amm has a `max_observation_change_per_update` that doesn't match the `dao`'s config"
)]
InvalidMaxObservationChange,
#[msg("An amm has a `start_delay_slots` that doesn't match the `dao`'s config")]
InvalidStartDelaySlots,
#[msg("One of the vaults has an invalid `settlement_authority`")]
InvalidSettlementAuthority,
#[msg("Proposal is too young to be executed or rejected")]
ProposalTooYoung,
#[msg("Markets too young for proposal to be finalized. TWAP might need to be cranked")]
MarketsTooYoung,
#[msg("This proposal has already been finalized")]
ProposalAlreadyFinalized,
#[msg("A conditional vault has an invalid nonce. A nonce should encode the proposal number")]
InvalidVaultNonce,
#[msg("This proposal can't be executed because it isn't in the passed state")]
ProposalNotPassed,
#[msg("More liquidity needs to be in the AMM to launch this proposal")]
InsufficientLiquidity,
#[msg("Proposal duration must be longer 1 day and longer than 2 times the TWAP start delay")]
ProposalDurationTooShort,
#[msg("Pass threshold must be less than 10%")]
PassThresholdTooHigh,
#[msg("Question must have exactly 2 outcomes for binary futarchy")]
QuestionMustBeBinary,
#[msg("Squads proposal must be in Active status")]
InvalidSquadsProposalStatus,
#[msg("Casting overflow. If you're seeing this, please report this")]
CastingOverflow,
#[msg("Insufficient balance")]
InsufficientBalance,
#[msg("Cannot remove zero liquidity")]
ZeroLiquidityRemove,
#[msg("Swap slippage exceeded")]
SwapSlippageExceeded,
#[msg("Assert failed")]
AssertFailed,
#[msg("Invalid admin")]
InvalidAdmin,
#[msg("Proposal is not in draft state")]
ProposalNotInDraftState,
#[msg("Insufficient token balance")]
InsufficientTokenBalance,
#[msg("Invalid amount")]
InvalidAmount,
#[msg("Insufficient stake to launch proposal")]
InsufficientStakeToLaunch,
#[msg("Staker not found in proposal")]
StakerNotFound,
#[msg("Pool must be in spot state")]
PoolNotInSpotState,
#[msg("If you're providing liquidity, you must provide both base and quote token accounts")]
InvalidDaoCreateLiquidity,
#[msg("Invalid stake account")]
InvalidStakeAccount,
#[msg("An invariant was violated. You should get in contact with the MetaDAO team if you see this")]
InvariantViolated,
#[msg("Proposal needs to be active to perform a conditional swap")]
ProposalNotActive,
#[msg("This Squads transaction should only contain calls to update spending limits")]
InvalidTransaction,
#[msg("Proposal has already been sponsored")]
ProposalAlreadySponsored,
#[msg("Team sponsored pass threshold must be between -10% and 10%")]
InvalidTeamSponsoredPassThreshold,
#[msg("Target K must be greater than the current K")]
InvalidTargetK,
#[msg("Failed to compile transaction message for Squads vault transaction")]
InvalidTransactionMessage,
#[msg("Base mint and quote mint must be different")]
InvalidMint,
#[msg("Proposal is not ready to be unstaked")]
ProposalNotReadyToUnstake,
#[msg("Invalid recipient")]
InvalidRecipient,
#[msg("Optimistic governance is disabled")]
OptimisticGovernanceDisabled,
#[msg("An active optimistic proposal is already enqueued")]
ActiveOptimisticProposalAlreadyEnqueued,
#[msg("No active optimistic proposal")]
NoActiveOptimisticProposal,
#[msg("Optimistic proposal has already passed")]
OptimisticProposalAlreadyPassed,
#[msg("Team cannot sponsor a challenge to an optimistic proposal")]
CannotSponsorOptimisticProposalChallenge,
#[msg("Invalid spending limit mint. Must be the same as the DAO's quote mint")]
InvalidSpendingLimitMint,
}