Trait pallet_collection::CollectionInterface [−][src]
Required methods
fn collection_exist(collection_id: Hash) -> bool
[src]
Check whether the collection exists by collection_id.
fn get_collection(collection_id: Hash) -> CollectionInfo<AccountId>
[src]
Get a collection by collection_id.
fn generate_collection_id(nonce: u128) -> Result<Hash, DispatchError>
[src]
Generate collection_id through nonce.
fn nonce_increment() -> Result<u128, DispatchError>
[src]
nonce plus one.
fn _create_collection(
who: AccountId,
uri: Vec<u8>,
is_fungible: bool
) -> Result<Hash, DispatchError>
[src]
who: AccountId,
uri: Vec<u8>,
is_fungible: bool
) -> Result<Hash, DispatchError>
create a collection.
fn destory_collection(collection_id: &Hash)
[src]
destory a collection by collection_id.
fn add_total_supply(
collection_id: Hash,
amount: u128
) -> Result<u128, DispatchError>
[src]
collection_id: Hash,
amount: u128
) -> Result<u128, DispatchError>
Increase a certain amount of of collection total_supply by collection_id.
fn sub_total_supply(
collection_id: Hash,
amount: u128
) -> Result<u128, DispatchError>
[src]
collection_id: Hash,
amount: u128
) -> Result<u128, DispatchError>
Reduce a certain amount of collection total_supply by collection_id.
Implementors
impl<T: Config> CollectionInterface<<T as Config>::Hash, <T as Config>::AccountId> for Module<T>
[src]
fn collection_exist(collection_id: T::Hash) -> bool
[src]
fn get_collection(collection_id: T::Hash) -> CollectionInfo<T::AccountId>
[src]
fn generate_collection_id(nonce: u128) -> Result<T::Hash, DispatchError>
[src]
fn nonce_increment() -> Result<u128, DispatchError>
[src]
fn _create_collection(
who: T::AccountId,
uri: Vec<u8>,
is_fungible: bool
) -> Result<T::Hash, DispatchError>
[src]
who: T::AccountId,
uri: Vec<u8>,
is_fungible: bool
) -> Result<T::Hash, DispatchError>
fn destory_collection(collection_id: &T::Hash)
[src]
fn add_total_supply(
collection_id: T::Hash,
amount: u128
) -> Result<u128, DispatchError>
[src]
collection_id: T::Hash,
amount: u128
) -> Result<u128, DispatchError>
fn sub_total_supply(
collection_id: T::Hash,
amount: u128
) -> Result<u128, DispatchError>
[src]
collection_id: T::Hash,
amount: u128
) -> Result<u128, DispatchError>