1use crate::AttoTokens;
10use thiserror::Error;
11
12pub type Result<T, E = EvmError> = std::result::Result<T, E>;
14
15#[allow(clippy::large_enum_variant)]
16#[derive(Error, Debug, Clone, PartialEq)]
17#[non_exhaustive]
18pub enum EvmError {
20 #[error("Lost precision on the number of coins during parsing.")]
21 LossOfPrecision,
22 #[error("The token amount would exceed the maximum value")]
23 ExcessiveValue,
24 #[error("Failed to parse: {0}")]
25 FailedToParseAttoToken(String),
26 #[error("Overflow occurred while adding values")]
27 NumericOverflow,
28 #[error("Not enough balance, {0} available, {1} required")]
29 NotEnoughBalance(AttoTokens, AttoTokens),
30 #[error("Invalid quote public key")]
31 InvalidQuotePublicKey,
32}