Enum spl_governance::error::GovernanceError [−][src]
pub enum GovernanceError {
Show 87 variants
InvalidInstruction,
RealmAlreadyExists,
InvalidRealm,
InvalidGoverningTokenMint,
GoverningTokenOwnerMustSign,
GoverningTokenOwnerOrDelegateMustSign,
AllVotesMustBeRelinquishedToWithdrawGoverningTokens,
InvalidTokenOwnerRecordAccountAddress,
InvalidGoverningMintForTokenOwnerRecord,
InvalidRealmForTokenOwnerRecord,
InvalidProposalForProposalInstruction,
InvalidSignatoryAddress,
SignatoryAlreadySignedOff,
SignatoryMustSign,
InvalidProposalOwnerAccount,
InvalidProposalForVoterRecord,
InvalidGoverningTokenOwnerForVoteRecord,
InvalidVoteThresholdPercentage,
ProposalAlreadyExists,
VoteAlreadyExists,
NotEnoughTokensToCreateProposal,
InvalidStateCannotEditSignatories,
InvalidProposalState,
InvalidStateCannotEditInstructions,
InvalidStateCannotExecuteInstruction,
CannotExecuteInstructionWithinHoldUpTime,
InstructionAlreadyExecuted,
InvalidInstructionIndex,
InstructionHoldUpTimeBelowRequiredMin,
InstructionAlreadyExists,
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,
InstructionAlreadyFlaggedWithError,
InvalidRealmForGovernance,
InvalidAuthorityForRealm,
RealmHasNoAuthority,
RealmAuthorityMustSign,
InvalidGoverningTokenHoldingAccount,
RealmCouncilMintChangeIsNotSupported,
MintMaxVoteWeightSourceNotSupported,
InvalidMaxVoteWeightSupplyFraction,
NotEnoughTokensToCreateGovernance,
TooManyOutstandingProposals,
AllProposalsMustBeFinalisedToWithdrawGoverningTokens,
InvalidVoterWeightRecordForRealm,
InvalidVoterWeightRecordForGoverningTokenMint,
InvalidVoterWeightRecordForTokenOwner,
VoterWeightRecordExpired,
InvalidRealmConfigForRealm,
TokenOwnerRecordAlreadyExists,
GoverningTokenDepositsNotAllowed,
InvalidVoteChoiceWeightPercentage,
VoteTypeNotSupported,
InvalidProposalOptions,
ProposalIsNotExecutable,
InvalidVote,
CannotExecuteDefeatedOption,
}
Expand description
Errors that may be returned by the Governance program
Variants
Invalid instruction passed to program
Realm with the given name and governing mints already exists
Invalid Realm
Invalid Governing Token Mint
Governing Token Owner must sign transaction
Governing Token Owner or Delegate must sign transaction
All votes must be relinquished to withdraw governing tokens
Invalid Token Owner Record account address
Invalid GoverningMint for TokenOwnerRecord
Invalid Realm for TokenOwnerRecord
Invalid Proposal for ProposalInstruction
Invalid Signatory account address
Signatory already signed off
Signatory must sign
Invalid Proposal Owner
Invalid Proposal for VoterRecord
Invalid GoverningTokenOwner for VoteRecord
Invalid Governance config: Vote threshold percentage out of range“
Proposal for the given Governance, Governing Token Mint and index already exists
Token Owner already voted on the Proposal
Owner doesn’t have enough governing tokens to create Proposal
Invalid State: Can’t edit Signatories
Invalid Proposal state
Invalid State: Can’t edit instructions
Invalid State: Can’t execute instruction
Can’t execute instruction within its hold up time
Instruction already executed
Invalid Instruction index
Instruction hold up time is below the min specified by Governance
Instruction at the given index for the Proposal already exists
Invalid State: Can’t sign off
Invalid State: Can’t vote
Invalid State: Can’t finalize vote
Invalid State: Can’t cancel Proposal
Vote already relinquished
Can’t finalize vote. Voting still in progress
Proposal voting time expired
Invalid Signatory Mint
Proposal does not belong to the given Governance
Proposal does not belong to given Governing Mint“
Current mint authority must sign transaction
Invalid mint authority
Mint has no authority
–– SPL Token Tools Errors –– Invalid Token account owner
Invalid Mint account owner
Token Account is not initialized
Token Account doesn’t exist
Token account data is invalid
Token mint account data is invalid
Token Mint is not initialized
Token Mint account doesn’t exist
–– Bpf Upgradable Loader Tools Errors –– Invalid ProgramData account Address
Invalid ProgramData account data
Provided upgrade authority doesn’t match current program upgrade authority
Current program upgrade authority must sign transaction
Given program is not upgradable
Invalid token owner
Current token owner must sign transaction
Given VoteThresholdPercentageType is not supported
Given VoteWeightSource is not supported
Proposal cool off time is not supported
Governance PDA must sign
Instruction already flagged with error
Invalid Realm for Governance
Invalid Authority for Realm
Realm has no authority
Realm authority must sign
Invalid governing token holding account
Realm council mint change is not supported
Not supported mint max vote weight source
Invalid max vote weight supply fraction
Owner doesn’t have enough governing tokens to create Governance
Too many outstanding proposals
All proposals must be finalized to withdraw governing tokens
Invalid VoterWeightRecord for Realm
Invalid VoterWeightRecord for GoverningTokenMint
Invalid VoterWeightRecord for TokenOwner
VoterWeightRecord expired
Invalid RealmConfig for Realm
TokenOwnerRecord already exists
Governing token deposits not allowed
Invalid vote choice weight percentage
Vote type not supported
InvalidProposalOptions
Proposal is not not executable
Invalid vote
Cannot execute defeated option
Trait Implementations
Performs the conversion.
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
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
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
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
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
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
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
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
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
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
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
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
Converts a f32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
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
pub default fn example() -> T
Mutably borrows from an owned value. Read more