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