Trait frame_support::traits::tokens::nonfungibles_v2::Mutate
source · pub trait Mutate<AccountId, ItemConfig>: Inspect<AccountId> {
Show 14 methods
// Provided methods
fn mint_into(
_collection: &Self::CollectionId,
_item: &Self::ItemId,
_who: &AccountId,
_config: &ItemConfig,
_deposit_collection_owner: bool,
) -> DispatchResult { ... }
fn burn(
_collection: &Self::CollectionId,
_item: &Self::ItemId,
_maybe_check_owner: Option<&AccountId>,
) -> DispatchResult { ... }
fn set_attribute(
_collection: &Self::CollectionId,
_item: &Self::ItemId,
_key: &[u8],
_value: &[u8],
) -> DispatchResult { ... }
fn set_typed_attribute<K: Encode, V: Encode>(
collection: &Self::CollectionId,
item: &Self::ItemId,
key: &K,
value: &V,
) -> DispatchResult { ... }
fn set_collection_attribute(
_collection: &Self::CollectionId,
_key: &[u8],
_value: &[u8],
) -> DispatchResult { ... }
fn set_typed_collection_attribute<K: Encode, V: Encode>(
collection: &Self::CollectionId,
key: &K,
value: &V,
) -> DispatchResult { ... }
fn set_item_metadata(
_who: Option<&AccountId>,
_collection: &Self::CollectionId,
_item: &Self::ItemId,
_data: &[u8],
) -> DispatchResult { ... }
fn set_collection_metadata(
_who: Option<&AccountId>,
_collection: &Self::CollectionId,
_data: &[u8],
) -> DispatchResult { ... }
fn clear_attribute(
_collection: &Self::CollectionId,
_item: &Self::ItemId,
_key: &[u8],
) -> DispatchResult { ... }
fn clear_typed_attribute<K: Encode>(
collection: &Self::CollectionId,
item: &Self::ItemId,
key: &K,
) -> DispatchResult { ... }
fn clear_collection_attribute(
_collection: &Self::CollectionId,
_key: &[u8],
) -> DispatchResult { ... }
fn clear_typed_collection_attribute<K: Encode>(
collection: &Self::CollectionId,
key: &K,
) -> DispatchResult { ... }
fn clear_item_metadata(
_who: Option<&AccountId>,
_collection: &Self::CollectionId,
_item: &Self::ItemId,
) -> DispatchResult { ... }
fn clear_collection_metadata(
_who: Option<&AccountId>,
_collection: &Self::CollectionId,
) -> DispatchResult { ... }
}
Expand description
Trait for providing an interface for multiple collections of NFT-like items which may be minted, burned and/or have attributes and metadata set on them.
Provided Methods§
sourcefn mint_into(
_collection: &Self::CollectionId,
_item: &Self::ItemId,
_who: &AccountId,
_config: &ItemConfig,
_deposit_collection_owner: bool,
) -> DispatchResult
fn mint_into( _collection: &Self::CollectionId, _item: &Self::ItemId, _who: &AccountId, _config: &ItemConfig, _deposit_collection_owner: bool, ) -> DispatchResult
Mint some item
of collection
to be owned by who
.
By default, this is not a supported operation.
sourcefn burn(
_collection: &Self::CollectionId,
_item: &Self::ItemId,
_maybe_check_owner: Option<&AccountId>,
) -> DispatchResult
fn burn( _collection: &Self::CollectionId, _item: &Self::ItemId, _maybe_check_owner: Option<&AccountId>, ) -> DispatchResult
Burn some item
of collection
.
By default, this is not a supported operation.
sourcefn set_attribute(
_collection: &Self::CollectionId,
_item: &Self::ItemId,
_key: &[u8],
_value: &[u8],
) -> DispatchResult
fn set_attribute( _collection: &Self::CollectionId, _item: &Self::ItemId, _key: &[u8], _value: &[u8], ) -> DispatchResult
Set attribute value
of item
of collection
’s key
.
By default, this is not a supported operation.
sourcefn set_typed_attribute<K: Encode, V: Encode>(
collection: &Self::CollectionId,
item: &Self::ItemId,
key: &K,
value: &V,
) -> DispatchResult
fn set_typed_attribute<K: Encode, V: Encode>( collection: &Self::CollectionId, item: &Self::ItemId, key: &K, value: &V, ) -> DispatchResult
Attempt to set the strongly-typed attribute value
of item
of collection
’s key
.
By default this just attempts to use set_attribute
.
sourcefn set_collection_attribute(
_collection: &Self::CollectionId,
_key: &[u8],
_value: &[u8],
) -> DispatchResult
fn set_collection_attribute( _collection: &Self::CollectionId, _key: &[u8], _value: &[u8], ) -> DispatchResult
Set attribute value
of collection
’s key
.
By default, this is not a supported operation.
sourcefn set_typed_collection_attribute<K: Encode, V: Encode>(
collection: &Self::CollectionId,
key: &K,
value: &V,
) -> DispatchResult
fn set_typed_collection_attribute<K: Encode, V: Encode>( collection: &Self::CollectionId, key: &K, value: &V, ) -> DispatchResult
Attempt to set the strongly-typed attribute value
of collection
’s key
.
By default this just attempts to use set_attribute
.
sourcefn set_item_metadata(
_who: Option<&AccountId>,
_collection: &Self::CollectionId,
_item: &Self::ItemId,
_data: &[u8],
) -> DispatchResult
fn set_item_metadata( _who: Option<&AccountId>, _collection: &Self::CollectionId, _item: &Self::ItemId, _data: &[u8], ) -> DispatchResult
Set the metadata data
of an item
of collection
.
By default, this is not a supported operation.
sourcefn set_collection_metadata(
_who: Option<&AccountId>,
_collection: &Self::CollectionId,
_data: &[u8],
) -> DispatchResult
fn set_collection_metadata( _who: Option<&AccountId>, _collection: &Self::CollectionId, _data: &[u8], ) -> DispatchResult
Set the metadata data
of a collection
.
By default, this is not a supported operation.
sourcefn clear_attribute(
_collection: &Self::CollectionId,
_item: &Self::ItemId,
_key: &[u8],
) -> DispatchResult
fn clear_attribute( _collection: &Self::CollectionId, _item: &Self::ItemId, _key: &[u8], ) -> DispatchResult
Clear attribute of item
of collection
’s key
.
By default, this is not a supported operation.
sourcefn clear_typed_attribute<K: Encode>(
collection: &Self::CollectionId,
item: &Self::ItemId,
key: &K,
) -> DispatchResult
fn clear_typed_attribute<K: Encode>( collection: &Self::CollectionId, item: &Self::ItemId, key: &K, ) -> DispatchResult
Attempt to clear the strongly-typed attribute of item
of collection
’s key
.
By default this just attempts to use clear_attribute
.
sourcefn clear_collection_attribute(
_collection: &Self::CollectionId,
_key: &[u8],
) -> DispatchResult
fn clear_collection_attribute( _collection: &Self::CollectionId, _key: &[u8], ) -> DispatchResult
Clear attribute of collection
’s key
.
By default, this is not a supported operation.
sourcefn clear_typed_collection_attribute<K: Encode>(
collection: &Self::CollectionId,
key: &K,
) -> DispatchResult
fn clear_typed_collection_attribute<K: Encode>( collection: &Self::CollectionId, key: &K, ) -> DispatchResult
Attempt to clear the strongly-typed attribute of collection
’s key
.
By default this just attempts to use clear_attribute
.
sourcefn clear_item_metadata(
_who: Option<&AccountId>,
_collection: &Self::CollectionId,
_item: &Self::ItemId,
) -> DispatchResult
fn clear_item_metadata( _who: Option<&AccountId>, _collection: &Self::CollectionId, _item: &Self::ItemId, ) -> DispatchResult
Clear the metadata of an item
of collection
.
By default, this is not a supported operation.
sourcefn clear_collection_metadata(
_who: Option<&AccountId>,
_collection: &Self::CollectionId,
) -> DispatchResult
fn clear_collection_metadata( _who: Option<&AccountId>, _collection: &Self::CollectionId, ) -> DispatchResult
Clear the metadata of a collection
.
By default, this is not a supported operation.