Trait orml_traits::nft::NFT [−][src]
pub trait NFT<AccountId> {
type ClassId: Default + Copy;
type TokenId: Default + Copy;
type Balance: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default;
fn balance(who: &AccountId) -> Self::Balance;
fn owner(token: (Self::ClassId, Self::TokenId)) -> Option<AccountId>;
fn transfer(
from: &AccountId,
to: &AccountId,
token: (Self::ClassId, Self::TokenId)
) -> DispatchResult;
}
Expand description
Abstraction over a non-fungible token system.
Associated Types
type Balance: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default
type Balance: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default
The balance of account.
Required methods
The owner of the given token ID. Returns None
if the token does not
exist.