use marsh_utils::*;
use num_enum::IntoPrimitive;
use thiserror::Error;
#[derive(Debug, Error, Clone, Copy, PartialEq, Eq, IntoPrimitive)]
#[repr(u32)]
pub enum MarshError {
#[error("The epoch has ended and needs reset")]
NeedsReset = 0,
#[error("The provided hash is invalid")]
HashInvalid = 1,
#[error("The provided hash did not satisfy the minimum required difficulty")]
HashTooEasy = 2,
#[error("The claim amount cannot be greater than the claimable rewards")]
ClaimTooLarge = 3,
#[error("The clock time is invalid")]
ClockInvalid = 4,
#[error("You are trying to submit too soon")]
Spam = 5,
#[error("The maximum supply has been reached")]
MaxSupply = 6,
#[error("The proof does not match the expected account")]
AuthFailed = 7,
#[error("The evolution has not been activated")]
NotEvolvable = 8,
#[error("The starting time has not passed yet")]
NotStarted = 9,
#[error("Here we are, it's been a long journey, the Mars(h) Mining Mission has finally come to an end.")]
HasEnded = 10,
}
error!(MarshError);