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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
use thiserror::Error;
#[derive(Debug, Error)]
pub enum ErrorCode {
#[error("LOK")]
LOK,
#[error("Unable to cast number into BigInt")]
NumberCastError, #[error("Minting amount should be greater than 0")]
ZeroMintAmount,
#[error("Integer downcast overflow")]
IntegerDowncastOverflow,
#[error("Multiplication overflow")]
MultiplicationOverflow,
#[error("Divisor is zero")]
DivisorIsZero,
#[error("Token amount min subceeded")]
TokenAmountMinSubceeded,
#[error("Token amount max exceeded")]
TokenAmountMaxExceeded,
#[error("Input sqrt price out of bounds")]
SqrtPriceOutOfBounds,
#[error("Protocol fee rate illegal")]
ProtocolFeeRateIllegal,
#[error("Fee rate illegal")]
FeeRateIllegal,
#[error("Token mint pair illegal")]
TokenMintPairIllgal,
#[error("Tickarray start_index is illegal")]
TickArrayStartIndexIllegal,
#[error("Invalid tick spacing")]
InvalidTickSpacing,
#[error("Invalid tick index")]
InvalidTickIndex,
#[error("Invalid tick array account")]
InvalidTickArrayAccount,
#[error("Position is not empty")]
PositionIsNotEmpty,
#[error("Invalid Token account owner")]
InvalidTokenAccountOwner,
#[error("Tick not found")]
TickNotFound,
#[error("Tick not in array")]
TickNotInArray,
#[error("Invalid token account")]
InvalidTokenAccount,
#[error("Invalid mint")]
InvalidMint,
#[error("Invalid authority")]
InvalidAuthority,
#[error("Position and clmmpool not match")]
PositionAndClmmpoolNotMatch,
#[error("Position is Illegal")]
PositionIllegal,
#[error("Invalid delta liquidity")]
InvalidDeltaLiquidity,
#[error("Config and Pool not match")]
ConfigAndPoolNotMatch,
#[error("Wrong sqrt price limit")]
WrongSqrtPriceLimit,
#[error("Tick array not found")]
TickArrayNotFound,
#[error("Invalid tick array index")]
InvalidTickArrayIndex,
#[error("Next tick not found")]
NextTickNotFound,
#[error("Fee growth illegal")]
FeeGrowthIllegal,
#[error("Liquidity overflow")]
LiquidityOverflow,
#[error("Liquidity underflow")]
LiquidityUnderflow,
#[error("Remainer amount underflow")]
RemainerAmountUnderflow,
#[error("Swap amount in overflow")]
SwapAmountInOverflow,
#[error("Swap amount out overflow")]
SwapAmountOutOverflow,
#[error("Swap fee amount overflow")]
SwapFeeAmountOverflow,
#[error("Invalid time")]
InvalidTime,
#[error("Amount in above maximum limit")]
AmountInAboveMaximumLimit,
#[error("Amount out below maximum limit")]
AmountOutBelowMaximumLimit,
#[error("Invalid amount input")]
InvalidAmountInput,
#[error("Invalid fixed token type")]
InvalidFixedTokenType,
}