Trait stp258_traits::nft::NFT [−][src]
Abstraction over a non-fungible token system.
Associated Types
type ClassId: Default + Copy
[src]
The NFT class identifier.
type TokenId: Default + Copy
[src]
The NFT token identifier.
type Balance: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default
[src]
The balance of account.
Required methods
fn balance(who: &AccountId) -> Self::Balance
[src]
The number of NFTs assigned to who
.
fn owner(token: (Self::ClassId, Self::TokenId)) -> Option<AccountId>
[src]
The owner of the given token ID. Returns None
if the token does not
exist.
fn transfer(
from: &AccountId,
to: &AccountId,
token: (Self::ClassId, Self::TokenId)
) -> DispatchResult
[src]
from: &AccountId,
to: &AccountId,
token: (Self::ClassId, Self::TokenId)
) -> DispatchResult
Transfer the given token ID from one account to another.