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

#[error_code]
pub enum RoundError {
    #[msg("Overflow occured")]
    Overflow,
    #[msg("inteval between bidding_start and bidding_end should be positive")]
    SuspiciousOfferInterval,
    #[msg("missing delegate or delegated amount is zero (use approve token instruction)")]
    NoDelegatedAmount,
    #[msg("bidding has not yet begun (now < bidding_start)")]
    BiddingNotStarted,
    #[msg("bidding ended (now > bidding_end)")]
    BiddingEnded,
    #[msg("bidding has not yet begun (now < bidding_start)")]
    BiddingIsNotOver,
    #[msg("heir inactivity timeout has not yet passed")]
    InactivityTimeoutHasNotPassed,
    #[msg("can't withdraw bid because creator did not reject request")]
    CantWithdrawPendingOffer,
    #[msg("can't withdraw bid because creator did acept request (use claim instruction)")]
    CantWithdrawAcceptedOffer,
    #[msg("offer already accepted/rejected")]
    OfferIsNotPending,
    #[msg("time for accepting/rejecting offer has expired")]
    OfferTimedOut,
    #[msg("can't accept/reject offer while bidding has not ended")]
    BiddingStillGoing,
    #[msg("can't accept offer without contributors")]
    CantAcceptZeroOffering,
    #[msg("can't withdraw without user signature before bidding has ended")]
    CantWithdrawWithoutUserSignature,
    #[msg("can't redeem round that has not been accepted by heir")]
    CantRedeemNotAcceptedRound,
    #[msg("can't cancel round after start")]
    CantCancelStartedRound,
    #[msg("can't close round before all vouchers are withdrawn")]
    VouchersNotWithdrawn,
    #[msg("can't close before heir timeout")]
    CantCloseBeforeHeirTimeout,
}