Inserting Items
Now that we have a name and URI for all of our items, all we need to do is insert them into our Core Candy Machine account.
This is an important part of the process and, when using Config Line Settings, minting will not be permitted until all items have been inserted.
Note that the name and URI of each inserted item are respectively constraint by the Name Length and URI Length attributes of the Config Line Settings.
Additionally, because transactions are limited to a certain size, we cannot insert thousands of items within the same transaction. The number of items we can insert per transaction will depend on the Name Length and URI Length attributes defined in the Config Line Settings. The shorter our names and URIs are, the more we'll be able to fit into a transaction.
Add config lines
JavaScript
When using the Umi library, you may use the addConfigLines
function to insert items into a Core Candy Machine. It requires the config lines to add as well as the index in which you want to insert them.
To simply append items to the end of the currently loaded items, you may using the candyMachine.itemsLoaded
property as the index like so.
API References: addConfigLines
Inserting Items Using Prefixes
When using name and/or URI prefixes, you only need to insert the part that comes after them.
Note that, since using prefixes can significantly reduce the Name Length and URI Length, it should help you fit a lot more items per transaction.
Add config lines from a given index
JavaScript
When adding config lines to a Core Candy Machine that uses prefixes, you may only provide the part of the name and URI that comes after the prefix when using the addConfigLines
function.
For instance, say you had a Core Candy Machine with the following config line settings.
Then, you can insert config lines like so.
API References: addConfigLines
Overriding Existing Items
When inserting items, you may provide the position in which these items should be inserted. This enables you to insert items in any order you want but also allows you to update items that have already been inserted.
Override config lines
JavaScript
The following examples show how you can insert three items and, later on, update the second item inserted.
API References: addConfigLines
Conclusion
And just like that, we have a loaded Core Candy Machine ready to mint Assets! However, we've not created any requirements for our minting process. How can we configure the price of the mint? How can we ensure that buyers are holders of a specific token or an Asset from a specific collection? How can we set the start date of our mint? What about the end conditions?
Last updated