use crate::AttoTokens;
use thiserror::Error;
pub type Result<T, E = EvmError> = std::result::Result<T, E>;
#[allow(clippy::large_enum_variant)]
#[derive(Error, Debug, Clone, PartialEq)]
#[non_exhaustive]
pub enum EvmError {
#[error("Lost precision on the number of coins during parsing.")]
LossOfPrecision,
#[error("The token amount would exceed the maximum value")]
ExcessiveValue,
#[error("Failed to parse: {0}")]
FailedToParseAttoToken(String),
#[error("Overflow occurred while adding values")]
NumericOverflow,
#[error("Not enough balance, {0} available, {1} required")]
NotEnoughBalance(AttoTokens, AttoTokens),
#[error("Invalid quote public key")]
InvalidQuotePublicKey,
}