use cosmwasm_std::{DivideByZeroError, OverflowError, StdError};
use thiserror::Error;
#[derive(Error, Debug, PartialEq)]
pub enum ContractError {
#[error("{0}")]
Std(#[from] StdError),
#[error("{0}")]
Overflow(#[from] OverflowError),
#[error("{0}")]
DivideByZero(#[from] DivideByZeroError),
#[error("Unauthorized")]
Unauthorized {},
#[error("Invalid proof: hash does not meet difficulty requirement")]
InsufficientDifficulty {},
#[error("Proof difficulty {got} below min profitable threshold {min}")]
BelowProfitableThreshold { got: u32, min: u32 },
#[error("Invalid proof: hash verification failed")]
InvalidHash {},
#[error("Invalid proof: hash mismatch")]
HashMismatch {},
#[error("Invalid proof: timestamp too old (max age: {max_age} seconds)")]
TimestampTooOld { max_age: u64 },
#[error("Invalid proof: timestamp in future")]
TimestampInFuture {},
#[error("Duplicate proof: hash already submitted")]
DuplicateProofHash {},
#[error("Referrer can only be set on the first submitted proof")]
ReferrerLockedAfterFirstProof {},
#[error("Contract is paused")]
Paused {},
#[error("Migration error")]
MigrationError {},
#[error("Only litium-core can accrue fees")]
UnauthorizedFeeAccrual {},
}
cw-cyber/contracts/litium-mine/src/error.rs
ฯ 0.0%
use ;
use Error;