Enum stable_swap_client::error::SwapError [−][src]
pub enum SwapError {
Show 29 variants
AlreadyInUse,
InvalidAdmin,
InvalidOwner,
InvalidOutputOwner,
InvalidProgramAddress,
ExpectedMint,
ExpectedAccount,
EmptyPool,
EmptySupply,
InvalidSupply,
InvalidDelegate,
InvalidInput,
IncorrectSwapAccount,
IncorrectMint,
CalculationFailure,
InvalidInstruction,
RepeatedMint,
ExceededSlippage,
InvalidCloseAuthority,
InvalidFreezeAuthority,
ConversionFailure,
Unauthorized,
IsPaused,
RampLocked,
InsufficientRampTime,
ActiveTransfer,
NoActiveTransfer,
AdminDeadlineExceeded,
MismatchedDecimals,
}
Expand description
Errors that may be returned by the StableSwap program.
Variants
The account cannot be initialized because it is already being used.
The address of the admin fee account is incorrect.
The owner of the input isn’t set to the program address generated by the program.
The owner of the pool token output is set to the program address generated by the program.
The program address provided doesn’t match the value generated by the program.
The deserialization of the account returned something besides State::Mint.
The deserialization of the account returned something besides State::Account.
The pool supply is empty.
The input token account is empty.
The pool token mint has a non-zero supply.
The provided token account has a delegate.
The input token is invalid for swap.
Address of the provided swap token account is incorrect.
Address of the provided token mint is incorrect
The calculation failed.
Invalid instruction number passed in.
Swap input token accounts have the same mint
Swap instruction exceeds desired slippage limit
The provided token account has a close authority.
The pool token mint has a freeze authority.
ConversionFailure
Unauthorized
Swap pool is paused
Amp. coefficient change is within min ramp duration
Insufficient ramp time for the ramp operation
Active admin transfer in progress
No active admin transfer in progress
Admin transfer deadline exceeded
Token mint decimals must be the same.
Trait Implementations
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
fn print<E>(&self) where
E: 'static + Error + DecodeError<E> + PrintProgramError + FromPrimitive,
Auto Trait Implementations
impl RefUnwindSafe for SwapError
impl UnwindSafe for SwapError
Blanket Implementations
pub default fn example() -> T
Mutably borrows from an owned value. Read more