referrerpolicy=no-referrer-when-downgrade

Function pallet_nfts::pallet::dispatchables::set_metadata

source ·
pub fn set_metadata<T: Config<I>, I: 'static>(
    collection: T::CollectionId,
    item: T::ItemId,
    data: BoundedVec<u8, T::StringLimit>,
)
Expand description

Set the metadata for an item.

Origin must be either ForceOrigin or Signed and the sender should be the Admin of the collection.

If the origin is Signed, then funds of signer are reserved according to the formula: MetadataDepositBase + DepositPerByte * data.len taking into account any already reserved funds.

  • collection: The identifier of the collection whose item’s metadata to set.
  • item: The identifier of the item whose metadata to set.
  • data: The general information of this item. Limited in length by StringLimit.

Emits ItemMetadataSet.

Weight: O(1)

§Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::set_metadata.