Skip to content

How to create multiple Uniq Factories using the Ultra Tool Kit

Prerequisites

Goal

The goal of this tutorial is to guide developers through the process of efficiently creating multiple Uniq Factories using the Ultra Tool Kit. By following this step-by-step guide, you will learn how to prepare a CSV file that allows for the bulk creation of Uniq Factories, reducing the need for manual input and ensuring consistency across all your entries. This method is particularly useful for large-scale operations where numerous Uniq Factories need to be deployed quickly and accurately.

Accessing the Tool Kit

To access the Ultra Tool Kit, please visit: https://toolkit.ultra.io

Once you're on the Tool Kit homepage, click on the network selection component on the top right of your screen.

Clicking on the network selection component will open up a list of available networks that you can use the toolkit on. For the sake of this tutorial, we will be using the Ultra Testnet. From the list of available networks, click on Testnet.

Login to the Ultra Tool Kit using Ultra Wallet. Refer to Tutorial - Log in to the Ultra Tool Kit for more information.

Creating Multiple Uniq Factories

1. Accessing Bulk Factory Creation

Once you've logged in to the tool kit, from the tool kit home page, click on the Bulk Factory Creation from the sidebar, to open the creation tool.

2. Preparing CSV Template

The first step is to prepare your CSV file. This file will contain all the properties required to create each Uniq Factory. You can download a CSV Template from the Tool Kit on the Bulk Factory Creation page:

Here’s an example of what your CSV file might look like:

memoasset_managerasset_creatorminimum_resell_pricemintable_window_startmintable_window_endtrading_window_starttrading_window_endrecall_window_startrecall_window_endmax_mintable_tokenslock_hashlockup_timestataccount_minting_limittransfer_window_starttransfer_window_endmaximum_uos_paymentfactory_urifactory_hashdefault_token_uridefault_token_hashresale_shares_1resale_shares_2resale_shares_3resale_shares_4resale_shares_5conditionless_receivers_1conditionless_receivers_2conditionless_receivers_3conditionless_receivers_4conditionless_receivers_5authorized_minters_1authorized_minters_2authorized_minters_3authorized_minters_4authorized_minters_5
Factory #1vh1to2ko3wp4vh1to2ko3wp4100.00000000 UOS2021-05-31 0:00:002021-05-31 0:00:0010000100http://...2d6f37d3858a8f31fca86cc73320c29e0a872050beb4704acb35dde6562af1abhttp://...2d6f37d3858a8f31fca86cc73320c29e0a872050beb4704acb35dde6562af1abultra.nft.ft:250
Factory #2vh1to2ko3wp4vh1to2ko3wp41.00000000 USD2021-05-31 0:00:002021-05-31 0:00:00250050http://...2d6f37d3858a8f31fca86cc73320c29e0a872050beb4704acb35dde6562af1abhttp://...2d6f37d3858a8f31fca86cc73320c29e0a872050beb4704acb35dde6562af1abultra.nft.ft:250vh1to2ko3wp4:150ultra.testultra.nft.ft:100ultra.test:1
Factory #3vh1to2ko3wp4vh1to2ko3wp41001http://...2d6f37d3858a8f31fca86cc73320c29e0a872050beb4704acb35dde6562af1abhttp://...2d6f37d3858a8f31fca86cc73320c29e0a872050beb4704acb35dde6562af1abultra.nft.ft:250vh1to2ko3wp4:150ultra.test:150ultra.testultra.nft.ft:1ultra.test:1
Factory #4vh1to2ko3wp4vh1to2ko3wp415500.00000000 UOS2024-05-31 0:00:002021-05-31 0:00:000100http://...2d6f37d3858a8f31fca86cc73320c29e0a872050beb4704acb35dde6562af1abhttp://...2d6f37d3858a8f31fca86cc73320c29e0a872050beb4704acb35dde6562af1abultra.nft.ft:250

Note: Empty cells in the CSV are treated as null fields, meaning those properties will not be set for the corresponding Uniq Factory.

Each column in your CSV corresponds to a specific parameter in the create.b action as described in the create.b action documentation. Here's a breakdown of each field:

Based on the Ultra developer documentation for the create.b action, I've added the "Required" column to indicate whether each parameter is mandatory or optional. Here's the updated table:

