1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
use cosmwasm_std::StdError;
use thiserror::Error;

#[derive(Error, Debug, PartialEq)]
pub enum ContractError {
    #[error("{0}")]
    Std(#[from] StdError),

    #[error("Boundary is not in valid format")]
    InvalidBoundary {},

    #[error("Invalid interval")]
    InvalidInterval {},

    #[error("Empty balance, must attach funds")]
    MustAttach {},

    #[error("invalid cosmwasm message")]
    InvalidWasmMsg {},

    #[error("Actions message unsupported or invalid message data")]
    InvalidAction {},

    #[error("Query validation failed, either missing contract or invalid method")]
    InvalidQueries {},

    #[error("Task transform is either looking at wrong indices or has malformed pointers")]
    InvalidTransform {},

    #[error("Supplied address is not valid address")]
    InvalidAddress {},

    #[error("Invalid gas input")]
    InvalidGas {},

    #[error("Must provide gas limit for WASM actions")]
    NoGasLimit {},

    #[error("Contract is in paused state")]
    ContractPaused,

    #[error("Contract is in unpaused state")]
    ContractUnpaused,

    #[error("Task ended")]
    TaskEnded {},

    #[error("Task already exists")]
    TaskExists {},

    #[error("No task found by hash")]
    NoTaskFound {},

    #[error("Unauthorized")]
    Unauthorized {},

    #[error("Invalid Pause Admin")]
    InvalidPauseAdmin,

    #[error("Chain name can't be longer than 32 characters")]
    TooLongChainName {},

    #[error("Invalid version key, please update it")]
    InvalidKey {},

    #[error("Field must be non-zero: {field}")]
    InvalidZeroValue { field: String },
}