Skip to main content

astroport_factory/
error.rs

1use cosmwasm_std::StdError;
2use thiserror::Error;
3
4/// This enum describes factory contract errors
5#[derive(Error, Debug, PartialEq)]
6pub enum ContractError {
7    #[error("{0}")]
8    Std(#[from] StdError),
9
10    #[error("Unauthorized")]
11    Unauthorized {},
12
13    #[error("Pair was already created")]
14    PairWasCreated {},
15
16    #[error("Pair was already registered")]
17    PairWasRegistered {},
18
19    #[error("Duplicate of pair configs")]
20    PairConfigDuplicate {},
21
22    #[error("Fee bps in pair config must be smaller than or equal to 10,000")]
23    PairConfigInvalidFeeBps {},
24
25    #[error("Pair config not found")]
26    PairConfigNotFound {},
27
28    #[error("Pair config disabled")]
29    PairConfigDisabled {},
30
31    #[error("Doubling assets in asset infos")]
32    DoublingAssets {},
33
34    #[error("Contract can't be migrated!")]
35    MigrationError {},
36
37    #[error("Failed to parse or process reply message")]
38    FailedToParseReply {},
39}