referrerpolicy=no-referrer-when-downgrade

MintWithoutDeposit

Trait MintWithoutDeposit 

Source
pub trait MintWithoutDeposit<AccountId> {
    type MetadataKey;
    type MetadataValue;

    // Required method
    fn mint_without_deposit(
        collection: CollectionId,
        item: ItemIndex,
        to: AccountId,
        metadata: Vec<(Self::MetadataKey, Self::MetadataValue)>,
    ) -> Result<InstanceId, DispatchError>;
}
Expand description

Runtime-only integration for minting an NFT without instance-scoped storage deposits.

Implementations still enforce all collection, item, supply, and ownership invariants. The calling runtime pallet is responsible for bounding depositless state growth through some other scarce resource or protocol rule.

Required Associated Types§

Source

type MetadataKey

Bounded metadata key accepted by the implementation.

Source

type MetadataValue

Bounded metadata value accepted by the implementation.

Required Methods§

Source

fn mint_without_deposit( collection: CollectionId, item: ItemIndex, to: AccountId, metadata: Vec<(Self::MetadataKey, Self::MetadataValue)>, ) -> Result<InstanceId, DispatchError>

Mint an instance and its initial metadata without storage deposits.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: Config> MintWithoutDeposit<<T as Config>::AccountId> for Pallet<T>

Source§

type MetadataKey = BoundedVec<u8, <T as Config>::MaxKeyLen>

Source§

type MetadataValue = BoundedVec<u8, <T as Config>::MaxValueLen>