Trait pallet_nft::NFTInterface [−][src]
Required methods
fn token_exist(collection_id: Hash, token_id: u128) -> bool
[src]
Check whether the token exists by collection_id and token_id.
fn get_nft_token(collection_id: Hash, token_id: u128) -> TokenInfo<AccountId>
[src]
Get token by collection_id and token_id.
fn get_balance(collection_id: &Hash, who: &AccountId) -> u128
[src]
Get the balance of an account in a collection.
fn get_burned_amount(collection_id: &Hash) -> u128
[src]
Get the count of tokens burned in a collection.
fn destory_collection(collection_id: &Hash)
[src]
Destory a collection by collection_id.
fn _mint_non_fungible(
receiver: AccountId,
collection_id: Hash,
amount: u128,
uri: Vec<u8>,
collection: &CollectionInfo<AccountId>
) -> Result<(u128, u128), DispatchError>
[src]
receiver: AccountId,
collection_id: Hash,
amount: u128,
uri: Vec<u8>,
collection: &CollectionInfo<AccountId>
) -> Result<(u128, u128), DispatchError>
Mint NFTs
fn _mint_fungible(
receiver: AccountId,
collection_id: Hash,
amount: u128,
collection: &CollectionInfo<AccountId>
) -> DispatchResult
[src]
receiver: AccountId,
collection_id: Hash,
amount: u128,
collection: &CollectionInfo<AccountId>
) -> DispatchResult
Mint FTs
fn _transfer_non_fungible(
who: AccountId,
receiver: AccountId,
collection_id: Hash,
start_idx: u128,
amount: u128
) -> DispatchResult
[src]
who: AccountId,
receiver: AccountId,
collection_id: Hash,
start_idx: u128,
amount: u128
) -> DispatchResult
Transfer NFTs to another account.
fn _transfer_fungible(
who: AccountId,
receiver: AccountId,
collection_id: Hash,
amount: u128
) -> DispatchResult
[src]
who: AccountId,
receiver: AccountId,
collection_id: Hash,
amount: u128
) -> DispatchResult
Transfer FTs to another account.
fn _burn_non_fungible(
who: AccountId,
collection_id: Hash,
start_idx: u128,
amount: u128
) -> DispatchResult
[src]
who: AccountId,
collection_id: Hash,
start_idx: u128,
amount: u128
) -> DispatchResult
burn NFTs.
fn _burn_fungible(
who: AccountId,
collection_id: Hash,
amount: u128
) -> DispatchResult
[src]
who: AccountId,
collection_id: Hash,
amount: u128
) -> DispatchResult
burn FTs.
Implementors
impl<T: Config> NFTInterface<<T as Config>::Hash, <T as Config>::AccountId> for Module<T>
[src]
fn token_exist(collection_id: T::Hash, token_id: u128) -> bool
[src]
fn get_nft_token(
collection_id: T::Hash,
token_id: u128
) -> TokenInfo<T::AccountId>
[src]
collection_id: T::Hash,
token_id: u128
) -> TokenInfo<T::AccountId>
fn get_balance(collection_id: &T::Hash, who: &T::AccountId) -> u128
[src]
fn get_burned_amount(collection_id: &T::Hash) -> u128
[src]
fn destory_collection(collection_id: &T::Hash)
[src]
fn _mint_non_fungible(
receiver: T::AccountId,
collection_id: T::Hash,
amount: u128,
uri: Vec<u8>,
collection: &CollectionInfo<T::AccountId>
) -> Result<(u128, u128), DispatchError>
[src]
receiver: T::AccountId,
collection_id: T::Hash,
amount: u128,
uri: Vec<u8>,
collection: &CollectionInfo<T::AccountId>
) -> Result<(u128, u128), DispatchError>
fn _mint_fungible(
receiver: T::AccountId,
collection_id: T::Hash,
amount: u128,
collection: &CollectionInfo<T::AccountId>
) -> DispatchResult
[src]
receiver: T::AccountId,
collection_id: T::Hash,
amount: u128,
collection: &CollectionInfo<T::AccountId>
) -> DispatchResult
fn _transfer_non_fungible(
who: T::AccountId,
receiver: T::AccountId,
collection_id: T::Hash,
start_idx: u128,
amount: u128
) -> DispatchResult
[src]
who: T::AccountId,
receiver: T::AccountId,
collection_id: T::Hash,
start_idx: u128,
amount: u128
) -> DispatchResult
fn _transfer_fungible(
who: T::AccountId,
receiver: T::AccountId,
collection_id: T::Hash,
amount: u128
) -> DispatchResult
[src]
who: T::AccountId,
receiver: T::AccountId,
collection_id: T::Hash,
amount: u128
) -> DispatchResult
fn _burn_non_fungible(
who: T::AccountId,
collection_id: T::Hash,
start_idx: u128,
amount: u128
) -> DispatchResult
[src]
who: T::AccountId,
collection_id: T::Hash,
start_idx: u128,
amount: u128
) -> DispatchResult
fn _burn_fungible(
who: T::AccountId,
collection_id: T::Hash,
amount: u128
) -> DispatchResult
[src]
who: T::AccountId,
collection_id: T::Hash,
amount: u128
) -> DispatchResult