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


modify::ModifyDomain<C> has store


Name Type Description
generator witness::WitnessGenerator<C>

Generator responsible for issuing delegated witnesses

ModifyDomain object


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


  • 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 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 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 if ModifyDomain is not defined on the Collection.