CSV ColumnRequiredDescription
memoYesStores a string value (up to 256 bytes) providing additional context or information about the factory creation. Corresponds to the memo parameter in the create.b action.
asset_creatorYesSpecifies the account name of the asset creator, who must sign the transaction. Maps directly to the asset_creator parameter.
asset_managerYesIdentifies the account responsible for managing the factory. The asset_manager must sign the transaction and pay for the RAM used to store token factory data. Maps to asset_manager.
minimum_resell_priceNoSpecifies the minimum price (in UOS or USD) at which tokens from the factory can be resold. Tokens cannot be sold below this price. Maps to minimum_resell_price.
resale_shares_[1..5]NoSpecifies resale shares, detailing accounts that receive a percentage of the resale price. Each share has a receiver and a basis point value. Maps to resale_shares.
mintable_window_startNoDefines the start of the time window during which tokens from this factory can be minted. Date in UTC format. Maps to mintable_window_start.
mintable_window_endNoDefines the end of the time window during which tokens from this factory can be minted. Date in UTC format. Maps to mintable_window_end.
trading_window_startNoSpecifies when tokens from this factory can start being traded. Date in UTC format. Maps to trading_window_start.
trading_window_endNoSpecifies when tokens from this factory can no longer be traded. Date in UTC format. Maps to trading_window_end.
recall_window_startNoDefines when tokens can start being recalled after minting. Represented as time intervals since minting (in seconds) or specific dates. Maps to recall_window_start.
recall_window_endNoDefines when tokens can no longer be recalled after minting. Represented as time intervals since minting (in seconds) or specific dates. Maps to recall_window_end.
max_mintable_tokensYesSpecifies the maximum number of tokens that can be minted by the factory. If blank, unlimited tokens can be minted. Maps to max_mintable_tokens.
lockup_timeNoDefines the duration (in seconds) that tokens remain locked after minting. Tokens cannot be transferred or resold during this time unless transferred to a conditionless receiver. Maps to lockup_time.
conditionless_receivers_[1..5]NoLists accounts that can receive tokens without adhering to transfer or lockup restrictions. Maps to conditionless_receivers.
statYesIndicates the initial status of the factory (0 for active, 1 for inactive, 2 for shutdown). Maps to stat.
factory_uriYesContains the base URI pointing to the factory's metadata, required for factory creation. Maps to factory_uri.
factory_hashNoOptional field storing the SHA256 hash of the factory metadata file, ensuring data integrity. Maps to factory_hash.
authorized_mintersNoSpecifies accounts authorized to mint tokens from the factory, along with the quantity they can mint. Maps to authorized_minters.
account_minting_limitNoLimits the number of tokens each account can mint. If blank, there is no limit. Maps to account_minting_limit.
transfer_window_startNoDefines when tokens from the factory can start being transferred. Maps to transfer_window_start.
transfer_window_endNoDefines when tokens from the factory can no longer be transferred. Maps to transfer_window_end.
maximum_uos_paymentNoSpecifies the maximum amount of UOS that the factory creation transaction can cost. Maps to maximum_uos_payment.
default_token_uriYesPoints to the default URI for the token metadata, used when there is no specific metadata for a token. Maps to default_token_uri.
default_token_hashNoOptional field containing the SHA256 hash of the default token URI content, ensuring its integrity. Maps to default_token_hash.
lock_hashNoBoolean field indicating whether to lock the metadata hashes, preventing further changes. Maps to lock_hash.

These columns in your CSV template represent the necessary inputs to create multiple Uniq Factories using Ultra's create.b action efficiently. Each column directly maps to a specific parameter in the smart contract, ensuring that the factories are created with all the required settings.

3. Uploading the CSV File

Once your CSV file is ready, you can upload it to the Ultra Tool Kit for processing.

  1. Log in to your Ultra Tool Kit account.
  2. Click on "Bulk Factory Creation"
  3. Upload your CSV file.

After uploading, the Ultra Tool Kit will parse the CSV file and begin processing each line. Each row in the CSV file is translated into a transaction on the blockchain. The create.b action is applied to each row, creating a new Uniq Factory

4. Review create.b Actions

Once you have uploaded, click on the Create (x) Action button and it will open up the transaction confirmation modal. You can click on the Details button to view the transaction in JSON form. Click on the Confirm button to submit your transaction.

Confirm and sign the transaction using the Ultra Wallet extension. This step is crucial as it authorizes the blockchain to execute the transfer under your account.

After signing the transaction, you will see a confirmation screen indicating that the transaction was successfully completed. To check the transaction on the block explorer, click on the View in Explorer text.

You'll find a list of actions on the block explorer transaction page. Since this is a bulk operation, a single transaction will contain multiple actions, each corresponding to the creation of a separate Uniq Factory. Look for the text that says RAM purchase for creating token factory <FACTORY_ID>. Each of these lines will display the ID for a newly created Uniq Factory. For instance, if you created multiple factories, you might see texts like RAM purchase for creating token factory 4356, RAM purchase for creating token factory 4357, and so on. The IDs are sequential and correspond to the order of entries in your CSV file. You’ll need these IDs for upcoming guides.

5. Verifying Factory Creation

  1. To verify the successful creation of your Uniq Factory, go to the Factory Explorer page on the tool kit (https://toolkit.ultra.io/uniqFactory).
  2. Make sure you are using the Ultra Testnet environment.
  3. Use the factory ID you obtained in the previous step to search for your Uniq Factory. Simply enter the ID and click the search button. You should then be able to view the details of your Uniq Factory.

You have now successfully created your Uniq Factories using the Ultra Tool Kit.

What's next?

Once you have created your Uniq Factories, the next step is to mint your first Uniq. Refer How to mint a Uniq using the Ultra Tool Kit.