psp22 0.2.0

Minimal implementation of PSP22 token standard in pure ink!
Documentation
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),
}