pub enum StakePoolError {
Show 36 variants AlreadyInUse, InvalidProgramAddress, InvalidState, CalculationFailure, FeeTooHigh, WrongAccountMint, WrongManager, SignatureMissing, InvalidValidatorStakeList, InvalidFeeAccount, WrongPoolMint, WrongStakeState, UserStakeNotActive, ValidatorAlreadyAdded, ValidatorNotFound, InvalidStakeAccountAddress, StakeListOutOfDate, StakeListAndPoolOutOfDate, UnknownValidatorStakeAccount, WrongMintingAuthority, UnexpectedValidatorListAccountSize, WrongStaker, NonZeroPoolTokenSupply, StakeLamportsNotEqualToMinimum, IncorrectDepositVoteAddress, IncorrectWithdrawVoteAddress, InvalidMintFreezeAuthority, FeeIncreaseTooHigh, WithdrawalTooSmall, DepositTooSmall, InvalidStakeDepositAuthority, InvalidSolDepositAuthority, InvalidPreferredValidator, TransientAccountInUse, InvalidSolWithdrawAuthority, SolWithdrawalTooLarge,
}
Expand description

Errors that may be returned by the StakePool program.

Variants

AlreadyInUse

The account cannot be initialized because it is already being used.

InvalidProgramAddress

The program address provided doesn’t match the value generated by the program.

InvalidState

The stake pool state is invalid.

CalculationFailure

The calculation failed.

FeeTooHigh

Stake pool fee > 1.

WrongAccountMint

Token account is associated with the wrong mint.

WrongManager

Wrong pool manager account.

SignatureMissing

Required signature is missing.

InvalidValidatorStakeList

Invalid validator stake list account.

InvalidFeeAccount

Invalid manager fee account.

WrongPoolMint

Specified pool mint account is wrong.

WrongStakeState

Stake account is not in the state expected by the program.

UserStakeNotActive

User stake is not active

ValidatorAlreadyAdded

Stake account voting for this validator already exists in the pool.

ValidatorNotFound

Stake account for this validator not found in the pool.

InvalidStakeAccountAddress

Stake account address not properly derived from the validator address.

StakeListOutOfDate

Identify validator stake accounts with old balances and update them.

StakeListAndPoolOutOfDate

First update old validator stake account balances and then pool stake balance.

UnknownValidatorStakeAccount

Validator stake account is not found in the list storage.

WrongMintingAuthority

Wrong minting authority set for mint pool account

UnexpectedValidatorListAccountSize

The size of the given validator stake list does match the expected amount

WrongStaker

Wrong pool staker account.

NonZeroPoolTokenSupply

Pool token supply is not zero on initialization

StakeLamportsNotEqualToMinimum

The lamports in the validator stake account is not equal to the minimum

IncorrectDepositVoteAddress

The provided deposit stake account is not delegated to the preferred deposit vote account

IncorrectWithdrawVoteAddress

The provided withdraw stake account is not the preferred deposit vote account

InvalidMintFreezeAuthority

The mint has an invalid freeze authority

FeeIncreaseTooHigh

Proposed fee increase exceeds stipulated ratio

WithdrawalTooSmall

Not enough pool tokens provided to withdraw stake with one lamport

DepositTooSmall

Not enough lamports provided for deposit to result in one pool token

InvalidStakeDepositAuthority

Provided stake deposit authority does not match the program’s

InvalidSolDepositAuthority

Provided sol deposit authority does not match the program’s

InvalidPreferredValidator

Provided preferred validator is invalid

TransientAccountInUse

Provided validator stake account already has a transient stake account in use

InvalidSolWithdrawAuthority

Provided sol withdraw authority does not match the program’s

SolWithdrawalTooLarge

Too much SOL withdrawn from the stake pool’s reserve account

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

Converts to this type from the input type.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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)

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.