0x0::modify

Module of NFT ModifyDomain

ModifyDomain allows collection creators to delegate users the right to independently register new domains on their NFTs without delegating the right to mint or modify the collection.

An alternative is delegating a RegulatedMintCap with zero supply which will allow users or contracts to register domains on

Structs

modify::ModifyDomain<C> has store

Fields:

Name Type Description
generator witness::WitnessGenerator<C>

Generator responsible for issuing delegated witnesses

ModifyDomain object

Methods

public fun add_domain<C, D: store>(
    collection: &collection::Collection<C>,
    nft: &mut nft::Nft<C>,
    domain: D,
    ctx: &mut tx_context::TxContext,
)

Adds domain of type D to Nft

Allows users to independently register

Panics

  • Transaction sender is not logical owner of the NFT
  • ModifyDomain was not registered on Collection
  • Domain D already exists on the Nft

public fun add_modify_domain<C, W>(
    witness: &W,
    collection: &mut collection::Collection<C>,
)

Adds ModifyDomain to Collection

This allows users to independently add domains to their NFTs.

Panics

Panics if ModifyDomain already exists.

public fun assert_owner<C>(
    nft: &nft::Nft<C>,
    ctx: &mut tx_context::TxContext,
)

Asserts that transaction sender is the logical owner of the NFT

Panics

Panics if transaction sender is not the logical owner of the NFT.

public fun assert_domain<C>(
    collection: &collection::Collection<C>,
)

Asserts that ModifyDomain is defined on the Collection

Panics

Panics if ModifyDomain is not defined on the Collection.