use anchor_lang::prelude::*;
#[error_code]
pub enum SssError {
#[msg("Unauthorized: caller does not have the required role")]
Unauthorized,
#[msg("Invalid authority for this operation")]
InvalidAuthority,
#[msg("Program is currently paused")]
ProgramPaused,
#[msg("Program is not paused")]
ProgramNotPaused,
#[msg("Minter is not active")]
MinterNotActive,
#[msg("Mint amount exceeds minter quota")]
MintQuotaExceeded,
#[msg("Mint amount must be greater than zero")]
MintAmountZero,
#[msg("Burn amount must be greater than zero")]
BurnAmountZero,
#[msg("Insufficient balance for burn")]
InsufficientBalance,
#[msg("Feature not enabled for this stablecoin preset")]
FeatureNotEnabled,
#[msg("Blacklist feature requires SSS-2 or higher preset")]
BlacklistNotEnabled,
#[msg("Transfer hook feature requires SSS-2 or higher preset")]
TransferHookNotEnabled,
#[msg("Confidential transfers require SSS-3 preset")]
ConfidentialTransfersNotEnabled,
#[msg("Custom preset requires all four feature flags to be specified")]
CustomFlagsMissing,
#[msg("Cannot blacklist the master authority")]
CannotBlacklistAuthority,
#[msg("Cannot mint to a blacklisted recipient")]
RecipientBlacklisted,
#[msg("Name exceeds maximum length of 32 characters")]
NameTooLong,
#[msg("Symbol exceeds maximum length of 10 characters")]
SymbolTooLong,
#[msg("URI exceeds maximum length of 200 characters")]
UriTooLong,
#[msg("Reason exceeds maximum length of 128 characters")]
ReasonTooLong,
#[msg("Allowlist reason exceeds maximum length of 64 characters")]
AllowlistReasonTooLong,
#[msg("Details exceeds maximum length of 256 characters")]
DetailsTooLong,
#[msg("Invalid decimals value")]
InvalidDecimals,
#[msg("Cannot transfer authority to the same address")]
SameAuthority,
#[msg("New authority cannot be the zero address")]
ZeroAuthority,
#[msg("No pending authority nomination exists")]
NoPendingAuthority,
#[msg("Signer is not the pending authority")]
NotPendingAuthority,
#[msg("Seize amount must be greater than zero")]
SeizeAmountZero,
#[msg("Source and destination accounts must be different")]
SeizeSameAccount,
#[msg("Reserve attestation requires reserves >= outstanding")]
InsufficientReserves,
#[msg("Invalid transfer hook program ID")]
InvalidHookProgram,
#[msg("Allowlist entry already exists")]
AllowlistEntryExists,
#[msg("Allowlist entry not found")]
AllowlistEntryNotFound,
#[msg("Mint would exceed the configured supply cap")]
SupplyCapExceeded,
#[msg("Arithmetic overflow")]
Overflow,
}