Enum spl_governance::error::GovernanceError[][src]

pub enum GovernanceError {
Show 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, InvalidAccountOwner, AccountDoesNotExist, InvalidAccountType, InvalidGovernanceForProposal, InvalidGoverningMintForProposal, MintAuthorityMustSign, InvalidMintAuthority, MintHasNoAuthority, SplTokenAccountWithInvalidOwner, SplTokenMintWithInvalidOwner, SplTokenAccountNotInitialized, SplTokenAccountDoesNotExist, SplTokenInvalidTokenAccountData, SplTokenInvalidMintAccountData, SplTokenMintNotInitialized, SplTokenMintDoesNotExist, InvalidProgramDataAccountAddress, InvalidProgramDataAccountData, InvalidUpgradeAuthority, UpgradeAuthorityMustSign, ProgramNotUpgradable, InvalidTokenOwner, TokenOwnerMustSign, VoteThresholdPercentageTypeNotSupported, VoteWeightSourceNotSupported, ProposalCoolOffTimeNotSupported, GovernancePdaMustSign, InvalidConfigRealmForGovernance, InvalidConfigGovernedAccountForGovernance,
}
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

InvalidProposalForProposalInstruction

Invalid Proposal for ProposalInstruction

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

InvalidStateCannotEditInstructions

Invalid State: Can’t edit instructions

InvalidStateCannotExecuteInstruction

Invalid State: Can’t execute instruction

CannotExecuteInstructionWithinHoldUpTime

Can’t execute instruction within its hold up time

InstructionAlreadyExecuted

Instruction already executed

InvalidInstructionIndex

Invalid Instruction index

InstructionHoldUpTimeBelowRequiredMin

Instruction hold up time is below the min specified by Governance

InstructionAlreadyExists

Instruction 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

InvalidAccountOwner

–– Account Tools Errors –– Invalid account owner

AccountDoesNotExist

Account doesn’t exist

InvalidAccountType

Invalid Account type

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

InvalidConfigRealmForGovernance

Invalid config realm for Governance

InvalidConfigGovernedAccountForGovernance

Invalid config governed account for Governance

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

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

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.