2021-10-19 15:51:13 -07:00
|
|
|
use anchor_lang::prelude::*;
|
|
|
|
|
2022-04-25 07:23:10 -07:00
|
|
|
#[error_code]
|
|
|
|
pub enum VsrError {
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6000 / 0x1770
|
2021-10-19 15:51:13 -07:00
|
|
|
#[msg("Exchange rate must be greater than zero")]
|
2022-01-25 04:00:53 -08:00
|
|
|
InvalidRate,
|
|
|
|
// 6001 / 0x1771
|
2021-10-19 15:51:13 -07:00
|
|
|
#[msg("")]
|
|
|
|
RatesFull,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6002 / 0x1772
|
2021-10-19 15:51:13 -07:00
|
|
|
#[msg("")]
|
2022-01-25 04:00:53 -08:00
|
|
|
VotingMintNotFound,
|
|
|
|
// 6003 / 0x1773
|
2021-10-19 15:51:13 -07:00
|
|
|
#[msg("")]
|
|
|
|
DepositEntryNotFound,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6004 / 0x1774
|
2021-10-19 15:51:13 -07:00
|
|
|
#[msg("")]
|
2022-01-25 04:00:53 -08:00
|
|
|
DepositEntryFull,
|
|
|
|
// 6005 / 0x1775
|
2021-10-19 15:51:13 -07:00
|
|
|
#[msg("")]
|
|
|
|
VotingTokenNonZero,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6006 / 0x1776
|
2021-10-19 15:51:13 -07:00
|
|
|
#[msg("")]
|
2022-01-25 04:00:53 -08:00
|
|
|
OutOfBoundsDepositEntryIndex,
|
|
|
|
// 6007 / 0x1777
|
2021-10-19 15:51:13 -07:00
|
|
|
#[msg("")]
|
2022-01-25 04:00:53 -08:00
|
|
|
UnusedDepositEntryIndex,
|
|
|
|
// 6008 / 0x1778
|
2021-12-03 07:06:44 -08:00
|
|
|
#[msg("")]
|
2022-01-25 05:49:23 -08:00
|
|
|
InsufficientUnlockedTokens,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6009 / 0x1779
|
2021-10-19 15:51:13 -07:00
|
|
|
#[msg("")]
|
|
|
|
UnableToConvert,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6010 / 0x177a
|
2021-10-19 15:51:13 -07:00
|
|
|
#[msg("")]
|
|
|
|
InvalidLockupPeriod,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6011 / 0x177b
|
2021-10-19 15:51:13 -07:00
|
|
|
#[msg("")]
|
|
|
|
InvalidEndTs,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6012 / 0x177c
|
2021-10-19 15:51:13 -07:00
|
|
|
#[msg("")]
|
|
|
|
InvalidDays,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6013 / 0x177d
|
2021-10-20 12:38:47 -07:00
|
|
|
#[msg("")]
|
2021-12-03 11:36:42 -08:00
|
|
|
VotingMintConfigIndexAlreadyInUse,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6014 / 0x177e
|
2021-10-20 12:38:47 -07:00
|
|
|
#[msg("")]
|
2021-12-03 11:36:42 -08:00
|
|
|
OutOfBoundsVotingMintConfigIndex,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6015 / 0x177f
|
2021-10-23 16:05:21 -07:00
|
|
|
#[msg("Exchange rate decimals cannot be larger than registrar decimals")]
|
|
|
|
InvalidDecimals,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6016 / 0x1780
|
2021-11-27 00:14:41 -08:00
|
|
|
#[msg("")]
|
|
|
|
InvalidToDepositAndWithdrawInOneSlot,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6017 / 0x1781
|
2021-11-27 00:21:58 -08:00
|
|
|
#[msg("")]
|
2021-12-05 00:53:34 -08:00
|
|
|
ShouldBeTheFirstIxInATx,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6018 / 0x1782
|
2021-12-05 00:53:34 -08:00
|
|
|
#[msg("")]
|
2021-11-27 00:21:58 -08:00
|
|
|
ForbiddenCpi,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6019 / 0x1783
|
2021-11-27 00:26:33 -08:00
|
|
|
#[msg("")]
|
|
|
|
InvalidMint,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6020 / 0x1784
|
2021-11-29 06:56:45 -08:00
|
|
|
#[msg("")]
|
|
|
|
DebugInstruction,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6021 / 0x1785
|
2021-12-01 01:20:39 -08:00
|
|
|
#[msg("")]
|
2022-01-25 04:00:53 -08:00
|
|
|
ClawbackNotAllowedOnDeposit,
|
|
|
|
// 6022 / 0x1786
|
2021-12-01 02:42:08 -08:00
|
|
|
#[msg("")]
|
2022-01-25 04:00:53 -08:00
|
|
|
DepositStillLocked,
|
|
|
|
// 6023 / 0x1787
|
2021-12-01 03:03:38 -08:00
|
|
|
#[msg("")]
|
2022-01-25 04:00:53 -08:00
|
|
|
InvalidAuthority,
|
|
|
|
// 6024 / 0x1788
|
2021-12-01 03:25:15 -08:00
|
|
|
#[msg("")]
|
2021-12-01 00:10:59 -08:00
|
|
|
InvalidTokenOwnerRecord,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6025 / 0x1789
|
2021-12-01 00:29:07 -08:00
|
|
|
#[msg("")]
|
|
|
|
InvalidRealmAuthority,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6026 / 0x178a
|
2021-12-09 02:58:15 -08:00
|
|
|
#[msg("")]
|
|
|
|
VoterWeightOverflow,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6027 / 0x178b
|
2021-12-09 02:58:15 -08:00
|
|
|
#[msg("")]
|
|
|
|
LockupSaturationMustBePositive,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6028 / 0x178c
|
2021-12-09 07:39:06 -08:00
|
|
|
#[msg("")]
|
|
|
|
VotingMintConfiguredWithDifferentIndex,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6029 / 0x178d
|
2021-12-10 07:14:10 -08:00
|
|
|
#[msg("")]
|
|
|
|
InternalProgramError,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6030 / 0x178e
|
2021-12-10 03:46:45 -08:00
|
|
|
#[msg("")]
|
|
|
|
InsufficientLockedTokens,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6031 / 0x178f
|
2021-12-10 03:46:45 -08:00
|
|
|
#[msg("")]
|
|
|
|
MustKeepTokensLocked,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6032 / 0x1790
|
2021-12-10 03:46:45 -08:00
|
|
|
#[msg("")]
|
|
|
|
InvalidLockupKind,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6033 / 0x1791
|
2021-12-10 03:46:45 -08:00
|
|
|
#[msg("")]
|
|
|
|
InvalidChangeToClawbackDepositEntry,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6034 / 0x1792
|
2022-01-20 23:15:33 -08:00
|
|
|
#[msg("")]
|
|
|
|
InternalErrorBadLockupVoteWeight,
|
2022-01-25 04:00:53 -08:00
|
|
|
// 6035 / 0x1793
|
2022-01-20 23:15:33 -08:00
|
|
|
#[msg("")]
|
|
|
|
DepositStartTooFarInFuture,
|
2022-01-25 05:56:15 -08:00
|
|
|
// 6036 / 0x1794
|
|
|
|
#[msg("")]
|
|
|
|
VaultTokenNonZero,
|
2022-03-09 01:08:12 -08:00
|
|
|
// 6037 / 0x1795
|
|
|
|
#[msg("")]
|
|
|
|
InvalidTimestampArguments,
|
2021-10-19 15:51:13 -07:00
|
|
|
}
|