Enum spl_governance::error::GovernanceError
source · [−]pub enum GovernanceError {
Show 95 variants
InvalidInstruction,
RealmAlreadyExists,
InvalidRealm,
InvalidGoverningTokenMint,
GoverningTokenOwnerMustSign,
GoverningTokenOwnerOrDelegateMustSign,
AllVotesMustBeRelinquishedToWithdrawGoverningTokens,
InvalidTokenOwnerRecordAccountAddress,
InvalidGoverningMintForTokenOwnerRecord,
InvalidRealmForTokenOwnerRecord,
InvalidProposalForProposalTransaction,
InvalidSignatoryAddress,
SignatoryAlreadySignedOff,
SignatoryMustSign,
InvalidProposalOwnerAccount,
InvalidProposalForVoterRecord,
InvalidGoverningTokenOwnerForVoteRecord,
InvalidVoteThresholdPercentage,
ProposalAlreadyExists,
VoteAlreadyExists,
NotEnoughTokensToCreateProposal,
InvalidStateCannotEditSignatories,
InvalidProposalState,
InvalidStateCannotEditTransactions,
InvalidStateCannotExecuteTransaction,
CannotExecuteTransactionWithinHoldUpTime,
TransactionAlreadyExecuted,
InvalidTransactionIndex,
TransactionHoldUpTimeBelowRequiredMin,
TransactionAlreadyExists,
InvalidStateCannotSignOff,
InvalidStateCannotVote,
InvalidStateCannotFinalize,
InvalidStateCannotCancelProposal,
VoteAlreadyRelinquished,
CannotFinalizeVotingInProgress,
ProposalVotingTimeExpired,
InvalidSignatoryMint,
InvalidGovernanceForProposal,
InvalidGoverningMintForProposal,
MintAuthorityMustSign,
InvalidMintAuthority,
MintHasNoAuthority,
SplTokenAccountWithInvalidOwner,
SplTokenMintWithInvalidOwner,
SplTokenAccountNotInitialized,
SplTokenAccountDoesNotExist,
SplTokenInvalidTokenAccountData,
SplTokenInvalidMintAccountData,
SplTokenMintNotInitialized,
SplTokenMintDoesNotExist,
InvalidProgramDataAccountAddress,
InvalidProgramDataAccountData,
InvalidUpgradeAuthority,
UpgradeAuthorityMustSign,
ProgramNotUpgradable,
InvalidTokenOwner,
TokenOwnerMustSign,
VoteThresholdPercentageTypeNotSupported,
VoteWeightSourceNotSupported,
ProposalCoolOffTimeNotSupported,
GovernancePdaMustSign,
TransactionAlreadyFlaggedWithError,
InvalidRealmForGovernance,
InvalidAuthorityForRealm,
RealmHasNoAuthority,
RealmAuthorityMustSign,
InvalidGoverningTokenHoldingAccount,
RealmCouncilMintChangeIsNotSupported,
MintMaxVoteWeightSourceNotSupported,
InvalidMaxVoteWeightSupplyFraction,
NotEnoughTokensToCreateGovernance,
TooManyOutstandingProposals,
AllProposalsMustBeFinalisedToWithdrawGoverningTokens,
InvalidVoterWeightRecordForRealm,
InvalidVoterWeightRecordForGoverningTokenMint,
InvalidVoterWeightRecordForTokenOwner,
VoterWeightRecordExpired,
InvalidRealmConfigForRealm,
TokenOwnerRecordAlreadyExists,
GoverningTokenDepositsNotAllowed,
InvalidVoteChoiceWeightPercentage,
VoteTypeNotSupported,
InvalidProposalOptions,
ProposalIsNotExecutable,
InvalidVote,
CannotExecuteDefeatedOption,
VoterWeightRecordInvalidAction,
VoterWeightRecordInvalidActionTarget,
InvalidMaxVoterWeightRecordForRealm,
InvalidMaxVoterWeightRecordForGoverningTokenMint,
MaxVoterWeightRecordExpired,
NotSupportedVoteType,
RealmConfigChangeNotAllowed,
GovernanceConfigChangeNotAllowed,
}
Expand description
Errors that may be returned by the Governance program
Variants
InvalidInstruction
Invalid instruction passed to program
RealmAlreadyExists
Realm with the given name and governing mints already exists
InvalidRealm
Invalid Realm
InvalidGoverningTokenMint
Invalid Governing Token Mint
GoverningTokenOwnerMustSign
Governing Token Owner must sign transaction
GoverningTokenOwnerOrDelegateMustSign
Governing Token Owner or Delegate must sign transaction
AllVotesMustBeRelinquishedToWithdrawGoverningTokens
All votes must be relinquished to withdraw governing tokens
InvalidTokenOwnerRecordAccountAddress
Invalid Token Owner Record account address
InvalidGoverningMintForTokenOwnerRecord
Invalid GoverningMint for TokenOwnerRecord
InvalidRealmForTokenOwnerRecord
Invalid Realm for TokenOwnerRecord
InvalidProposalForProposalTransaction
Invalid Proposal for ProposalTransaction,
InvalidSignatoryAddress
Invalid Signatory account address
SignatoryAlreadySignedOff
Signatory already signed off
SignatoryMustSign
Signatory must sign
InvalidProposalOwnerAccount
Invalid Proposal Owner
InvalidProposalForVoterRecord
Invalid Proposal for VoterRecord
InvalidGoverningTokenOwnerForVoteRecord
Invalid GoverningTokenOwner for VoteRecord
InvalidVoteThresholdPercentage
Invalid Governance config: Vote threshold percentage out of range“
ProposalAlreadyExists
Proposal for the given Governance, Governing Token Mint and index already exists
VoteAlreadyExists
Token Owner already voted on the Proposal
NotEnoughTokensToCreateProposal
Owner doesn’t have enough governing tokens to create Proposal
InvalidStateCannotEditSignatories
Invalid State: Can’t edit Signatories
InvalidProposalState
Invalid Proposal state
InvalidStateCannotEditTransactions
Invalid State: Can’t edit transactions
InvalidStateCannotExecuteTransaction
Invalid State: Can’t execute transaction
CannotExecuteTransactionWithinHoldUpTime
Can’t execute transaction within its hold up time
TransactionAlreadyExecuted
Transaction already executed
InvalidTransactionIndex
Invalid Transaction index
TransactionHoldUpTimeBelowRequiredMin
Transaction hold up time is below the min specified by Governance
TransactionAlreadyExists
Transaction at the given index for the Proposal already exists
InvalidStateCannotSignOff
Invalid State: Can’t sign off
InvalidStateCannotVote
Invalid State: Can’t vote
InvalidStateCannotFinalize
Invalid State: Can’t finalize vote
InvalidStateCannotCancelProposal
Invalid State: Can’t cancel Proposal
VoteAlreadyRelinquished
Vote already relinquished
CannotFinalizeVotingInProgress
Can’t finalize vote. Voting still in progress
ProposalVotingTimeExpired
Proposal voting time expired
InvalidSignatoryMint
Invalid Signatory Mint
InvalidGovernanceForProposal
Proposal does not belong to the given Governance
InvalidGoverningMintForProposal
Proposal does not belong to given Governing Mint“
MintAuthorityMustSign
Current mint authority must sign transaction
InvalidMintAuthority
Invalid mint authority
MintHasNoAuthority
Mint has no authority
SplTokenAccountWithInvalidOwner
–– SPL Token Tools Errors –– Invalid Token account owner
SplTokenMintWithInvalidOwner
Invalid Mint account owner
SplTokenAccountNotInitialized
Token Account is not initialized
SplTokenAccountDoesNotExist
Token Account doesn’t exist
SplTokenInvalidTokenAccountData
Token account data is invalid
SplTokenInvalidMintAccountData
Token mint account data is invalid
SplTokenMintNotInitialized
Token Mint is not initialized
SplTokenMintDoesNotExist
Token Mint account doesn’t exist
InvalidProgramDataAccountAddress
–– Bpf Upgradable Loader Tools Errors –– Invalid ProgramData account Address
InvalidProgramDataAccountData
Invalid ProgramData account data
InvalidUpgradeAuthority
Provided upgrade authority doesn’t match current program upgrade authority
UpgradeAuthorityMustSign
Current program upgrade authority must sign transaction
ProgramNotUpgradable
Given program is not upgradable
InvalidTokenOwner
Invalid token owner
TokenOwnerMustSign
Current token owner must sign transaction
VoteThresholdPercentageTypeNotSupported
Given VoteThresholdPercentageType is not supported
VoteWeightSourceNotSupported
Given VoteWeightSource is not supported
ProposalCoolOffTimeNotSupported
Proposal cool off time is not supported
GovernancePdaMustSign
Governance PDA must sign
TransactionAlreadyFlaggedWithError
Transaction already flagged with error
InvalidRealmForGovernance
Invalid Realm for Governance
InvalidAuthorityForRealm
Invalid Authority for Realm
RealmHasNoAuthority
Realm has no authority
RealmAuthorityMustSign
Realm authority must sign
InvalidGoverningTokenHoldingAccount
Invalid governing token holding account
RealmCouncilMintChangeIsNotSupported
Realm council mint change is not supported
MintMaxVoteWeightSourceNotSupported
Not supported mint max vote weight sourcef
InvalidMaxVoteWeightSupplyFraction
Invalid max vote weight supply fraction
NotEnoughTokensToCreateGovernance
Owner doesn’t have enough governing tokens to create Governance
TooManyOutstandingProposals
Too many outstanding proposals
AllProposalsMustBeFinalisedToWithdrawGoverningTokens
All proposals must be finalized to withdraw governing tokens
InvalidVoterWeightRecordForRealm
Invalid VoterWeightRecord for Realm
InvalidVoterWeightRecordForGoverningTokenMint
Invalid VoterWeightRecord for GoverningTokenMint
InvalidVoterWeightRecordForTokenOwner
Invalid VoterWeightRecord for TokenOwner
VoterWeightRecordExpired
VoterWeightRecord expired
InvalidRealmConfigForRealm
Invalid RealmConfig for Realm
TokenOwnerRecordAlreadyExists
TokenOwnerRecord already exists
GoverningTokenDepositsNotAllowed
Governing token deposits not allowed
InvalidVoteChoiceWeightPercentage
Invalid vote choice weight percentage
VoteTypeNotSupported
Vote type not supported
InvalidProposalOptions
InvalidProposalOptions
ProposalIsNotExecutable
Proposal is not not executable
InvalidVote
Invalid vote
CannotExecuteDefeatedOption
Cannot execute defeated option
VoterWeightRecordInvalidAction
VoterWeightRecord invalid action
VoterWeightRecordInvalidActionTarget
VoterWeightRecord invalid action target
InvalidMaxVoterWeightRecordForRealm
Invalid MaxVoterWeightRecord for Realm
InvalidMaxVoterWeightRecordForGoverningTokenMint
Invalid MaxVoterWeightRecord for GoverningTokenMint
MaxVoterWeightRecordExpired
MaxVoterWeightRecord expired
NotSupportedVoteType
Not supported VoteType
RealmConfigChangeNotAllowed
RealmConfig change not allowed
GovernanceConfigChangeNotAllowed
GovernanceConfig change not allowed
Trait Implementations
sourceimpl Clone for GovernanceError
impl Clone for GovernanceError
sourcefn clone(&self) -> GovernanceError
fn clone(&self) -> GovernanceError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for GovernanceError
impl Debug for GovernanceError
sourceimpl<T> DecodeError<T> for GovernanceError
impl<T> DecodeError<T> for GovernanceError
fn type_of() -> &'static str
fn decode_custom_error_to_enum(custom: u32) -> Option<E> where
E: FromPrimitive,
sourceimpl Display for GovernanceError
impl Display for GovernanceError
sourceimpl Error for GovernanceError
impl Error for GovernanceError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<GovernanceError> for ProgramError
impl From<GovernanceError> for ProgramError
sourcefn from(e: GovernanceError) -> Self
fn from(e: GovernanceError) -> Self
Performs the conversion.
sourceimpl FromPrimitive for GovernanceError
impl FromPrimitive for GovernanceError
sourcefn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
Converts an i64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
Converts an u64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
Converts an isize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
Converts an i8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
Converts an i16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
Converts an i32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
Converts an i128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
Converts a usize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
Converts an u8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
Converts an u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
Converts an u32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
Converts an u128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourceimpl PartialEq<GovernanceError> for GovernanceError
impl PartialEq<GovernanceError> for GovernanceError
sourceimpl PrintProgramError for GovernanceError
impl PrintProgramError for GovernanceError
impl Eq for GovernanceError
impl StructuralEq for GovernanceError
impl StructuralPartialEq for GovernanceError
Auto Trait Implementations
impl RefUnwindSafe for GovernanceError
impl Send for GovernanceError
impl Sync for GovernanceError
impl Unpin for GovernanceError
impl UnwindSafe for GovernanceError
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
pub default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more