astroport_staking/
error.rs

1use cosmwasm_std::StdError;
2use cw_utils::{ParseReplyError, PaymentError};
3use thiserror::Error;
4
5use crate::contract::MINIMUM_STAKE_AMOUNT;
6
7/// This enum describes staking contract errors
8#[derive(Error, Debug, PartialEq)]
9pub enum ContractError {
10    #[error("{0}")]
11    Std(#[from] StdError),
12
13    #[error("{0}")]
14    PaymentError(#[from] PaymentError),
15
16    #[error("{0}")]
17    ParseReplyError(#[from] ParseReplyError),
18
19    #[error("Initial stake amount must be more than {MINIMUM_STAKE_AMOUNT}")]
20    MinimumStakeAmountError {},
21
22    #[error("Insufficient amount of Stake")]
23    StakeAmountTooSmall {},
24
25    #[error("Failed to parse or process reply message")]
26    FailedToParseReply {},
27
28    #[error("Contract can't be migrated!")]
29    MigrationError {},
30}