pub use crate::traits::{
errors::{
PSP37Error,
PSP37ReceiverError,
},
types::Id,
};
use ink::prelude::vec::Vec;
use openbrush::traits::{
AccountId,
Balance,
};
#[openbrush::wrapper]
pub type PSP37Ref = dyn PSP37;
#[openbrush::trait_definition]
pub trait PSP37 {
#[ink(message)]
fn balance_of(&self, owner: AccountId, id: Option<Id>) -> Balance;
#[ink(message)]
fn total_supply(&self, id: Option<Id>) -> Balance;
#[ink(message)]
fn allowance(&self, owner: AccountId, operator: AccountId, id: Option<Id>) -> Balance;
#[ink(message)]
fn approve(&mut self, operator: AccountId, id: Option<Id>, value: Balance) -> Result<(), PSP37Error>;
#[ink(message)]
fn transfer(&mut self, to: AccountId, id: Id, value: Balance, data: Vec<u8>) -> Result<(), PSP37Error>;
#[ink(message)]
fn transfer_from(
&mut self,
from: AccountId,
to: AccountId,
id: Id,
amount: Balance,
data: Vec<u8>,
) -> Result<(), PSP37Error>;
}