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
use crate::*;

#[error_code]
#[derive(Eq, PartialEq)]
pub enum RandomnessError {
    #[msg("num_bytes must be greater than 0 and less than or equal to 32")]
    InvalidNumberOfBytes,
    #[msg("User's callback cannot be executed")]
    InvalidCallback,
    #[msg("Account not found in remaining_accounts")]
    MissingCallbackAccount,
    #[msg("Invalid token account")]
    InvalidEscrow,
    #[msg("User escrow has insufficient funds")]
    InsufficientFunds,
    #[msg("This instruction cannot be invoked with a CPI call")]
    CpiUnauthorized,
    #[msg("The provided request has not been completed yet")]
    RequestStillActive,
    #[msg("The randomness request has already been completed")]
    RequestAlreadyCompleted,
    #[msg("The provided error message exceeded 256 bytes")]
    ErrorMessageOverflow,
    #[msg("The provided callback program_id is incorrect")]
    IncorrectCallbackProgramId,
    #[msg("The program token wallet had insufficient funds for the request")]
    ProgramWalletInsufficientFunds,
}