Trait pallet_collection::CollectionInterface[][src]

pub trait CollectionInterface<Hash, AccountId> {
    fn collection_exist(collection_id: Hash) -> bool;
fn get_collection(collection_id: Hash) -> CollectionInfo<AccountId>;
fn generate_collection_id(nonce: u128) -> Result<Hash, DispatchError>;
fn nonce_increment() -> Result<u128, DispatchError>;
fn _create_collection(
        who: AccountId,
        uri: Vec<u8>,
        is_fungible: bool
    ) -> Result<Hash, DispatchError>;
fn destory_collection(collection_id: &Hash);
fn add_total_supply(
        collection_id: Hash,
        amount: u128
    ) -> Result<u128, DispatchError>;
fn sub_total_supply(
        collection_id: Hash,
        amount: u128
    ) -> Result<u128, DispatchError>; }

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]

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]

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]

Reduce a certain amount of collection total_supply by collection_id.

Loading content...

Implementors

impl<T: Config> CollectionInterface<<T as Config>::Hash, <T as Config>::AccountId> for Module<T>[src]

Loading content...