forked from Cardinal-Cryptography/PSP22
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.rs
More file actions
18 lines (17 loc) · 746 Bytes
/
errors.rs
File metadata and controls
18 lines (17 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use ink::prelude::string::String;
#[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]
#[cfg_attr(feature = "std", derive(scale_info::TypeInfo))]
pub enum PSP22Error {
/// Custom error type for implementation-based errors.
Custom(String),
/// Returned when an account does not have enough tokens to complete the operation.
InsufficientBalance,
/// Returned if there is not enough allowance to complete the operation.
InsufficientAllowance,
/// Returned if recipient's address is zero [deprecated].
ZeroRecipientAddress,
/// Returned if sender's address is zero [deprecated].
ZeroSenderAddress,
/// Returned if a safe transfer check failed [deprecated].
SafeTransferCheckFailed(String),
}