1use cosmwasm_std::StdError;
2use thiserror::Error;
3
4#[derive(Error, Debug, PartialEq)]
5pub enum ContractError {
6 #[error("{0}")]
7 Std(#[from] StdError),
8
9 #[error("Boundary is not in valid format")]
10 InvalidBoundary {},
11
12 #[error("Invalid interval")]
13 InvalidInterval {},
14
15 #[error("Empty balance, must attach funds")]
16 MustAttach {},
17
18 #[error("invalid cosmwasm message")]
19 InvalidWasmMsg {},
20
21 #[error("Actions message unsupported or invalid message data")]
22 InvalidAction {},
23
24 #[error("Query validation failed, either missing contract or invalid method")]
25 InvalidQueries {},
26
27 #[error("Task transform is either looking at wrong indices or has malformed pointers")]
28 InvalidTransform {},
29
30 #[error("Supplied address is not valid address")]
31 InvalidAddress {},
32
33 #[error("Invalid gas input")]
34 InvalidGas {},
35
36 #[error("Must provide gas limit for WASM actions")]
37 NoGasLimit {},
38
39 #[error("Contract is in paused state")]
40 ContractPaused,
41
42 #[error("Contract is in unpaused state")]
43 ContractUnpaused,
44
45 #[error("Task ended")]
46 TaskEnded {},
47
48 #[error("Task already exists")]
49 TaskExists {},
50
51 #[error("No task found by hash")]
52 NoTaskFound {},
53
54 #[error("Unauthorized")]
55 Unauthorized {},
56
57 #[error("Invalid Pause Admin")]
58 InvalidPauseAdmin,
59
60 #[error("Chain name can't be longer than 32 characters")]
61 TooLongChainName {},
62
63 #[error("Invalid version key, please update it")]
64 InvalidKey {},
65
66 #[error("Field must be non-zero: {field}")]
67 InvalidZeroValue { field: String },
68}