Developer - Managing a Capsule Collection

Capsule Collections are NFT collections which support the minting of Capsule NFTs. You can mint any number of Simple Capsule NFTs, ERC-20 Capsule NFTs, ERC-721 Capsule NFTs, or ERC-1155 Capsule NFTs from a Capsule Collection you create.

You also have the ability to manage your Capsule Collection after creation, such as:

  • Locking your collection at an upper bound

    • ‘Locking’ a collection means disabling any user from minting further Capsule NFTs from that collection past that upper bound.

    • If a collection ‘lock’ method is called at ‘15’, no more than 15 Capsule NFTs can be minted from that collection. If more than 15 were minted from that collection already, no more Capsule NFTs can be minted from the collection.

    • Both private and public collections can be locked at any point by the owner of the contract - but never unlocked.

  • Changing the URI Owner (also known as the metamaster)

    • On creation, a collection can be passed a ‘URI Owner’ who has the ability to change the metadata assigned to any NFT in that collection.

    • The URI Owner can also be set to the zero address in order to prevent anyone from changing NFT metadata in a collection (in which case, it can also never be re-set).

  • Transferring ownership of your Capsule Collection

    • Owning a Capsule Collection allows you to lock a collection at any time (if it is not locked). If ownership of a Capsule Collection is transferred to the zero address without locking it, the collection will stay unlocked forever.

    • The owner of a private Capsule Collection is the only person with the ability to mint new Capsule NFTs to that collection (so long as it is not locked).

Below are some examples of managing your Capsule Collection.

Example Capsule Collection Locking Call

An example call is shown here:

lockCollectionCount(10);

This call will lock a Capsule Collection at 10 - meaning that only 10 Capsule NFTs will ever exist in this collection (the max ID of a Capsule NFT minted will be 9).

If 11 Capsule NFTs were already minted before this call the Capsule Collection will stay at 11 total NFTs, but no more can be minted.

Example Capsule Collection Transfer TokenURI Owner/Metamaster Call

An example call is shown here:

updateTokenURIOwner("0x0000000000000000000000000000000000000000");

This call will transfer tokenURI ownership (also known as the metamaster) to a different address (the zero address above). Only the current tokenURIOwner/metamaster can make this call. Owning a Capsule Collection and being the metamaster of a Capsule Collection are two different concepts. For more information on the differences, view above.

Example Capsule Collection Transfer Ownership Call

An example call is shown here:

transferOwnership("0x0000000000000000000000000000000000000000");

This call will transfer ownership of the Capsule Collection to a different address (the zero address above). Only the current Capsule Collection owner can make this call.

Last updated