Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions primitives/swap/src/error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#[derive(Debug, PartialEq, Eq)]
pub enum SwapError {
/// The provided amount is insufficient for the swap.
InsufficientInputAmount,

/// The provided liquidity is insufficient for the operation.
InsufficientLiquidity,

/// The operation would exceed the price limit.
PriceLimitExceeded,

/// The caller does not have enough balance for the operation.
InsufficientBalance,

/// Attempted to remove liquidity that does not exist.
LiquidityNotFound,

/// The provided tick range is invalid.
InvalidTickRange,

/// Maximum user positions exceeded
MaxPositionsExceeded,

/// Too many swap steps
TooManySwapSteps,
}
Loading
Loading