Developer - Create 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.
Below is an example of creating your own Capsule Collection.
Methodology
In order to create a Capsule Collection, only one method needs to be called - createCapsuleCollection
.
The docs for the method (also found under CapsuleFactory.sol) are posted here for reference:
Usage: The main method which creates a Capsule NFT Collection for a user. Creation of a Capsule Collection MUST go through the CapsuleFactory in order to ensure ecosystem safety - this ensures that no Capsule contract is able to exploit the CapsuleMinter's token storing/redeeming methods.
Parameters:
_name
: (string) - the name of the Capsule Collection_symbol
: (string) - the symbol of the Capsule Collection_tokenURIOwner
: (address) - the address of the Capsule Collection tokenURIOwner (also known as the Metamaster)_isCollectionPrivate
: (boolean) - whether the Capsule Collection is designated as private
Returns: (address) - The address of the newly deployed Capsule Collection.
Example Capsule Collection Creation Call
An example call is shown here:
This call will create a Capsule Collection:
Named
Capsule
With Symbol
CNFT
Whose Metamaster is the
Zero Address
(0x0000000000000000000000000000000000000000). The metamaster has control over ALL metadata in the collection. In most cases, you'd either set the Metamaster to your address (so that you'd have ownership over all metadata to change at any time), or the zero address (so that your Capsule NFTs metadata link can never be changed after mint).With Capsule Collection privacy boolean
false
, meaning this is a public Capsule Collection. A public Capsule Collection allows anyone from any address to mint Capsule NFTs within the Capsule Collection. A private Capsule Collection (true
) only allows theowner
to mint Capsule NFTs within the Capsule Collection.
Note: The owner of the Capsule Collection is set to the address which calls the `createCapsuleCollection` method. The owner may change ownership of a Capsule Collection at any time.
With ETH fee amount specified. This is the required amount to create a Capsule Collection.
Last updated