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
use anchor_lang::prelude::error_code;

#[error_code]
pub enum ErrorCode {
    #[msg("Invalid Program")]
    InvalidProgram,

    #[msg("The signer is not authorized to perform this action.")]
    Unauthorized,

    #[msg("CPI happened from an unknown program")]
    UnknownCPI,

    #[msg("Action not allowed for this program")]
    UnallowedAction,

    #[msg("Too many addresses provided.")]
    TooManyAddresses,

    #[msg("Unexpected address container role for the action.")]
    WrongAddressContainerRole,

    #[msg("Merkle Tree must be provided in context for this particular action")]
    MissingMerkleTree,

    #[msg("Invalid Value Type")]
    InvalidValueType,

    #[msg("Data non-empty, please use set instead!")]
    NonEmptyDataAdd,
}