1use cosmwasm_std::StdError;
2use cw_utils::ParseReplyError;
3use thiserror::Error;
4
5#[derive(Error, Debug, PartialEq)]
6pub enum ContractError {
7 #[error(transparent)]
8 StdError(#[from] StdError),
9
10 #[error(transparent)]
11 ParseReplyError(#[from] ParseReplyError),
12
13 #[error("unauthorized")]
14 Unauthorized,
15
16 #[error("Error querying ContractInfo at address: {address}")]
17 NoContractInfo { address: String },
18
19 #[error("Can't migrate module, code id is not recognized. code_id: {code_id}")]
20 CantMigrateModule { code_id: u64 },
21
22 #[error("unrecognised reply ID")]
23 UnrecognisedReplyId,
24
25 #[error("Test failed! New DAO state doesn't match the old DAO state.")]
26 TestFailed,
27
28 #[error("Failed to confirm migration of cw20_stake")]
29 DontMigrateCw20,
30
31 #[error("Failed to verify DAO voting module address")]
32 VotingModuleNotFound,
33
34 #[error("Failed to verify any DAO proposal single module address")]
35 DaoProposalSingleNotFound,
36
37 #[error("We couldn't find the proposal modules in provided migration params: {addr}")]
38 ProposalModuleNotFoundInParams { addr: String },
39
40 #[error("Failed to verify proposal in {module_addr}")]
41 NoProposalsOnModule { module_addr: String },
42
43 #[error("Duplicate params found for the same module")]
44 DuplicateProposalParams,
45
46 #[error("Proposal migration params length is not equal to proposal modules length")]
47 MigrationParamsNotEqualProposalModulesLength,
48}